Merge pull request #67 from StefanScherer/build-push-image

Add Jenkinsfile to push image
This commit is contained in:
Stefan Scherer 2020-07-02 19:35:48 +02:00 committed by GitHub
commit 58c271ce20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

22
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,22 @@
pipeline {
options {
timeout(time: 1, unit: 'HOURS')
}
agent {
label 'ubuntu-1804 && amd64 && docker'
}
stages {
stage('build and push') {
when {
branch 'master'
}
sh "docker build docker/getting-started ."
steps {
withDockerRegistry([url: "", credentialsId: "dockerbuildbot-index.docker.io"]) {
sh("docker push docker/getting-started")
}
}
}
}
}