From: Trevor Bramwell Date: Sat, 28 Oct 2017 12:51:21 +0000 (-0700) Subject: Configure GLOBAL_JJB_VERSION Through Environment X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=cf4f5a9f2a11617cb1a708fe0bce2be05995167e;p=releng%2Fci-workshop.git Configure GLOBAL_JJB_VERSION Through Environment Pulling GLOBAL_JJB_VERSION from the environment allows for creating the initial ci-management repo with a specific global-jjb version without having to rebuild the init container. This also modifies paths to the 'wait-for-it.sh' script to be absolute. Change-Id: Ic2e7c2a9871fda176a678e245a57d1fde898c0a9 Signed-off-by: Trevor Bramwell --- diff --git a/docker-compose.yml b/docker-compose.yml index 71cc51a..82cc9c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: init: build: ./init container_name: releng-init + environment: + - GLOBAL_JJB_VERSION=v0.10.2 volumes: - init:/init/ - jenkins:/jenkins diff --git a/init/config-ci-environment.sh b/init/config-ci-environment.sh index cf6fa4c..6103c5e 100644 --- a/init/config-ci-environment.sh +++ b/init/config-ci-environment.sh @@ -9,7 +9,7 @@ GERRIT_KEY=/init/id_rsa-sandbox JENKINS_KEY=/jenkins/.ssh/id_rsa SSH_OPTIONS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" CI_MANAGEMENT_REPO=/init/ci-management -GLOBAL_JJB_VERSION=v0.6.0 +GLOBAL_JJB_VERSION=${GLOBAL_JJB_VERSION:-v0.6.0} # Generate a key for the sandbox user if [ ! -f /init/ssh-key-sandbox.done ]; then @@ -20,7 +20,7 @@ fi ## # Jenkins Setup ## -./wait-for-it.sh jenkins:8080 -t 30 +/docker-entrypoint-init.d/wait-for-it.sh jenkins:8080 -t 30 # Generate a key for the jenkins user if [ ! -f /init/ssh-key-jenkins.done ]; then @@ -33,7 +33,7 @@ fi ## # Gerrit Login ## -./wait-for-it.sh gerrit:8080 -t 90 +/docker-entrypoint-init.d/wait-for-it.sh gerrit:8080 -t 90 # Be the first to login to gain Administrative rights if [ ! -f /init/step-1.done ]; then