Created
September 18, 2017 17:16
-
-
Save thcipriani/c87b0f3e4292d9c86df9c70803cbfafd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
def jobName = "${JOB_NAME}:${BUILD_ID}".toLowerCase() | |
def jobImg | |
// Setup stage | |
// --- | |
// Ensure we get what we came for here | |
stage('PreSetup') { | |
pwd() | |
sh 'ls' | |
} | |
stage('Setup') { | |
if (! fileExists('blubber.json')) { | |
error('No blubber.json found in repo root!') | |
} | |
blubber blubber.json production | |
} | |
// Build stage | |
// --- | |
// Build the docker image from the Dockerfile.ci file in the repo root | |
stage('Build') { | |
jobImg = docker.build("${jobName}", '-f Dockerfile .') | |
} | |
docker.withRegistry('https://ci-staging-docker-registry01.ci-staging.eqiad.wmflabs', 'ci-staging-jenkins') { | |
jobImg.push('latest') | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment