[maven] branch reproducible updated (16961b3 -> 8fe26fa)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven] branch reproducible updated (16961b3 -> 8fe26fa)

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

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


 discard 16961b3  [MNG-6799] deprecate StringSearchModelInterpolator and remove @Named
 discard 24d15c0  [MNG-6789] sisu.inject 3.3.4 produces Reproducible output
 discard 5759bc1  [MNG-6789] use packaging plugins' RB versions + plexus-metadata 2.1.0
 discard e83c117  inject buildId containing commitId into classifier for CI archive
 discard f842628  add sha512 checksum to output
 discard 8a916af  build on nodes instead of running ITs
     add 3a80ae0  [MNG-6799] deprecate StringSearchModelInterpolator and remove @Named
     add bd10f00  [MNG-6789] upgrade and configure plugins for Reproducible Builds
     new 94f936d  build on nodes instead of running ITs
     new 841886d  add sha512 checksum to output
     new 8fe26fa  inject buildId containing commitId into classifier for CI archive

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (16961b3)
            \
             N -- N -- N   refs/heads/reproducible (8fe26fa)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Reply | Threaded
Open this post in threaded view
|

[maven] 01/03: build on nodes instead of running ITs

hboutemy
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 94f936d514f7ba6649991135656723182a0f6fd7
Author: Hervé Boutemy <[hidden email]>
AuthorDate: Sun Sep 22 12:25:49 2019 +0200

    build on nodes instead of running ITs
---
 Jenkinsfile | 66 ++++++++++++++++++++++++++-----------------------------------
 1 file changed, 28 insertions(+), 38 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 5d5d998..d3cc099 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -66,7 +66,7 @@ node(jenkinsEnv.nodeSelection(osNode)) {
             }
         }
 
-        tests = resolveScm source: [$class: 'GitSCMSource', credentialsId: '', id: '_', remote: 'https://gitbox.apache.org/repos/asf/maven-integration-testing.git', traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait'], [$class: 'GitToolSCMSourceTrait', gitTool: 'Default']]], targets: [BRANCH_NAME, 'master']
+        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']
     }
 }
 
@@ -78,48 +78,38 @@ for (String os in runITsOses) {
         String mvnName = jenkinsEnv.mvnFromVersion(os, "${runITsMvn}")
         echo "OS: ${os} JDK: ${jdk} => Label: ${osLabel} JDK: ${jdkName}"
 
+        def cmd = [
+          'mvn',
+          'verify',
+          '-DskipTests', '-Drat.skip'
+        ]
+        if (jdk == '7') {
+          // Java 7u80 has TLS 1.2 disabled by default: need to explicitely enable
+          cmd += '-Dhttps.protocols=TLSv1.2'
+        }
+
         String stageId = "${os}-jdk${jdk}"
-        String stageLabel = "Run ITs ${os.capitalize()} Java ${jdk}"
+        String stageLabel = "Rebuild ${os.capitalize()} Java ${jdk}"
         runITsTasks[stageId] = {
             node(jenkinsEnv.nodeSelection(osLabel)) {
+                def WORK_DIR=pwd()
                 stage("${stageLabel}") {
                     echo "NODE_NAME = ${env.NODE_NAME}"
-                    // on Windows, need a short path or we hit 256 character limit for paths
-                    // using EXECUTOR_NUMBER guarantees that concurrent builds on same agent
-                    // will not trample each other plus workaround for JENKINS-52657
-                    dir(isUnix() ? 'test' : "c:\\mvn-it-${EXECUTOR_NUMBER}.tmp") {
-                        def WORK_DIR=pwd()
-                        checkout tests
-                        if (isUnix()) {
-                            sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo"
-                        } else {
-                            bat "if exist it-local-repo rmdir /s /q it-local-repo"
-                            bat "if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
-                        }
-                        unstash 'dist'
-                        try {
-                            withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
-                                junitPublisher(ignoreAttachments: false)
-                            ]) {
-                                String cmd = "${runITscommand} -DmavenDistro=$WORK_DIR/apache-maven-dist.zip -Dmaven.test.failure.ignore=true"
-                                if (stageId.endsWith('-jdk7')) {
-                                    // Java 7u80 has TLS 1.2 disabled by default: need to explicitly enable
-                                    cmd = "${cmd} -Dhttps.protocols=TLSv1.2"
-                                }
-
-                                if (isUnix()) {
-                                    sh 'df -hT'
-                                    sh "${cmd}"
-                                } else {
-                                    bat 'wmic logicaldisk get size,freespace,caption'
-                                    bat "${cmd}"
-                                }
-                            }
-                        } finally {
-                            archiveDirs(stageId, ['core-it-suite-logs':'core-it-suite/target/test-classes',
-                                                  'core-it-suite-reports':'core-it-suite/target/surefire-reports'])
-                            deleteDir() // clean up after ourselves to reduce disk space
-                        }
+                    checkout tests
+                    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()
+                    ]) {
+                      if (isUnix()) {
+                        sh cmd.join(' ')
+                      } else {
+                        bat cmd.join(' ')
+                      }
                     }
                 }
             }

Reply | Threaded
Open this post in threaded view
|

[maven] 02/03: add sha512 checksum to output

hboutemy
In reply to this post by hboutemy
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 841886d23defa993ba6116d631c6b71f92415427
Author: Hervé Boutemy <[hidden email]>
AuthorDate: Sat Sep 21 20:09:02 2019 +0200

    add sha512 checksum to output
