You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2026/09/17 12:40:17 UTC

(sling-ide-tooling) branch master updated: SLING-13332 - Set build qualifiers based on git HEAD commit for nightly builds (#61)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git


The following commit(s) were added to refs/heads/master by this push:
     new f25a936b SLING-13332 - Set build qualifiers based on git HEAD commit for nightly builds (#61)
f25a936b is described below

commit f25a936b63cb904a476421c8d6cd0323a6c97490
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 17 14:40:13 2026 +0200

    SLING-13332 - Set build qualifiers based on git HEAD commit for nightly builds (#61)
---
 Jenkinsfile           | 7 +++++++
 shared/parent/pom.xml | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 86f0697a..3afce389 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -79,6 +79,13 @@ def generateStages(String os, def mvnVersion, def javaVersion) {
     		stage("[$prefix] Clone") {
 	    		echo "Running on node ${env.NODE_NAME}"
 	    		checkout scm
+                if (isWindows) {
+                    env.BUILD_QUALIFIER = bat(returnStdout: true, script: '@set TZ=UTC&& git show -s --format=%%cd-%%h --date=format-local:%%Y%%m%%d%%H%%M%%S HEAD').trim()
+                } else {
+                    env.BUILD_QUALIFIER = sh(returnStdout: true, script: 'TZ=UTC git show -s --format=%cd-%h --date=format-local:%Y%m%d%H%M%S HEAD').trim()
+                }
+                echo "Using build qualifier ${env.BUILD_QUALIFIER}"
+                env.MAVEN_ARGS = "${env.MAVEN_ARGS ?: ''} -Dbuild.qualifier=${env.BUILD_QUALIFIER} -DforceContextQualifier=${env.BUILD_QUALIFIER}".trim()
 	    	}
 	        stages.each { name, body ->
 	            stage(name) {
diff --git a/shared/parent/pom.xml b/shared/parent/pom.xml
index e6be44cd..cb529ff5 100644
--- a/shared/parent/pom.xml
+++ b/shared/parent/pom.xml
@@ -49,9 +49,8 @@
 # (https://vogella.com/blog/getting-started-with-osgi-declarative-services-2024/#interlude-bundle-activationpolicy-lazy)
 Bundle-ActivationPolicy: lazy
 
-# Give snapshot bundles a unique OSGi version per build so p2 does not reuse stale pooled artifacts.
-# Keep the qualifier format aligned with the Tycho-built Eclipse bundles.
--snapshot: ${tstamp;yyyyMMddHHmm}
+# CI overrides this with the ordered Git commit qualifier used by Tycho.
+-snapshot: ${build.qualifier}
                                  </bnd>
                              </configuration>
                          </execution>
@@ -147,6 +146,7 @@ Bundle-ActivationPolicy: lazy
     </dependencyManagement>
     
     <properties>
+		<build.qualifier>${tstamp;yyyyMMddHHmm}</build.qualifier>
 		<sling.java.version>11</sling.java.version>
 		<minimalJavaBuildVersion>17</minimalJavaBuildVersion>
 		<!-- must match the version being referenced in the pom.xml of filevault -->