From eeebfb1b5bf98f9a5cf85e37adc6d72f0bad78ad Mon Sep 17 00:00:00 2001 From: Mattia Dal Ben Date: Fri, 6 Dec 2024 15:12:25 +0100 Subject: [PATCH 1/3] ci: skip build if only documentation files were changed --- Jenkinsfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 7f4fa36a2d..68e4342357 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,16 @@ +def boolean onlyDocumentationFilesChangedIn(String workDirectory) { + if (!env.CHANGE_TARGET) { + echo "CHANGE_TARGET not set. Skipping check" + return false + } + + def changedFiles = sh(script: "cd ${workDirectory} && git diff --name-only origin/${env.CHANGE_TARGET} origin/${env.BRANCH_NAME}", returnStdout: true).trim().split("\n") + + echo "Changed files: ${changedFiles}" // Debug + + return changedFiles && changedFiles.every { it.endsWith(".md") || it.endsWith(".txt") } +} + node { properties([ disableConcurrentBuilds(abortPrevious: true), @@ -15,6 +28,13 @@ node { } } + // Skip build if only documentation files (i.e. *.md and *.txt) have changed + if (onlyDocumentationFilesChangedIn("kura")) { + echo "Skipping build for documentation changes" + currentBuild.result = 'SUCCESS' + return + } + stage('Build') { timeout(time: 2, unit: 'HOURS') { dir("kura") { From 4fd3bf2412964f01fb2181f0de2a19daae662128 Mon Sep 17 00:00:00 2001 From: Mattia Dal Ben Date: Fri, 6 Dec 2024 15:28:34 +0100 Subject: [PATCH 2/3] docs: update README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index af05e3bc5d..6b9154718f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ Eclipse Kura™ [![GitHub Tag](https://img.shields.io/github/v/tag/eclipse/kura?label=Latest%20Tag)](https://github.com/eclipse-kura/kura/tags) [![GitHub](https://img.shields.io/github/license/eclipse/kura?label=License)](https://github.com/eclipse-kura/kura/blob/develop/LICENSE) - [![Jenkins](https://img.shields.io/jenkins/build?jobUrl=https:%2F%2Fci.eclipse.org%2Fkura%2Fjob%2Fmultibranch%2Fjob%2Fdevelop&label=Jenkins%20Build&logo=jenkins)](https://ci.eclipse.org/kura/job/multibranch/job/develop/) [![Jenkins](https://img.shields.io/jenkins/tests?compact_message&failed_label=%E2%9D%8C&jobUrl=https:%2F%2Fci.eclipse.org%2Fkura%2Fjob%2Fmultibranch%2Fjob%2Fdevelop%2F&label=Jenkins%20CI&passed_label=%E2%9C%85&skipped_label=%E2%9D%95&logo=jenkins)](https://ci.eclipse.org/kura/job/multibranch/)
From 76d4d3be02888b4c3c6a97ff7643166e0a8f86af Mon Sep 17 00:00:00 2001 From: Mattia Dal Ben Date: Fri, 6 Dec 2024 15:40:50 +0100 Subject: [PATCH 3/3] style: remove whitespaces --- kura/org.eclipse.kura.ai.triton.server/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kura/org.eclipse.kura.ai.triton.server/pom.xml b/kura/org.eclipse.kura.ai.triton.server/pom.xml index c67c167f4e..4877ec9e7f 100644 --- a/kura/org.eclipse.kura.ai.triton.server/pom.xml +++ b/kura/org.eclipse.kura.ai.triton.server/pom.xml @@ -2,13 +2,13 @@