You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/10/20 12:14:04 UTC

[maven] 10/13: inject buildId into classifier for CI archive

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

hboutemy pushed a commit to branch reproducible
in repository https://gitbox.apache.org/repos/asf/maven.git

commit dba6095c549957b13510a6bdbbd559c3be7d9e3e
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Mon Sep 23 08:16:29 2019 +0200

    inject buildId into classifier for CI archive
---
 Jenkinsfile                            | 24 ++----------------------
 apache-maven/pom.xml                   |  8 ++++++--
 apache-maven/src/main/assembly/bin.xml |  2 +-
 apache-maven/src/main/assembly/src.xml |  2 +-
 4 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index d3cc099..023179b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -46,26 +46,6 @@ node(jenkinsEnv.nodeSelection(osNode)) {
            }
         }
 
-        stage('Build / Unit Test') {
-            String jdkName = jenkinsEnv.jdkFromVersion(buildOs, buildJdk)
-            String mvnName = jenkinsEnv.mvnFromVersion(buildOs, buildMvn)
-            withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/.repository", options:[
-                artifactsPublisher(disabled: false),
-                junitPublisher(ignoreAttachments: false),
-                findbugsPublisher(disabled: false),
-                openTasksPublisher(disabled: false),
-                dependenciesFingerprintPublisher(),
-                invokerPublisher(),
-                pipelineGraphPublisher()
-            ]) {
-                sh "mvn clean ${MAVEN_GOAL} -B -U -e -fae -V -Dmaven.test.failure.ignore=true"
-            }
-            dir ('apache-maven/target') {
-                sh "mv apache-maven-*-bin.zip apache-maven-dist.zip"
-                stash includes: 'apache-maven-dist.zip', name: 'dist'
-            }
-        }
-
         tests = resolveScm source: [$class: 'GitSCMSource', credentialsId: '', id: '_', remote: 'https://gitbox.apache.org/repos/asf/maven.git', traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait'], [$class: 'GitToolSCMSourceTrait', gitTool: 'Default']]], targets: [BRANCH_NAME, 'master']
     }
 }
@@ -79,9 +59,9 @@ for (String os in runITsOses) {
         echo "OS: ${os} JDK: ${jdk} => Label: ${osLabel} JDK: ${jdkName}"
 
         def cmd = [
-          'mvn',
+          'mvn', 'clean',
           'verify',
-          '-DskipTests', '-Drat.skip'
+          '-DskipTests', '-Drat.skip', "-DbuildId=${os}-jdk${jdk}"
         ]
         if (jdk == '7') {
           // Java 7u80 has TLS 1.2 disabled by default: need to explicitely enable
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index ef6ce9b..48fed66 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -184,6 +184,7 @@ under the License.
             <configuration>
               <descriptors>
                 <descriptor>src/main/assembly/bin.xml</descriptor>
+                <descriptor>src/main/assembly/src.xml</descriptor>
               </descriptors>
             </configuration>
           </execution>
@@ -192,6 +193,7 @@ under the License.
       <plugin>
         <groupId>net.nicoulaj.maven.plugins</groupId>
         <artifactId>checksum-maven-plugin</artifactId>
+        <version>1.8</version>
         <executions>
           <execution>
             <id>source-release-checksum</id>
@@ -208,8 +210,10 @@ under the License.
             <fileSet>
               <directory>${project.build.directory}</directory>
               <includes>
-                <include>${project.artifactId}-${project.version}-bin.zip</include>
-                <include>${project.artifactId}-${project.version}-bin.tar.gz</include>
+                <include>${project.artifactId}-${project.version}-bin-${buildId}.zip</include>
+                <include>${project.artifactId}-${project.version}-bin-${buildId}.tar.gz</include>
+                <include>${project.artifactId}-${project.version}-src-${buildId}.zip</include>
+                <include>${project.artifactId}-${project.version}-src-${buildId}.tar.gz</include>
               </includes>
             </fileSet>
           </fileSets>
diff --git a/apache-maven/src/main/assembly/bin.xml b/apache-maven/src/main/assembly/bin.xml
index a04557d..85c02db 100644
--- a/apache-maven/src/main/assembly/bin.xml
+++ b/apache-maven/src/main/assembly/bin.xml
@@ -19,7 +19,7 @@ under the License.
 
 <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
-  <id>bin</id>
+  <id>bin-${buildId}</id>
   <formats>
     <format>zip</format>
     <format>tar.gz</format>
diff --git a/apache-maven/src/main/assembly/src.xml b/apache-maven/src/main/assembly/src.xml
index 327ed52..6ca2550 100644
--- a/apache-maven/src/main/assembly/src.xml
+++ b/apache-maven/src/main/assembly/src.xml
@@ -19,7 +19,7 @@ under the License.
 
 <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
-  <id>src</id>
+  <id>src-${buildId}</id>
   <formats>
     <format>zip</format>
     <format>tar.gz</format>