github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/scripts/fly-execute-windows-integration.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e
     4  set -o pipefail
     5  
     6  if [ $# -ne 1 ]; then
     7    echo "Usage: $0 <env-name>"
     8    echo "  e.g.: $0 beque"
     9    echo "NOTE: This script does not work with bosh-lites yet."
    10    exit 1
    11  fi
    12  
    13  ENV=$1
    14  CERT_DIR=cf-credentials/cert_dir
    15  
    16  source ~/workspace/cli-private/set_int_test_foundation.sh $ENV
    17  
    18  cd $GOPATH/src/code.cloudfoundry.org/cli
    19  
    20  echo "Making windows..."
    21  make out/cf-cli_winx64.exe
    22  
    23  echo "Creating cli binaries..."
    24  mkdir -p cf-cli-binaries/
    25  
    26  pushd out > /dev/null
    27   tar cvzf ../cf-cli-binaries/cf-cli-binaries.tgz cf-cli_winx64.exe
    28  popd > /dev/null
    29  
    30  echo "Creating cf credentials..."
    31  mkdir -p cf-credentials/
    32  
    33  echo $CF_INT_PASSWORD > cf-credentials/cf-password
    34  
    35  echo $CF_INT_OIDC_PASSWORD > cf-credentials/uaa-oidc-password
    36  
    37  echo "Creating bosh-lock dir..."
    38  mkdir -p bosh-lock
    39  
    40  echo $ENV.cli.fun > bosh-lock/name
    41  
    42  echo "Creating cert dirs.."
    43  mkdir -p $CERT_DIR
    44  
    45  bosh int ~/workspace/cli-private/ci/infrastructure/$ENV/bbl-state.json --path /lb/cert > "$CERT_DIR/$ENV.lb.cert"
    46  
    47  credhub login --skip-tls-validation
    48  credhub get --name /bosh-$ENV/cf/router_ca | bosh interpolate - --path /value/certificate > "$CERT_DIR/$ENV.router.ca"
    49  
    50  echo "flying..."
    51  fly -t ci execute -c ci/cli/tasks/integration-windows.yml -i cli=. -i cf-cli-binaries=./cf-cli-binaries -i cli-ci=. -i cf-credentials=./cf-credentials -i bosh-lock=./bosh-lock --tag "cli-windows"
    52  
    53  echo "DONE"