@@ -349,8 +349,12 @@ pipeline{
349349 }
350350 stage(' rh7-singlenode' ){
351351 when {
352- branch ' develop'
353- }
352+ expression{
353+ props = readProperties file :' data-hub/pipeline.properties' ;
354+ println (props[' ExecutionBranch' ])
355+ return (env. BRANCH_NAME == props[' ExecutionBranch' ])
356+ }
357+ }
354358 agent { label ' dhfLinuxAgent' }
355359 steps{
356360 script{
@@ -435,8 +439,11 @@ pipeline{
435439 }
436440 stage(' Linux Core Parallel Execution' ){
437441 when {
438- branch props[' ExecutionBranch' ]
439- beforeAgent true
442+ expression{
443+ props = readProperties file :' data-hub/pipeline.properties' ;
444+ println (props[' ExecutionBranch' ])
445+ return (env. BRANCH_NAME == props[' ExecutionBranch' ])
446+ }
440447 }
441448 parallel{
442449 stage(' rh7_cluster_10.0-Nightly' ){
@@ -527,8 +534,11 @@ pipeline{
527534 }
528535 stage(' example projects parallel' ){
529536 when {
530- branch props[' ExecutionBranch' ]
531- beforeAgent true
537+ expression{
538+ props = readProperties file :' data-hub/pipeline.properties' ;
539+ println (props[' ExecutionBranch' ])
540+ return (env. BRANCH_NAME == props[' ExecutionBranch' ])
541+ }
532542 }
533543 parallel{
534544 stage(' dh5-example' ){
@@ -685,8 +695,11 @@ pipeline{
685695 }
686696 stage(' quick start linux parallel' ){
687697 when {
688- branch props[' ExecutionBranch' ]
689- beforeAgent true
698+ expression{
699+ props = readProperties file :' data-hub/pipeline.properties' ;
700+ println (props[' ExecutionBranch' ])
701+ return (env. BRANCH_NAME == props[' ExecutionBranch' ])
702+ }
690703 }
691704 parallel{
692705 stage(' qs_rh7_90-nightly' ){
@@ -761,8 +774,11 @@ pipeline{
761774 }
762775 stage(' Windows Core Parallel' ){
763776 when {
764- branch props[' ExecutionBranch' ]
765- beforeAgent true
777+ expression{
778+ props = readProperties file :' data-hub/pipeline.properties' ;
779+ println (props[' ExecutionBranch' ])
780+ return (env. BRANCH_NAME == props[' ExecutionBranch' ])
781+ }
766782 }
767783 parallel{
768784 stage(' w12_SN_9.0-Nightly' ){
@@ -874,8 +890,11 @@ pipeline{
874890 }
875891 stage(' Merge PR to Release Branch' ){
876892 when {
877- branch ' develop'
878- beforeAgent true
893+ expression{
894+ props = readProperties file :' data-hub/pipeline.properties' ;
895+ println (props[' ExecutionBranch' ])
896+ return (env. BRANCH_NAME == props[' ExecutionBranch' ])
897+ }
879898 }
880899 agent {label ' dhmaster' }
881900 steps{
@@ -919,8 +938,11 @@ pipeline{
919938 }
920939 stage(' Sanity Tests' ){
921940 when {
922- branch props[' ReleaseBranch' ]
923- beforeAgent true
941+ expression{
942+ props = readProperties file :' data-hub/pipeline.properties' ;
943+ println (props[' ExecutionBranch' ])
944+ return (env. BRANCH_NAME == props[' ReleaseBranch' ])
945+ }
924946 }
925947 agent { label ' dhfLinuxAgent' }
926948 steps{
0 commit comments