File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1- def pipelineVersion= ' 1.1.1 '
1+ def pipelineVersion= ' 1.1.3 '
22println " Pipeline version: ${ pipelineVersion} "
33/*
44 * This is a vanilla Jenkins pipeline that relies on the Jenkins kubernetes plugin to dynamically provision agents for
@@ -226,8 +226,10 @@ spec:
226226 git fetch --tags
227227 git tag -l
228228
229+ COMMIT_HASH=$(git rev-parse HEAD)
229230 git checkout -b ${BRANCH} --track origin/${BRANCH}
230231 git branch --set-upstream-to=origin/${BRANCH} ${BRANCH}
232+ git reset --hard ${COMMIT_HASH}
231233
232234 git config --global user.name "Jenkins Pipeline"
233235 git config --global user.email "jenkins@ibmcloud.com"
@@ -372,10 +374,12 @@ spec:
372374
373375 # sleep for 10 seconds to allow enough time for the server to start
374376 sleep 10
375- while [ $(curl -sL -w "%{http_code}\\ n" "${URL}/health" -o /dev/null --connect-timeout 3 --max-time 5 --retry 3 --retry-max-time 30) != "200" ]; do
377+ echo "Health check start"
378+ while [[ $(curl -sL -w "%{http_code}\\ n" "${URL}/health" -o /dev/null --connect-timeout 3 --max-time 5 --retry 3 --retry-max-time 30) != "200" ]]; do
376379 sleep 30
380+ echo "Health check failure. Remaining retries: $sleep_countdown"
377381 sleep_countdown=$((sleep_countdown-1))
378- if [ sleep_countdown=0 ]; then
382+ if [[ $ sleep_countdown -eq 0 ] ]; then
379383 echo "Could not reach health endpoint: ${URL}/health"
380384 exit 1;
381385 fi
Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ apiVersion: v1
22appVersion : " 1.0"
33description : A Helm chart for Kubernetes
44name : base
5- version : 1.1.1
5+ version : 1.1.3
66branch : dev
Original file line number Diff line number Diff line change 1- version : 1.1.1
1+ version : 1.1.3
22name : nodejs
33runtime : nodejs
44build-tool : node
You can’t perform that action at this time.
0 commit comments