Bumped to master branch

This commit is contained in:
Jonathan Ervine
2020-07-09 23:25:20 +08:00
parent 1821a67a6b
commit 37bea7b218
3 changed files with 66 additions and 0 deletions
Vendored
+28
View File
@@ -0,0 +1,28 @@
node("docker-node") {
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
git branch: "master", url: "ssh://git@git.ervine.org/jonny/x86_64-alpine-medusa", 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/medusa"
stage "publish"
app.push("${env.BUILD_NUMBER}")
app.push("latest")
app.push("0.3")
app.push("0.3.16")
stage('Deploy on K8s'){
sh "/usr/local/bin/kubectl -n media delete po medusa-0"
}
}
catch (err) {
currentBuild.result = 'FAILURE'
}
}
}