[19.02.20] readded strategy, increased replicas, removed unused functions from pipeline and now waiting for rollout

This commit is contained in:
andyjk15 2020-02-19 11:43:59 +00:00
parent a0618846f0
commit b5752cab84
2 changed files with 8 additions and 24 deletions

View File

@ -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:

View File

@ -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"
}
}
}