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 +49
-7
lines changed Expand file tree Collapse file tree 4 files changed +49
-7
lines changed Original file line number Diff line number Diff line change 1
1
language : bash
2
2
script : true
3
3
sudo : required
4
- before_install :
5
- - bash scripts/install.sh
4
+ install :
5
+ - " ./scripts/install.sh"
6
+ - " ./scripts/bx_auth.sh"
6
7
group : stable
7
8
dist : precise
8
9
os : 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
12
12
sudo ./Bluemix_CLI/install_bluemix_cli
13
13
}
14
14
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() {
19
16
bx plugin install container-service -r Bluemix
20
17
echo " Installing kubectl"
21
18
chmod +x ./kubectl
186
183
187
184
188
185
install_bluemix_cli
189
- bluemix_auth
186
+ install_kubectl
190
187
cluster_setup
191
188
initial_setup
192
189
create_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