@@ -72,9 +72,9 @@ def generateParallelStageALL(subset, compiler, AGENT_LABELS, DOCKER_REG, IMAGE_T
7272pipeline {
7373
7474 parameters {
75- booleanParam(name : ' RUN_DOWNSTREAM' , description : ' if false skip downstream jobs' , defaultValue : true )
75+ booleanParam(name : ' RUN_DOWNSTREAM' , description : ' if false skip downstream jobs' , defaultValue : false )
7676 booleanParam(name : ' RUN_TESTS' , description : ' if false skip testing' , defaultValue : true )
77- booleanParam(name : ' RUN_BUILD' , description : ' if false skip building' , defaultValue : true )
77+ booleanParam(name : ' RUN_BUILD' , description : ' if false skip building' , defaultValue : false )
7878 string(name : ' PLATFORMS' , description : ' Default Platforms to test' , defaultValue : ' nrf9160_pca10090 nrf9160_pca10090ns nrf52_pca10040 nrf52840_pca10056' )
7979 string(name : ' jsonstr_CI_STATE' , description : ' Default State if no upstream job' ,
8080 defaultValue : INPUT_STATE )
@@ -129,7 +129,14 @@ pipeline {
129129 dir(' zephyr' ) {
130130 def BUILD_TYPE = lib_Main. getBuildType(CI_STATE . ZEPHYR )
131131 if (BUILD_TYPE == " PR" ) {
132- COMMIT_RANGE = " $CI_STATE . ZEPHYR . MERGE_BASE .. $CI_STATE . ZEPHYR . REPORT_SHA "
132+ if (CI_STATE . ZEPHYR . IS_MERGEUP ) {
133+ println ' This is a MERGE-UP PR. CI_STATE.ZEPHYR.IS_MERGEUP=' + CI_STATE . ZEPHYR . IS_MERGEUP
134+ CI_STATE . ZEPHYR . MERGEUP_BASE = sh( script : " git log --oneline --grep='\\ [nrf mergeup\\ ].*' -i -n 1 --pretty=format:'%h' | tr -d '\\ n'" , returnStdout : true )
135+ println " CI_STATE.ZEPHYR.MERGEUP_BASE = $CI_STATE . ZEPHYR . MERGEUP_BASE "
136+ COMMIT_RANGE = " $CI_STATE . ZEPHYR . MERGEUP_BASE .. $CI_STATE . ZEPHYR . REPORT_SHA "
137+ } else {
138+ COMMIT_RANGE = " $CI_STATE . ZEPHYR . MERGE_BASE .. $CI_STATE . ZEPHYR . REPORT_SHA "
139+ }
133140 COMPLIANCE_ARGS = " $COMPLIANCE_ARGS -p $CHANGE_ID -S $CI_STATE . ZEPHYR . REPORT_SHA -g"
134141 println " Building a PR [$CHANGE_ID ]: $COMMIT_RANGE "
135142 }
@@ -160,6 +167,13 @@ pipeline {
160167 }
161168 }
162169
170+ CI_STATE . ZEPHYR . IS_MERGEUP = false
171+ if (((CI_STATE . ZEPHYR . CHANGE_TITLE . toLowerCase(). contains(' mergeup' ) ) || (CI_STATE . ZEPHYR . CHANGE_TITLE . toLowerCase(). contains(' upmerge' ) )) &&
172+ ((CI_STATE . ZEPHYR . CHANGE_BRANCH . toLowerCase(). contains(' mergeup' ) ) || (CI_STATE . ZEPHYR . CHANGE_BRANCH . toLowerCase(). contains(' upmerge' ) ))) {
173+ CI_STATE . ZEPHYR . IS_MERGEUP = true
174+ println ' This is a MERGE-UP PR. CI_STATE.ZEPHYR.IS_MERGEUP=' + CI_STATE . ZEPHYR . IS_MERGEUP
175+ }
176+
163177 if (CI_STATE . ZEPHYR . RUN_TESTS ) {
164178 TestExecutionList [' compliance' ] = TestStages [" compliance" ]
165179 }
@@ -186,11 +200,13 @@ pipeline {
186200 TestExecutionList = TestExecutionList . plus(sanityCheckALLStages)
187201 }
188202
203+
204+
189205 println " TestExecutionList = $TestExecutionList "
190206
191207 }}}
192208
193- stage(' Exectuion ' ) { steps { script {
209+ stage(' Execution ' ) { steps { script {
194210 parallel TestExecutionList
195211 }}}
196212
0 commit comments