- git clone https://gerrit.example.org/r/ci-management.git /opt/ciman
- /opt/ciman/jjb/global-jjb/jenkins-init-scripts/init.sh
+
+ exec > /var/log/jenkins-init.log 2>&1
+
+ gerrit_host=gerrit.example.org
+ ciman_root=/opt/ciman
+
+ until host $gerrit_host &>/dev/null ; do
+ echo "Waiting until $gerrit_host is resolvable..."
+ sleep 1
+ done
+
+ git clone --recurse-submodules https://$gerrit_host/r/ci-management $ciman_root
+
+ # Specify swapspace on the minion
+ # SWAP_SIZE specifies the size of swapspace in GB If set to '0' no
+ # swapspace will be allocated If unset, 1GB swapspace will be
+ # allocated
+ #export SWAP_SIZE=0
+
+ $ciman_root/global-jjb/jenkins-init-scripts/init.sh
+
+ rm -rf $ciman_root
+
+ echo "jenkins-init: Done"