Skip to content

Commit

Permalink
feat: add a new docker image tag that incorporates the timestamp (thu…
Browse files Browse the repository at this point in the history
…s is sortable for automation) (#569)
  • Loading branch information
scottaubrey authored Apr 20, 2022
1 parent 8adc736 commit f45c4e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ elifePipeline {
stage 'Checkout', {
checkout scm
commit = elifeGitRevision()
commitShort = elifeGitRevision().substring(0, 8)
branch = sh(script: 'git rev-parse --abbrev-ref HEAD', returnStdout: true).trim()
timestamp = sh(script: 'date --utc +%Y%m%d.%H%M', returnStdout: true).trim()
git_url = getGitUrl()
}

Expand Down Expand Up @@ -36,6 +39,7 @@ elifePipeline {
def image = DockerImage.elifesciences(this, 'data-science-dags_peerscout-api', commit)
def unstable_image = image.addSuffixAndTag('_unstable', commit)
unstable_image.tag('latest').push()
unstable_image.tag("${branch}-${commitShort}-${timestamp}").push()
unstable_image.push()
}
stage 'Build data pipeline image with latest commit', {
Expand Down

0 comments on commit f45c4e1

Please sign in to comment.