This repository was archived by the owner on Jul 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +50
-7
lines changed Expand file tree Collapse file tree 4 files changed +50
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
12language : bash
23script : true
34sudo : required
4- before_install :
5- - bash scripts/install.sh
5+ install :
6+ - " ./scripts/install.sh"
7+ - " ./scripts/bx_auth.sh"
68group : stable
79dist : precise
810os : linux
Original file line number Diff line number Diff line change 1+ #! /bin/bash -e
2+
3+ # This script is intended to be run by Travis CI. If running elsewhere, invoke
4+ # it with: TRAVIS_PULL_REQUEST=false [path to script]
5+ # If no credentials are provided at runtime, bx will use the environment
6+ # variable BLUEMIX_API_KEY. If no API key is set, it will prompt for
7+ # credentials.
8+
9+ # shellcheck disable=SC1090
10+ source " $( dirname " $0 " ) " /../scripts/resources.sh
11+
12+ BLUEMIX_ORG=" Developer Advocacy"
13+ BLUEMIX_SPACE=" dev"
14+
15+ is_pull_request " $0 "
16+
17+ echo " Authenticating to Bluemix"
18+ bx login -a https://api.ng.bluemix.net
19+
20+ echo " Targeting Bluemix org and space"
21+ bx target -o " $BLUEMIX_ORG " -s " $BLUEMIX_SPACE "
22+
23+ echo " Initializing Bluemix Container Service"
24+ bx cs init
Original file line number Diff line number Diff line change @@ -12,10 +12,7 @@ tar -xvf Bluemix_CLI.tar.gz
1212sudo ./Bluemix_CLI/install_bluemix_cli
1313}
1414
15- function bluemix_auth() {
16- echo " Authenticating with Bluemix"
17- echo " 1" | bx login -a https://api.ng.bluemix.net --apikey $BLUEMIX_AUTH
18- curl -LO https://storage.googleapis.com/kubernetes-release/release/$( curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) /bin/linux/amd64/kubectl
15+ function install_kubectl() {
1916bx plugin install container-service -r Bluemix
2017echo " Installing kubectl"
2118chmod +x ./kubectl
186183
187184
188185install_bluemix_cli
189- bluemix_auth
186+ install_kubectl
190187cluster_setup
191188initial_setup
192189create_platform_services
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script contains functions used by many of the scripts found in scripts/
4+ # and tests/.
5+
6+ test_failed (){
7+ echo -e >&2 " \033[0;31m$1 test failed!\033[0m"
8+ exit 1
9+ }
10+
11+ test_passed (){
12+ echo -e " \033[0;32m$1 test passed!\033[0m"
13+ }
14+
15+ is_pull_request (){
16+ if [[ " $TRAVIS_PULL_REQUEST " != " false" ]]; then
17+ echo -e " \033[0;33mPull Request detected; not running $1 !\033[0m"
18+ exit 0
19+ fi
20+ }
You can’t perform that action at this time.
0 commit comments