summaryrefslogtreecommitdiff
path: root/vars/buildPackage.groovy
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-05 09:55:27 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-05 10:06:30 +0200
commit8a6a04fe78dfea724aa807af8911f7210562e59a (patch)
tree0ea487b6230b7953c3c12fec6aaa2ff5c73c05ad /vars/buildPackage.groovy
parentff5df7189b8913c227695ee738198c90e0028b01 (diff)
downloadvyos-build-8a6a04fe78dfea724aa807af8911f7210562e59a.tar.gz
vyos-build-8a6a04fe78dfea724aa807af8911f7210562e59a.zip
Jenkins: re-add erroneously removed when build conditions
Debian packages should only be build if a file in the requested subfolder changes (like a version upgrade) or if explicitly reuested by the user. VyOS ISO generation should only be run once a night by the CI if triggered by the timer, or on explicit user request.
Diffstat (limited to 'vars/buildPackage.groovy')
-rw-r--r--vars/buildPackage.groovy14
1 files changed, 9 insertions, 5 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy
index ca901481..fde5e59a 100644
--- a/vars/buildPackage.groovy
+++ b/vars/buildPackage.groovy
@@ -37,11 +37,6 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
agent {
label "ec2_amd64"
}
- environment {
- // get relative directory path to Jenkinsfile
- BASE_DIR = getJenkinsfilePath()
- CHANGESET_DIR = getChangeSetPath()
- }
steps {
script {
// create container name on demand
@@ -62,6 +57,15 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
}
}
stage('Build Code') {
+ when {
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ changeset pattern: getChangeSetPath()
+ expression { isPullRequest() }
+ triggeredBy cause: "UserIdCause"
+ }
+ }
parallel {
stage('amd64') {
agent {