Add Jenkinsfile to push image
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
This commit is contained in:
parent
823b0d4642
commit
a9a4a1fca0
22
Jenkinsfile
vendored
Normal file
22
Jenkinsfile
vendored
Normal 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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user