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

OZG-7121 adjust Service port name

parent 5d5d2638
Branches
Tags
1 merge request!3Resolve "xta-test-server helm-chart mit Deployment und Keystore-Secrets/Certificate-Resources"
Checking pipeline status
...@@ -256,19 +256,21 @@ String getElementAccessToken() { ...@@ -256,19 +256,21 @@ 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
}
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 != '') { if (result != '') {
error(result) error(result)
} }
} }
} }
String getHelmChartRepository(){
if (env.BRANCH_NAME == 'release') {
return 'ozg-base-apps'
}
return 'ozg-base-apps-snapshot'
}
}
Void loginToDockerRepo() { Void loginToDockerRepo() {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}' sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}'
...@@ -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