Configure GLOBAL_JJB_VERSION Through Environment 44/7144/3
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Sat, 28 Oct 2017 12:51:21 +0000 (05:51 -0700)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 3 Nov 2017 15:14:44 +0000 (11:14 -0400)
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 <tbramwell@linuxfoundation.org>
docker-compose.yml
init/config-ci-environment.sh

index 71cc51a..82cc9c1 100644 (file)
@@ -5,6 +5,8 @@ services:
     init:
         build: ./init
         container_name: releng-init
+        environment:
+            - GLOBAL_JJB_VERSION=v0.10.2
         volumes:
             - init:/init/
             - jenkins:/jenkins
index cf6fa4c..6103c5e 100644 (file)
@@ -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