Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #124 from nickdgriffin/feature/skip-init
Browse files Browse the repository at this point in the history
Adding option to skip Load_Platform
  • Loading branch information
SachinKSingh28 authored Aug 11, 2016
2 parents 95992ea + 3edbefc commit 527c72f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cmd/compose
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ help() {
echo
echo "Available subcommands are:"
printf " %-22s %s\n" "init" "Initialises ADOP"
printf " %-22s %s\n" "init <--without-load>" "Initialises ADOP without loading the platform"
printf " %-22s %s\n" "init <--without-pull>" "Initialises ADOP without pulling images"
printf " %-22s %s\n" "up" "docker-compose up for ADOP"
printf " %-22s %s\n" "gen-certs <path>" "Generate client certificates for TLS-enabled Machine and copy to <path> in Jenkins Slave"
Expand Down Expand Up @@ -88,7 +89,10 @@ case "$1" in
--without-pull)
export PULL="NO"
;;
*)
--without-load)
export LOAD="NO"
;;
*)
esac

echo '
Expand Down Expand Up @@ -129,8 +133,12 @@ esac
until [[ $(docker exec gerrit curl -I -s gerrit:${PASSWORD_GERRIT}@localhost:8080/gerrit/|head -n 1|cut -d$' ' -f2) == 200 ]]; do pretty_sleep ${TOOL_SLEEP_TIME} Gerrit; done

# Trigger Load_Platform in Jenkins
echo "* Initialising the Platform"
docker exec jenkins curl -s -X POST jenkins:${PASSWORD_JENKINS}@localhost:8080/jenkins/job/Load_Platform/buildWithParameters --data token=gAsuE35s
if [ "${LOAD}" = "NO" ]; then
echo "* Skipping Loading the Platform"
else
echo "* Loading the Platform"
docker exec jenkins curl -s -X POST jenkins:${PASSWORD_JENKINS}@localhost:8080/jenkins/job/Load_Platform/buildWithParameters --data token=gAsuE35s
fi

# Generate and copy the certificates to jenkins slave if TLS is enabled
if [ "${DOCKER_TLS_VERIFY}" = "1" ]; then
Expand Down

0 comments on commit 527c72f

Please sign in to comment.