github.com/arunkumar7540/cli@v6.45.0+incompatible/ci/cli-v7/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      CERT_DIR=$PWD/cleanup-integration-outputs/cert_dir
    30      mkdir -p $CERT_DIR
    31  
    32      if [[ $ENV == "homeroom" ]]; then
    33        export CF_INT_PASSWORD=$(bosh int vars-store/ci/infrastructure/$ENV/deployment-vars.yml --path /cf_admin_password)
    34      else
    35        pushd vars-store/ci/infrastructure/$ENV
    36          eval "$(bbl print-env)"
    37        popd
    38  
    39        credhub login
    40        export CF_INT_OIDC_PASSWORD=$(credhub get -n /bosh-$ENV/cf/uaa_oidc_admin_password | bosh interpolate --path /value -)
    41        export CF_INT_PASSWORD=$(credhub get -n /bosh-$ENV/cf/cf_admin_password | bosh interpolate --path /value -)
    42        # get CA cert for go router
    43        credhub get --name /bosh-$ENV/cf/router_ca | bosh interpolate - --path /value/certificate > $CERT_DIR/$ENV.router.ca
    44      fi
    45  
    46      set -x
    47  
    48      # output password into a temp file for consumption by Windows
    49      echo $CF_INT_PASSWORD > cleanup-integration-outputs/cf-password
    50      echo $CF_INT_OIDC_PASSWORD > cleanup-integration-outputs/uaa-oidc-password
    51  
    52      # get CA certs for load balancer and router
    53      bosh interpolate vars-store/ci/infrastructure/$ENV/bbl-state.json --path /lb/cert > $CERT_DIR/$ENV.lb.cert
    54  
    55      set -ex
    56  
    57      domain=$(cat bosh-lock/name)
    58      export CF_INT_API="https://api.${domain}"
    59  
    60      export PATH=$GOPATH/bin:$PATH
    61  
    62      pushd cf-cli-binaries
    63        tar xvzf cf-cli-binaries.tgz
    64        chmod +x cf7-cli_linux_x86-64
    65        mv cf7-cli_linux_x86-64 $GOPATH/bin/cf
    66      popd
    67  
    68      cd cli-ci
    69      bin/cleanup-integration "${ARGS}"