diff --git a/Jenkinsfile b/Jenkinsfile index 684a21dbfa3a97223cb64d1e119e2d993e78e803..ef19eb36e2b4659a2a6fd8f1830d1cd46a245199 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -156,20 +156,36 @@ pipeline { script { FAILED_STAGE=env.STAGE_NAME } - container("k8s") { script { def branchName = env.BRANCH_NAME.replaceAll(/[^a-zA-Z0-9]+/, "").toLowerCase() - def namespace = 'e2e-${branchName}-dev' + def namespace = "e2e-${branchName}-dev" + + println(namespace) + + configFileProvider([configFile(fileId: 'jenkins-kuby-kubeconfig', variable: 'KUBE_CONFIG')]) { + sh 'mkdir ~/.kube' + sh 'cp ${KUBE_CONFIG} ~/.kube/config' + sh 'cat ~/.kube/config' + } - echo ${namespace} + sh 'kubectl get nodes' - withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { - sh 'helm upgrade --install --create-namespace goofy goofy --version 0.3.0-SNAPSHOT -f values.yaml --namespace ${namespace} --repo https://nexus.ozg-sh.de/repository/ozg-base-apps-snapshot --username ${USER} --password ${PASSWORD}' + dir('goofy-client/apps/goofy-e2e/deployment-values/namespace') { + sh 'kubectl apply -f values.yaml' } + + sh 'kubectl get pods -n ${namespace}' + + dir('goofy-client/apps/goofy-e2e/deployment-values/goofy') { + withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { + sh "helm --install goofy goofy --version 0.3.0-SNAPSHOT -f values.yaml --namespace ${namespace}" + ' --repo https://nexus.ozg-sh.de/repository/ozg-base-apps-snapshot --username ${USER} --password ${PASSWORD}' + } + } + + sh 'kubectl get pods -n ${namespace}' } } - // container("cypress") { // dir('goofy-client') { // sh 'npm run cypress:version' @@ -181,18 +197,6 @@ pipeline { // sh 'helm uninstall ' // } } - post { - always { - publishHTML (target: [ - allowMissing: false, - alwaysLinkToLastBuild: false, - keepAll: true, - reportDir: 'goofy-client/apps/goofy-e2e/reports', - reportFiles: 'report_einheitlicher-ansprechpartner.html', - reportName: "Goofy E2E-Tests(EA)" - ]) - } - } } // stage('E2E-Tests') { diff --git a/goofy-client/apps/goofy-e2e/deployment-values/namespace/values.yaml b/goofy-client/apps/goofy-e2e/deployment-values/namespace/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f7edae8b1bf50868dbf12f41dcc7d56718bccf90 --- /dev/null +++ b/goofy-client/apps/goofy-e2e/deployment-values/namespace/values.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: e2e-ozg1784-dev + annotations: + field.cattle.io/projectId: 'c-8g78g:p-f7nwp' + labels: + field.cattle.io/projectId: p-f7nwp