diff --git a/Jenkinsfile b/Jenkinsfile index 7f4fa36a2d..3ea1e6054e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,15 @@ +def onlyDocsChanged() { + if (!env.CHANGE_TARGET) { + echo "CHANGE_TARGET not set. Skipping check" + return false + } + + def changedFiles = currentBuild.changeSets.collect { it.items }.flatten().collect { it.affectedPaths } + echo "Changed files: ${changedFiles}" // Debug + + return changedFiles.every { it.endsWith(".md") || it.endsWith(".txt") } +} + node { properties([ disableConcurrentBuilds(abortPrevious: true), @@ -15,6 +27,13 @@ node { } } + // Skip build if only documentation files (i.e. *.md and *.txt) have changed + if (onlyDocsChanged()) { + echo "Skipping build for documentation changes" + currentBuild.result = 'SUCCESS' + return + } + stage('Build') { timeout(time: 2, unit: 'HOURS') { dir("kura") { diff --git a/kura/javaConfig.json b/kura/javaConfig.json new file mode 100644 index 0000000000..c53f2a39b7 --- /dev/null +++ b/kura/javaConfig.json @@ -0,0 +1,6 @@ +{ + "projects": [ + "org.eclipse.kura.ai.triton.server" + ], + "targetPlatform": [] +} \ No newline at end of file