Skip to content

Commit 916000f

Browse files
s390x weekly job
1 parent 35197b4 commit 916000f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Jenkinsfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff 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}"

0 commit comments

Comments
 (0)