Skip to content
Snippets Groups Projects
Commit 10e65776 authored by OZGCloud's avatar OZGCloud
Browse files

E2E: tiny JenkinsFile cleanup

parent 52be2987
No related branches found
No related tags found
No related merge requests found
...@@ -55,9 +55,7 @@ pipeline { ...@@ -55,9 +55,7 @@ pipeline {
stage('Check branch') { stage('Check branch') {
steps { steps {
script { script {
if (env.BRANCH_NAME == 'PR-489' || isMasterBranch()) { if (!isMasterBranch()) {
} else {
echo "Branchname "+env.BRANCH_NAME+" does not match, skipping e2e tests" echo "Branchname "+env.BRANCH_NAME+" does not match, skipping e2e tests"
SKIP_RUN = true SKIP_RUN = true
} }
...@@ -339,14 +337,6 @@ String getUpstreamProjects() { ...@@ -339,14 +337,6 @@ String getUpstreamProjects() {
return "" return ""
} }
Boolean isReleaseBranch() {
return env.BRANCH_NAME == 'release'
}
Boolean isMasterBranch() {
return env.BRANCH_NAME == 'master'
}
def cloneGitopsRepo() { def cloneGitopsRepo() {
final email = "jenkins@ozg-sh.de" final email = "jenkins@ozg-sh.de"
final name = "jenkins" final name = "jenkins"
...@@ -398,6 +388,10 @@ Void initEnvAlfaDefaultVersions() { ...@@ -398,6 +388,10 @@ Void initEnvAlfaDefaultVersions() {
env.ALFA_HELM_REPO_URL = getHelmRepoUrl() env.ALFA_HELM_REPO_URL = getHelmRepoUrl()
} }
Boolean isMasterBranch() {
return env.BRANCH_NAME == 'master'
}
String getHelmRepoUrl() { String getHelmRepoUrl() {
if (isReleaseBranch()) { if (isReleaseBranch()) {
return "https://nexus.ozg-sh.de/repository/ozg-base-apps" return "https://nexus.ozg-sh.de/repository/ozg-base-apps"
...@@ -724,6 +718,10 @@ String getElementRoomId() { ...@@ -724,6 +718,10 @@ String getElementRoomId() {
return masterRoomId return masterRoomId
} }
Boolean isReleaseBranch() {
return env.BRANCH_NAME == 'release'
}
String getElementAccessToken() { String getElementAccessToken() {
withCredentials([string(credentialsId: 'element-login-json', variable: 'LOGIN_JSON')]) { withCredentials([string(credentialsId: 'element-login-json', variable: 'LOGIN_JSON')]) {
return readJSON ( text: sh (script: '''curl -XPOST -d \"$LOGIN_JSON\" https://matrix.ozg-sh.de/_matrix/client/v3/login''', returnStdout: true)).access_token return readJSON ( text: sh (script: '''curl -XPOST -d \"$LOGIN_JSON\" https://matrix.ozg-sh.de/_matrix/client/v3/login''', returnStdout: true)).access_token
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment