Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Commit

Permalink
Removed redownload flag
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingrzejszczak committed Jul 31, 2017
1 parent 50a0ddd commit 855af1b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/src/main/bash/pipeline-cf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
set -e

function logInToPaas() {
local redownloadInfra="${REDOWNLOAD_INFRA}"
local user="PAAS_${ENVIRONMENT}_USERNAME"
local cfUsername="${!user}"
local pass="PAAS_${ENVIRONMENT}_PASSWORD"
Expand All @@ -16,12 +15,12 @@ function logInToPaas() {
CF_INSTALLED="$( cf --version || echo "false" )"
CF_DOWNLOADED="$( test -r cf && echo "true" || echo "false" )"
echo "CF Installed? [${CF_INSTALLED}], CF Downloaded? [${CF_DOWNLOADED}]"
if [[ ${CF_INSTALLED} == "false" && (${CF_DOWNLOADED} == "false" || ${CF_DOWNLOADED} == "true" && ${redownloadInfra} == "true") ]]; then
if [[ ${CF_INSTALLED} == "false" && ${CF_DOWNLOADED} == "false" ]]; then
echo "Downloading Cloud Foundry"
curl -L "https://cli.run.pivotal.io/stable?release=linux64-binary&source=github" --fail | tar -zx
CF_DOWNLOADED="true"
else
echo "CF is already installed or was already downloaded but the flag to redownload was disabled"
echo "CF is already installed"
fi

if [[ ${CF_DOWNLOADED} == "true" ]]; then
Expand Down

0 comments on commit 855af1b

Please sign in to comment.