Browse Source

Run only one concurrent sdks archive and osx pgk build on main in CI

Alexander Köplinger 4 years ago
parent
commit
24f07752ac
2 changed files with 2 additions and 14 deletions
  1. 1 7
      scripts/ci/pipeline/osx-package.groovy
  2. 1 7
      scripts/ci/pipeline/sdks-archive.groovy

+ 1 - 7
scripts/ci/pipeline/osx-package.groovy

@@ -11,14 +11,8 @@ utils = null
 
 if (monoBranch == 'main') {
     properties([ /* compressBuildLog() */  // compression is incompatible with JEP-210 right now
-                pipelineTriggers([cron('0 3 * * *')])
+                disableConcurrentBuilds()
     ])
-
-    // multi-branch pipelines still get triggered for each commit, skip these builds on main by checking whether this build was timer-triggered or manually triggered
-    if (currentBuild.getBuildCauses('hudson.triggers.TimerTrigger$TimerTriggerCause').size() == 0 && currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause').size() == 0) {
-        echo "Skipping per-commit build on main."
-        return
-    }
 }
 
 try {

+ 1 - 7
scripts/ci/pipeline/sdks-archive.groovy

@@ -4,14 +4,8 @@ jobName = env.JOB_NAME.split('/').first()
 
 if (monoBranch == 'main') {
     properties([ /* compressBuildLog() */  // compression is incompatible with JEP-210 right now
-                pipelineTriggers([cron('0 3 * * *')])
+                disableConcurrentBuilds()
     ])
-
-    // multi-branch pipelines still get triggered for each commit, skip these builds on main by checking whether this build was timer-triggered or manually triggered
-    if (currentBuild.getBuildCauses('hudson.triggers.TimerTrigger$TimerTriggerCause').size() == 0 && currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause').size() == 0) {
-        echo "Skipping per-commit build on main."
-        return
-    }
 }
 
 parallel (