x86_64-alpine-sonarr-sidecar/Jenkinsfile
Jonathan Ervine f000a197fb modified: Jenkinsfile
modified:   start.sh
2020-06-05 15:25:35 +08:00

25 lines
725 B
Groovy

node("docker-node") {
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
git branch: "3.11.6", url: "ssh://git@git.ervine.org/jonny/x86_64-alpine-sonarr-sidecar", 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/alpine/sonarr-sidecar"
stage "publish"
app.push("${env.BUILD_NUMBER}")
app.push("3.11.6")
app.push("latest")
}
catch (err) {
currentBuild.result = 'FAILURE'
}
}
}