Skip to content
Snippets Groups Projects
Commit 6c7376fa authored by Martin's avatar Martin
Browse files

OZG-7121 adjust Service port name

parent 5d5d2638
No related branches found
No related tags found
1 merge request!3Resolve "xta-test-server helm-chart mit Deployment und Keystore-Secrets/Certificate-Resources"
Pipeline #1151 failed
...@@ -256,16 +256,18 @@ String getElementAccessToken() { ...@@ -256,16 +256,18 @@ String getElementAccessToken() {
Void deployHelmChart(String helmChartVersion) { Void deployHelmChart(String helmChartVersion) {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]){ withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]){
if (env.BRANCH_NAME == 'release') { result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=''' + getHelmChartRepository() + ''' -F file=@xta-test-server-'''+helmChartVersion+'''.tgz''', returnStdout: true
result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps -F file=@xta-test-server-'''+helmChartVersion+'''.tgz''', returnStdout: true if (result != '') {
error(result)
}
} }
else {
result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot -F file=@xta-test-server-'''+helmChartVersion+'''.tgz''', returnStdout: true
} }
if (result != '') { String getHelmChartRepository(){
error(result) if (env.BRANCH_NAME == 'release') {
return 'ozg-base-apps'
} }
return 'ozg-base-apps-snapshot'
} }
} }
...@@ -286,11 +288,12 @@ String buildVersionName() { ...@@ -286,11 +288,12 @@ String buildVersionName() {
Void tagAndPushDockerImage(String newTag){ Void tagAndPushDockerImage(String newTag){
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh "chmod +x script/push-docker-image.sh"
sh """ sh """
export DOCKER_USER=${USER} export DOCKER_USER=${USER}
export DOCKER_PASSWORD=${PASSWORD} export DOCKER_PASSWORD=${PASSWORD}
export BRANCH_NAME=${env.BRANCH_NAME} export BRANCH_NAME=${env.BRANCH_NAME}
./tag_and_push_docker_image.sh ${newTag} ${getPomVersion()} ./script/push-docker-image.sh ${newTag} ${getPomVersion()}
""" """
} }
} }
......
...@@ -35,7 +35,7 @@ spec: ...@@ -35,7 +35,7 @@ spec:
- name: 8080tcp1 - name: 8080tcp1
port: 8080 port: 8080
protocol: TCP protocol: TCP
- name: 8080tcp1 - name: 8443tcp1
port: 8443 port: 8443
protocol: TCP protocol: TCP
- name: metrics - name: metrics
......
...@@ -55,7 +55,7 @@ tests: ...@@ -55,7 +55,7 @@ tests:
- contains: - contains:
path: spec.ports path: spec.ports
content: content:
name: 8080tcp1 name: 8443tcp1
port: 8443 port: 8443
protocol: TCP protocol: TCP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment