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

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

commit 7db2063696c2abef3b89f46c1c04146f757de511
Author: Robert Munteanu <[email protected]>
AuthorDate: Wed Sep 9 14:42:17 2026 +0200

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

diff --git a/Jenkinsfile b/Jenkinsfile
index 8fbea249..a5d82fa7 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -79,6 +79,12 @@ 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 %GIT_COMMIT%').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 
"$GIT_COMMIT"').trim()
+                }
+                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 dd187560..b29b4718 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><!-- Tycho 
requires Java 17 -->
                <!-- must match the version being referenced in the pom.xml of 
filevault -->

Reply via email to