---
 apache-maven/pom.xml | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index edbec83..83aab4e 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -184,11 +184,42 @@ under the License.
             <configuration>
               <descriptors>
                 <descriptor>src/main/assembly/bin.xml</descriptor>
+                <descriptor>src/main/assembly/src.xml</descriptor>
               </descriptors>
             </configuration>
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>net.nicoulaj.maven.plugins</groupId>
+        <artifactId>checksum-maven-plugin</artifactId>
+        <version>1.8</version>
+        <executions>
+          <execution>
+            <id>source-release-checksum</id>
+            <goals>
+              <goal>files</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <algorithms>
+            <algorithm>SHA-512</algorithm>
+          </algorithms>
+          <fileSets>
+            <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}-src.zip</include>
+                <include>${project.artifactId}-${project.version}-src.tar.gz</include>
+              </includes>
+            </fileSet>
+          </fileSets>
+          <failIfNoFiles>true</failIfNoFiles>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

Reply | Threaded
Open this post in threaded view
|

[maven] 03/03: inject buildId containing commitId into classifier for CI archive

hboutemy
In reply to this post by hboutemy
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 8fe26fa8398caa286835289867b924bd54303392
Author: Hervé Boutemy <[hidden email]>
AuthorDate: Mon Sep 23 08:16:29 2019 +0200

    inject buildId containing commitId into classifier for CI archive
---
 Jenkinsfile                            | 56 ++++++----------------------------
 apache-maven/pom.xml                   |  8 ++---
 apache-maven/src/main/assembly/bin.xml |  2 +-
 apache-maven/src/main/assembly/src.xml |  2 +-
 pom.xml                                |  1 +
 5 files changed, 17 insertions(+), 52 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index d3cc099..dfc49a3 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -26,50 +26,9 @@ def runITsOses = ['linux', 'windows']
 def runITsJdks = ['7', '8', '11','12']
 def runITsMvn = '3.6.0'
 def runITscommand = "mvn clean install -Prun-its,embedded -B -U -V" // -DmavenDistro=... -Dmaven.test.failure.ignore=true
-def tests
 
 try {
 
-def osNode = jenkinsEnv.labelForOS(buildOs)
-node(jenkinsEnv.nodeSelection(osNode)) {
-    dir('build') {
-        stage('Checkout') {
-            checkout scm
-        }
-
-        def WORK_DIR=pwd()
-        def MAVEN_GOAL='verify'
-
-        stage('Configure deploy') {
-           if (env.BRANCH_NAME == 'master'){
-               MAVEN_GOAL='deploy'
-           }
-        }
-
-        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']
-    }
-}
-
 Map runITsTasks = [:]
 for (String os in runITsOses) {
     for (def jdk in runITsJdks) {
@@ -79,7 +38,7 @@ for (String os in runITsOses) {
         echo "OS: ${os} JDK: ${jdk} => Label: ${osLabel} JDK: ${jdkName}"
 
         def cmd = [
-          'mvn',
+          'mvn', 'clean',
           'verify',
           '-DskipTests', '-Drat.skip'
         ]
@@ -87,15 +46,16 @@ for (String os in runITsOses) {
           // Java 7u80 has TLS 1.2 disabled by default: need to explicitely enable
           cmd += '-Dhttps.protocols=TLSv1.2'
         }
+        cmd += "-DbuildId=${os}-jdk${jdk}"
 
         String stageId = "${os}-jdk${jdk}"
-        String stageLabel = "Rebuild ${os.capitalize()} Java ${jdk}"
+        String stageLabel = "${os.capitalize()} Java ${jdk}"
         runITsTasks[stageId] = {
             node(jenkinsEnv.nodeSelection(osLabel)) {
                 def WORK_DIR=pwd()
                 stage("${stageLabel}") {
                     echo "NODE_NAME = ${env.NODE_NAME}"
-                    checkout tests
+                    checkout scm
                     withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/.repository", options:[
                         artifactsPublisher(disabled: false),
                         junitPublisher(ignoreAttachments: false),
@@ -106,9 +66,13 @@ for (String os in runITsOses) {
                         pipelineGraphPublisher()
                     ]) {
                       if (isUnix()) {
-                        sh cmd.join(' ')
+                        String commitId = sh(returnStdout: true, script: 'git rev-parse HEAD')
+                        sh cmd.join(' ') + "-${commitId}"
                       } else {
-                        bat cmd.join(' ')
+                        String commitId = bat(returnStdout: true, script: 'git rev-parse HEAD').tokenize(' ')[-1].trim()
+                        echo "commitId = ${commitId}"
+                        echo "command = " + cmd.join(' ') + "-${commitId}"
+                        bat cmd.join(' ') + "-${commitId}"
                       }
                     }
                 }
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 83aab4e..48fed66 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -210,10 +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}-src.zip</include>
-                <include>${project.artifactId}-${project.version}-src.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 9f43a0a..45fc78b 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>
diff --git a/pom.xml b/pom.xml
index 46f4926..13c20f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,6 +77,7 @@ under the License.
     <checkstyle.violation.ignore>None</checkstyle.violation.ignore>
     <checkstyle.excludes>**/package-info.java</checkstyle.excludes>
     <project.build.outputTimestamp>2019-11-07T12:32:18Z</project.build.outputTimestamp>
+    <buildId>${os.name}-jdk${java.version}</buildId>
   </properties>
 
   <modules>