From 24362ca3cf75c128c528580a1e5dbf8bae41bbc1 Mon Sep 17 00:00:00 2001 From: facundomoyano Date: Wed, 17 Jan 2024 16:56:31 -0300 Subject: [PATCH] Hotfix ETO-277: add main branch condition to stages --- pipelines/unittests/JenkinsfileOracle | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pipelines/unittests/JenkinsfileOracle b/pipelines/unittests/JenkinsfileOracle index 57adf732..3653a098 100644 --- a/pipelines/unittests/JenkinsfileOracle +++ b/pipelines/unittests/JenkinsfileOracle @@ -106,7 +106,9 @@ spec: stages { stage('Build Environment') { when { - branch 'develop' + expression { + env.BRANCH_NAME == 'develop' || env.BRANCH_NAME == 'main' + } } steps { container('compiler') { @@ -191,7 +193,9 @@ spec: stage ('Web Service Test Suite'){ when { allOf { - branch 'develop' + expression { + env.BRANCH_NAME == 'develop' || env.BRANCH_NAME == 'main' + } expression { env.STATUSBUILD == "1" } @@ -240,7 +244,9 @@ spec: stage('Clean Database') { when { allOf { - branch 'develop' + expression { + env.BRANCH_NAME == 'develop' || env.BRANCH_NAME == 'main' + } expression { env.STATUSBUILD == "1" } @@ -275,7 +281,9 @@ spec: stage ('Standalone Test Suite'){ when { allOf { - branch 'develop' + expression { + env.BRANCH_NAME == 'develop' || env.BRANCH_NAME == 'main' + } expression { env.STATUSBUILD == "1" } @@ -322,7 +330,9 @@ spec: stage ('Spock Test') { when { allOf { - branch 'develop' + expression { + env.BRANCH_NAME == 'develop' || env.BRANCH_NAME == 'main' + } expression { env.STATUSBUILD == "1" } @@ -369,7 +379,7 @@ spec: always { container('compiler') { script { - if (env.BRANCH_NAME == 'develop') { + if (env.BRANCH_NAME == 'develop' || env.BRANCH_NAME == 'main') { dir('etendo_core') { sh "./gradlew --stop" }