2020-07-02 16:53:36 +00:00
|
|
|
pipeline {
|
|
|
|
options {
|
|
|
|
timeout(time: 1, unit: 'HOURS')
|
|
|
|
}
|
|
|
|
agent {
|
|
|
|
label 'ubuntu-1804 && amd64 && docker'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('build and push') {
|
|
|
|
when {
|
|
|
|
branch 'master'
|
|
|
|
}
|
2020-07-15 06:59:02 +00:00
|
|
|
sh "docker build -t docker/getting-started ."
|
2020-07-02 16:53:36 +00:00
|
|
|
|
|
|
|
steps {
|
|
|
|
withDockerRegistry([url: "", credentialsId: "dockerbuildbot-index.docker.io"]) {
|
|
|
|
sh("docker push docker/getting-started")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-07-15 06:59:02 +00:00
|
|
|
}
|