Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit e8b553f

Browse files
committed
Fix Scripts for Travis CI
Changed scripts to enhance Travis CI. Various scripts change to check for TRAVIS_PULL_REQUEST instead of BLUEMIX_AUTH. Change $NODE_PORT to 30080 in test-kubernetes.sh. kubeadm test is now ran regardless if it is a PR or not.
1 parent 2e6b890 commit e8b553f

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

scripts/bx_auth.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
BLUEMIX_ORG="Developer Advocacy"
44
BLUEMIX_SPACE="dev"
55

6-
if [[ -z "$BLUEMIX_AUTH" ]]; then
7-
echo -e "\033[0;33mFork detected; not authenticating to Bluemix.\033[0m"
6+
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
7+
echo -e "\033[0;33mPull Request detected; not authenticating to Bluemix.\033[0m"
88
exit 0
99
fi
1010

scripts/install_bx.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -e
22

3-
if [[ -z "$BLUEMIX_AUTH" ]]; then
3+
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
44
echo -e "\033[0;33mPull Request detected; not installing extra software.\033[0m"
55
exit 0
66
fi

tests/test-kubeadm-dind-cluster.sh

+7-14
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,14 @@ verify_deploy(){
6969
}
7070

7171
main(){
72-
73-
if [[ -z "$BLUEMIX_AUTH" ]]
74-
then
75-
if ! setup_dind-cluster; then
76-
test_failed
77-
elif ! kubectl_deploy; then
78-
test_failed
79-
elif ! verify_deploy; then
80-
test_failed
81-
else
82-
test_passed
83-
fi
72+
if ! setup_dind-cluster; then
73+
test_failed
74+
elif ! kubectl_deploy; then
75+
test_failed
76+
elif ! verify_deploy; then
77+
test_failed
8478
else
85-
echo -e "\033[0;33mBluemix Auth detected; not running kubeadm-dind-cluster test.\033[0m"
86-
exit 0
79+
test_passed
8780
fi
8881
}
8982

tests/test-kubernetes.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ verify_deploy(){
7474
for IP in $IPS; do
7575
while true
7676
do
77-
code=$(curl -sw '%{http_code}' http://"$IP":"$NODEPORT" -o /dev/null)
77+
code=$(curl -sw '%{http_code}' http://"$IP":30080 -o /dev/null)
7878
if [ "$code" = "200" ]; then
7979
echo "Account Summary is up."
8080
break
@@ -91,8 +91,8 @@ verify_deploy(){
9191
}
9292

9393
main(){
94-
if [[ -z "$BLUEMIX_AUTH" ]]; then
95-
echo -e "\033[0;33mFork detected; not running Bluemix Container Service test.\033[0m"
94+
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
95+
echo -e "\033[0;33mPull Request detected. Not running Bluemix Container Service test.\033[0m"
9696
exit 0
9797
fi
9898

0 commit comments

Comments
 (0)