summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2025-07-10 15:22:07 +0200
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2025-07-10 15:22:07 +0200
commita8e3d474bc57cc5cb67ac971b56d7004b0ae6c81 (patch)
tree6c92075b915fa8b0ec5ab2cd555fb78cf5a32f6d /contrib
parent0b5e1a8f1c082253b29034f634240373359212f6 (diff)
chore: refactor github actions and Jenkinsfile to only execute when required
Diffstat (limited to 'contrib')
-rw-r--r--contrib/depends/Jenkinsfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/depends/Jenkinsfile b/contrib/depends/Jenkinsfile
index 7b73319..e7661af 100644
--- a/contrib/depends/Jenkinsfile
+++ b/contrib/depends/Jenkinsfile
@@ -25,7 +25,33 @@ pipeline {
}
stages {
+ stage('Check Changes') {
+ agent any
+ steps {
+ script {
+ def changes = sh(
+ script: "git diff --name-only HEAD~1 HEAD | grep '^contrib/depends' || echo 'NO_CHANGES'",
+ returnStdout: true
+ ).trim()
+
+ if (changes == 'NO_CHANGES') {
+ echo "No changes detected in contrib/depends directory. Skipping build."
+ currentBuild.result = 'NOT_BUILT'
+ return
+ } else {
+ echo "Changes detected in contrib/depends directory:"
+ echo changes
+ }
+ }
+ }
+ }
+
stage('Build Dependencies') {
+ when {
+ not {
+ equals expected: 'NOT_BUILT', actual: currentBuild.result
+ }
+ }
parallel {
stage('Linux Builds') {
agent {