adds stages
This commit is contained in:
parent
b0d9923b8b
commit
b5545c64ca
@ -34,6 +34,7 @@ spec:
|
|||||||
|
|
||||||
def deletePod (Map config) {
|
def deletePod (Map config) {
|
||||||
def ws = pwd()
|
def ws = pwd()
|
||||||
|
stage ("Delete Pod") {
|
||||||
container ("alpine") {
|
container ("alpine") {
|
||||||
sh """
|
sh """
|
||||||
apk add --no-cache curl
|
apk add --no-cache curl
|
||||||
@ -49,11 +50,13 @@ def deletePod (Map config) {
|
|||||||
sh "for i in \$(kubectl get pods --selector ${config.selector} -o name); do kubectl delete \${i}; done"
|
sh "for i in \$(kubectl get pods --selector ${config.selector} -o name); do kubectl delete \${i}; done"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildContainer (Map config) {
|
def buildContainer (Map config) {
|
||||||
def ws = pwd()
|
def ws = pwd()
|
||||||
container("kaniko") {
|
stage ("Build Container") {
|
||||||
|
container ("kaniko") {
|
||||||
writeFile (file: ws + "/Dockerfile", text: config.dockerFile)
|
writeFile (file: ws + "/Dockerfile", text: config.dockerFile)
|
||||||
withCredentials([usernameColonPassword(
|
withCredentials([usernameColonPassword(
|
||||||
credentialsId: config.repoCreds,
|
credentialsId: config.repoCreds,
|
||||||
@ -68,4 +71,5 @@ def buildContainer (Map config) {
|
|||||||
--destination "${config.imageDest}"
|
--destination "${config.imageDest}"
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user