Skip to content

Commit

Permalink
Update kaniko retries (#274)
Browse files Browse the repository at this point in the history
* Update kaniko version, add retries

* Update slack alert, extraneous character
  • Loading branch information
joekottke authored Jul 8, 2020
1 parent ec85a10 commit ffa393f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
34 changes: 21 additions & 13 deletions jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,16 @@ pipeline {
}
container('kaniko'){
sh '''
/kaniko/executor -f $WORKSPACE/ops/Dockerfile-consensus -c $WORKSPACE/ops \
--build-arg ORIGIN_DATA_DIR=sample_data \
--build-arg GIT_COMMIT=${GIT_COMMIT} \
--build-arg BRANCH=${NETWORK} \
--destination=$DOCKER_OWNER/$CONSENSUS_NODE_DOCKER_REPO:${NETWORK}-${TAG_VERSION} \
--destination=$DOCKER_OWNER/$CONSENSUS_NODE_DOCKER_REPO:${NETWORK}-latest
for i in 1 2 3; do
/kaniko/executor -f $WORKSPACE/ops/Dockerfile-consensus -c $WORKSPACE/ops \
--build-arg ORIGIN_DATA_DIR=sample_data \
--build-arg GIT_COMMIT=${GIT_COMMIT} \
--build-arg BRANCH=${NETWORK} \
--destination=$DOCKER_OWNER/$CONSENSUS_NODE_DOCKER_REPO:${NETWORK}-${TAG_VERSION} \
--destination=$DOCKER_OWNER/$CONSENSUS_NODE_DOCKER_REPO:${NETWORK}-latest \
--cleanup \
&& break || sleep 5;
done
'''
}
}
Expand All @@ -137,12 +141,16 @@ pipeline {
}
container('kaniko'){
sh '''
/kaniko/executor -f $WORKSPACE/ops/Dockerfile-mobilecoind -c $WORKSPACE/ops \
--build-arg ORIGIN_DATA_DIR=sample_data \
--build-arg GIT_COMMIT=${GIT_COMMIT} \
--build-arg BRANCH=${NETWORK} \
--destination=$DOCKER_OWNER/$MOBILECOIND_DOCKER_REPO:${NETWORK}-${TAG_VERSION} \
--destination=$DOCKER_OWNER/$MOBILECOIND_DOCKER_REPO:${NETWORK}-latest
for i in 1 2 3; do
/kaniko/executor -f $WORKSPACE/ops/Dockerfile-mobilecoind -c $WORKSPACE/ops \
--build-arg ORIGIN_DATA_DIR=sample_data \
--build-arg GIT_COMMIT=${GIT_COMMIT} \
--build-arg BRANCH=${NETWORK} \
--destination=$DOCKER_OWNER/$MOBILECOIND_DOCKER_REPO:${NETWORK}-${TAG_VERSION} \
--destination=$DOCKER_OWNER/$MOBILECOIND_DOCKER_REPO:${NETWORK}-latest \
--cleanup \
&& break || sleep 5;
done
'''
}
}
Expand Down Expand Up @@ -232,7 +240,7 @@ pipeline {
post {
always {
slackSend color: COLOR_MAP[currentBuild.currentResult],
message: "*${currentBuild.currentResult}:*\nJob: ${env.JOB_NAME}\nCommit: ${env.GIT_COMMIT}\nDocker Tag: ${env.NETWORK}-v${env.TAG_VERSION}\nBuild: ${env.BUILD_NUMBER}\nDuration: ${currentBuild.durationString}\nMore info at: ${env.BUILD_URL}"
message: "*${currentBuild.currentResult}:*\nJob: ${env.JOB_NAME}\nCommit: ${env.GIT_COMMIT}\nDocker Tag: ${env.NETWORK}-${env.TAG_VERSION}\nBuild: ${env.BUILD_NUMBER}\nDuration: ${currentBuild.durationString}\nMore info at: ${env.BUILD_URL}"
}
}
}
2 changes: 1 addition & 1 deletion jenkins/packaging-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:

- name: kaniko
# Need the debug container to get busybox
image: gcr.io/kaniko-project/executor:debug-v0.16.0
image: gcr.io/kaniko-project/executor:debug-v0.23.0
imagePullPolicy: Always
command:
- /busybox/cat
Expand Down

0 comments on commit ffa393f

Please sign in to comment.