modified: Jenkinsfile
Updated to auto-deploy to k8s
This commit is contained in:
parent
c1b12a19d9
commit
92dde01436
21
Jenkinsfile
vendored
21
Jenkinsfile
vendored
@ -6,12 +6,21 @@ node("docker-node") {
|
||||
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/mariadb"
|
||||
|
||||
stage "build"
|
||||
def app = docker.build "library/x86_64/alpine/mariadb"
|
||||
|
||||
stage "publish"
|
||||
app.push("${env.BUILD_NUMBER}")
|
||||
app.push("latest")
|
||||
stage "publish"
|
||||
app.push("${env.BUILD_NUMBER}")
|
||||
app.push("latest")
|
||||
|
||||
stage('Deploy on K8s'){
|
||||
sh "/usr/local/bin/kubectl -n db delete po mariadb-0"
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user