[19.02.20] readded strategy, increased replicas, removed unused functions from pipeline and now waiting for rollout
This commit is contained in:
parent
a0618846f0
commit
b5752cab84
@ -6,15 +6,15 @@ metadata:
|
||||
name: RESOURCE_NAME
|
||||
namespace: default
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: RESOURCE_NAME
|
||||
# strategy:
|
||||
# type: RollingUpdate
|
||||
# rollingUpdate:
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 0
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
||||
@ -27,24 +27,6 @@ String get_application_version() {
|
||||
"${pom.version}-b${env.BUILD_NUMBER}"
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
def applyResource(String environment, String resourcePath, Map<String, Object> parameters) {
|
||||
String command = "kubectl apply --filename ${resourcePath}"
|
||||
parameters.each { String key, Object value ->
|
||||
command += " --param=${key}='${value}'"
|
||||
}
|
||||
command += "| oc --namespace ${environment} apply --filename -"
|
||||
|
||||
sh "${command}"
|
||||
}
|
||||
|
||||
def deploy( Integer replicas ) {
|
||||
// rollout latest
|
||||
// get rollout status
|
||||
|
||||
// set triggers
|
||||
}
|
||||
|
||||
try {
|
||||
timestamps {
|
||||
node ("${env.SLAVE_LABEL}") {
|
||||
@ -119,6 +101,8 @@ try {
|
||||
sh "kubectl apply -f configuration/kubernetes/service.yaml"
|
||||
|
||||
sh "kubectl get pods"
|
||||
|
||||
sh "kubectl rollout status"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user