From 22fe6d104ffff6fb13c1853d3fc85f77f31c38c8 Mon Sep 17 00:00:00 2001 From: Daniel Ecer <de-code@users.noreply.github.com> Date: Wed, 5 Jun 2019 21:59:06 +0800 Subject: [PATCH] push unstable image (#111) * move checkout and move to master into containers node * use elifePipeline * push unstable image --- Jenkinsfile | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f265842..5350cbc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,12 +1,12 @@ -elifeLibrary { - def commit +elifePipeline { + node('containers-jenkins-plugin') { + def commit - stage 'Checkout', { - checkout scm - commit = elifeGitRevision() - } + stage 'Checkout', { + checkout scm + commit = elifeGitRevision() + } - node('containers-jenkins-plugin') { stage 'Build and run tests', { checkout scm try { @@ -15,11 +15,18 @@ elifeLibrary { sh "make ci-clean" } } - } - elifeMainlineOnly { - stage 'Merge to master', { - elifeGitMoveToBranch commit, 'master' + elifeMainlineOnly { + stage 'Merge to master', { + elifeGitMoveToBranch commit, 'master' + } + + stage 'Push unstable image', { + def image = DockerImage.elifesciences(this, 'sciencebeam-gym', commit) + def unstable_image = image.addSuffixAndTag('_unstable', commit) + unstable_image.tag('latest').push() + unstable_image.push() + } } } } -- GitLab