File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ pipeline {
2727 }
2828 }
2929
30+ triggers {
31+ // Run s390x builds every Sunday at midnight
32+ cron(' H 0 * * 0' )
33+ }
34+
3035 tools {
3136 // ... tell Jenkins what java version, maven version or other tools are required ...
3237 maven ' maven_3_latest'
@@ -50,6 +55,20 @@ pipeline {
5055 }
5156
5257 stages {
58+ stage(' Guard' ) {
59+ steps {
60+ script {
61+ // Allow s390x builds only when triggered by the Sunday cron
62+ if (params. nodeLabel == ' s390x' &&
63+ currentBuild. rawBuild. getCause(hudson.triggers.TimerTrigger.TimerTriggerCause ) == null ) {
64+ echo " Skipping s390x build (not Sunday cron trigger)"
65+ currentBuild. result = ' NOT_BUILT'
66+ error(" Aborting pipeline for non-scheduled s390x run" )
67+ }
68+ }
69+ }
70+ }
71+
5372 stage(' Initialization' ) {
5473 steps {
5574 echo " running on ${ env.NODE_NAME} "
You can’t perform that action at this time.
0 commit comments