Skip to content
Snippets Groups Projects
Jenkinsfile 878 B
Newer Older
Daniel Ecer's avatar
Daniel Ecer committed
elifePipeline {
    node('containers-jenkins-plugin') {
        def commit
Daniel Ecer's avatar
Daniel Ecer committed
        stage 'Checkout', {
            checkout scm
            commit = elifeGitRevision()
        }
Giorgio Sironi's avatar
Giorgio Sironi committed

Daniel Ecer's avatar
Daniel Ecer committed
        stage 'Build and run tests', {
            checkout scm
Daniel Ecer's avatar
Daniel Ecer committed
            try {
                sh "make IMAGE_TAG=${commit} ci-build-and-test"
            } finally {
                sh "make ci-clean"
            }
Daniel Ecer's avatar
Daniel Ecer committed
        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()
            }
Giorgio Sironi's avatar
Giorgio Sironi committed
}