x86_64-suse-step_bootstrap/Jenkinsfile
Jonathan Ervine c45efb84bd new file: Jenkinsfile
Added Jenkinsfile
2020-04-28 22:21:05 +08:00

24 lines
731 B
Groovy

node("docker-node") {
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
git branch: "master", url: "ssh://git@git.ervine.org:2222/jonny/x86_64-suse-step_bootstrap", credentialsId: 'jenkins-to-git'
sh "git rev-parse HEAD > .git/commit-id"
def commit_id = readFile('.git/commit-id').trim()
println commit_id
try {
stage "build"
def app = docker.build "library/x86_64/suse/stepca_bootstrap"
stage "publish"
app.push("${env.BUILD_NUMBER}")
app.push("latest")
app.push("0.14.3")
}
catch (err) {
currentBuild.result = 'FAILURE'
}
}
}