Skip to content
Snippets Groups Projects
Commit 6dd3805d authored by OZGCloud's avatar OZGCloud
Browse files

OZG-2387 use latest helmchart version

parent a0091196
No related branches found
No related tags found
No related merge requests found
......@@ -137,6 +137,10 @@ pipeline {
sh 'cp ${KUBE_CONFIG} ~/.kube/config'
}
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh 'helm repo add ozg-base-apps-snapshot https://nexus.ozg-sh.de/repository/ozg-base-apps-snapshot --username ${USER} --password ${PASSWORD}'
}
sh 'helm version'
}
}
......@@ -337,9 +341,7 @@ Void checkIfNamespaceExists(String namespace) {
Void startPluto(String namespace, String values, String bezeichner) {
container("k8s") {
dir('goofy-client/apps/goofy-e2e/deployment-values/pluto') {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh "helm upgrade --install --create-namespace pluto pluto -f ${values} --set kop.bezeichner=${bezeichner} --namespace ${namespace} --version 0.12.0-SNAPSHOT" + ' --repo https://nexus.ozg-sh.de/repository/ozg-base-apps-snapshot --username ${USER} --password ${PASSWORD} --wait --wait-for-jobs'
}
sh "helm upgrade --install --create-namespace pluto ozg-base-apps-snapshot/pluto -f ${values} --set kop.bezeichner=${bezeichner} --namespace ${namespace} --version ${getLatestChartVersion('pluto').trim()} --wait --wait-for-jobs"
}
sh "kubectl rollout status statefulset/pluto-database -n ${namespace}"
......@@ -349,9 +351,7 @@ Void startPluto(String namespace, String values, String bezeichner) {
Void startGoofy(String namespace, String values, String imageTag, String bezeichner) {
container("k8s") {
dir('goofy-client/apps/goofy-e2e/deployment-values/goofy') {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh "helm upgrade --install --create-namespace goofy goofy -f ${values} --set image.tag=${imageTag} --set kop.bezeichner=${bezeichner} --namespace ${namespace} --version 0.14.0-SNAPSHOT" + ' --repo https://nexus.ozg-sh.de/repository/ozg-base-apps-snapshot --username ${USER} --password ${PASSWORD} --wait --wait-for-jobs'
}
sh "helm upgrade --install --create-namespace goofy ozg-base-apps-snapshot/goofy -f ${values} --set image.tag=${imageTag} --set kop.bezeichner=${bezeichner} --namespace ${namespace} --version ${getLatestChartVersion('goofy').trim()} --wait --wait-for-jobs"
}
createKeycloakGroups(namespace)
......@@ -360,6 +360,12 @@ Void startGoofy(String namespace, String values, String imageTag, String bezeich
}
}
String getLatestChartVersion(String chart) {
container("k8s") {
return sh (script: "helm search repo ozg-base-apps-snapshot --devel -l -o json | jq -r 'first(.[] | select((.name==\"ozg-base-apps-snapshot/${chart}\") and (.version|match(\"SNAPSHOT\$\"))) | .version)'", returnStdout: true)
}
}
String runTests(String stageName, String reportFolder) {
container("cypress") {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment