diff --git a/configuration/kubernetes/deployment.yaml b/configuration/kubernetes/deployment.yaml index bdcd3e7..bdf1025 100644 --- a/configuration/kubernetes/deployment.yaml +++ b/configuration/kubernetes/deployment.yaml @@ -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: diff --git a/configuration/pipelines/build.groovy b/configuration/pipelines/build.groovy index fff701c..b5a8687 100644 --- a/configuration/pipelines/build.groovy +++ b/configuration/pipelines/build.groovy @@ -27,24 +27,6 @@ String get_application_version() { "${pom.version}-b${env.BUILD_NUMBER}" } -@NonCPS -def applyResource(String environment, String resourcePath, Map 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" } } }