github.com/randomtask1155/cli@v6.41.1-0.20181227003417-a98eed78cbde+incompatible/ci/cli/tasks/cleanup-integration.yml (about) 1 --- 2 platform: linux 3 4 image_resource: 5 type: docker-image 6 source: 7 repository: cfcli/cli-base 8 9 inputs: 10 - name: cli-ci 11 - name: cf-cli-binaries 12 - name: bosh-lock 13 - name: vars-store 14 15 outputs: 16 - name: cleanup-integration-outputs 17 18 params: 19 ARGS: 20 21 run: 22 path: bash 23 args: 24 - -c 25 - | 26 set -e 27 28 ENV=$(cat bosh-lock/name | cut -d "." -f 1) 29 30 if [[ $ENV == "homeroom" ]]; then 31 export CF_INT_PASSWORD=$(bosh int vars-store/ci/infrastructure/$ENV/deployment-vars.yml --path /cf_admin_password) 32 else 33 pushd vars-store/ci/infrastructure/$ENV 34 if [[ "$(cat bbl-state.json | jq -r '.bblVersion')" =~ v5 ]]; then 35 eval "$(bbl5 print-env | grep -v '^ssh')" 36 export JUMPBOX_IP=$(bosh int vars/jumpbox-vars-file.yml --path /external_ip) 37 export CREDHUB_PROXY="ssh+socks5://jumpbox@${JUMPBOX_IP}:22?private-key=$JUMPBOX_PRIVATE_KEY" 38 credhub1 login --username=credhub-cli --password="$CREDHUB_PASSWORD" --server="$CREDHUB_SERVER" 39 40 export CF_INT_PASSWORD=$(credhub1 get -n /bosh-$ENV/cf/cf_admin_password | bosh interpolate --path /value -) 41 else 42 eval "$(bbl print-env)" 43 credhub login 44 45 export CF_INT_OIDC_PASSWORD=$(credhub get -n /bosh-$ENV/cf/uaa_oidc_admin_password | bosh interpolate --path /value -) 46 export CF_INT_PASSWORD=$(credhub get -n /bosh-$ENV/cf/cf_admin_password | bosh interpolate --path /value -) 47 fi 48 popd 49 fi 50 51 set -x 52 53 # output password into a temp file for consumption by Windows 54 echo $CF_INT_PASSWORD > cleanup-integration-outputs/cf-password 55 echo $CF_INT_OIDC_PASSWORD > cleanup-integration-outputs/uaa-oidc-password 56 57 set -ex 58 59 domain=$(cat bosh-lock/name) 60 export CF_INT_API="https://api.${domain}" 61 62 export PATH=$GOPATH/bin:$PATH 63 64 pushd cf-cli-binaries 65 tar xvzf cf-cli-binaries.tgz 66 chmod +x cf-cli_linux_x86-64 67 mv cf-cli_linux_x86-64 $GOPATH/bin/cf 68 popd 69 70 cd cli-ci 71 bin/cleanup-integration "${ARGS}"