netbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sk...@apache.org
Subject [netbeans-jenkins-lib] branch master updated: New Layout and zip customization
Date Fri, 27 Sep 2019 09:24:23 GMT
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-jenkins-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new 12a0535  New Layout and zip customization
     new c56d902  Merge pull request #3 from ebarboni/layout
12a0535 is described below

commit 12a0535b31b25367f0e67bcee6f750cd83ddb2a0
Author: Eric Barboni <skygo@apache.org>
AuthorDate: Thu Sep 26 16:00:02 2019 +0200

    New Layout and zip customization
---
 vars/asfMainNetBeansBuild.groovy | 74 +++++++++++++++++++++++++++++-----------
 1 file changed, 55 insertions(+), 19 deletions(-)

diff --git a/vars/asfMainNetBeansBuild.groovy b/vars/asfMainNetBeansBuild.groovy
index 0bd98d0..f0b02ac 100644
--- a/vars/asfMainNetBeansBuild.groovy
+++ b/vars/asfMainNetBeansBuild.groovy
@@ -29,6 +29,7 @@ def call(Map params = [:]) {
     def jdktool = ""
     def myMaven=""
     def version=""
+    def rmversion=""
     def mavenVersion=""
     pipeline {
         options {
@@ -46,16 +47,22 @@ def call(Map params = [:]) {
                         sh 'curl "https://gitbox.apache.org/repos/asf?p=netbeans-jenkins-lib.git;a=blob_plain;f=meta/netbeansrelease.json"
-o netbeansrelease.json'
                         def releaseInformation = readJSON file: 'netbeansrelease.json'
                         sh 'rm -f netbeansrelease.json'
-                        if (!releaseInformation[env.BRANCH_NAME]) {
+                        def branch = env.BRANCH_NAME 
+                        def githash = env.GIT_COMMIT
+                        
+                        println githash
+                        println branch
+                        
+                        if (!releaseInformation[branch]) {
                             // no branch definined in json exit build
                             currentBuild.result = "FAILURE"
-                            throw new Exception("No entry in json for $env.BRANCH_NAME")
+                            throw new Exception("No entry in json for $branch")
                         }
-                        myAnt = releaseInformation[env.BRANCH_NAME].ant;
-                        apidocurl = releaseInformation[env.BRANCH_NAME].apidocurl
-                        mavenVersion=releaseInformation[env.BRANCH_NAME].mavenversion
+                        myAnt = releaseInformation[branch].ant;
+                        apidocurl = releaseInformation[branch].apidocurl
+                        mavenVersion=releaseInformation[branch].mavenversion
                         def month
-                        switch (releaseInformation[env.BRANCH_NAME].releasedate['month'])
{
+                        switch (releaseInformation[branch].releasedate['month']) {
                         case '01':month  = 'Jan'; break;
                         case '02':month  = 'Feb'; break;
                         case '03':month  = 'Mar'; break;
@@ -70,12 +77,31 @@ def call(Map params = [:]) {
                         case '12':month  = 'Dec'; break;
                         default: month ='Invalid';
                         }
-                        date  = releaseInformation[env.BRANCH_NAME].releasedate['day'] +
' '+ month + ' '+releaseInformation[env.BRANCH_NAME].releasedate['year']
+                        date  = releaseInformation[branch].releasedate['day'] + ' '+ month
+ ' '+releaseInformation[branch].releasedate['year']
                         //2018-07-29T12:00:00Z
-                        atomdate = releaseInformation[env.BRANCH_NAME].releasedate['year']+'-'+releaseInformation[env.BRANCH_NAME].releasedate['month']+'-'+releaseInformation[env.BRANCH_NAME].releasedate['day']+'T12:00:00Z'
-                        jdktool = releaseInformation[env.BRANCH_NAME].jdk
-                        myMaven = releaseInformation[env.BRANCH_NAME].maven
-                        version = releaseInformation[env.BRANCH_NAME].versionName;
+                        atomdate = releaseInformation[branch].releasedate['year']+'-'+releaseInformation[branch].releasedate['month']+'-'+releaseInformation[branch].releasedate['day']+'T12:00:00Z'
+                        jdktool = releaseInformation[branch].jdk
+                        myMaven = releaseInformation[branch].maven
+                        version = releaseInformation[branch].versionName;
+                        
+                        rmversion = version
+                        //
+                        if (releaseInformation[branch].milestones) {
+                            releaseInformation[branch].milestones.each{key,value ->
+                                if (key==githash) {
+                                    // vote candidate prior
+                                    if (value['vote']) {
+                                        rmversion = rmversion+'-vc'+value['vote']
+                                    } else if (value['version']){
+                                        // other named version
+                                        rmversion = rmversion+'-'+value['version']
+                                    }
+
+                                }
+                               
+                            }
+                        }
+                       
                     }
                 }
             }
@@ -126,19 +152,27 @@ def call(Map params = [:]) {
                                 sh "ant -f ${env.WORKSPACE}/build-release-temp/build.xml
build-nbms build-source-zips generate-uc-catalog -Dcluster.config=release -Ddo.build.windows.launchers=true
-Dbuildnum=${env.BRANCH_NAME}_${env.BUILD_NUMBER}"
                                 sh "ant -f ${env.WORKSPACE}/build-release-temp/build.xml
build-javadoc -Djavadoc.web.root='${apidocurl}' -Dmodules-javadoc-date='${date}' -Datom-date='${atomdate}'
-Djavadoc.web.zip=${env.WORKSPACE}/WEBZIP.zip"
                                
+                                // remove folders
                                 sh "rm -rf ${env.WORKSPACE}/dist"
+                                sh "rm -rf ${env.WORKSPACE}/mavenrepository"
+                                
+                                // create dist folder and content
                                 sh "mkdir ${env.WORKSPACE}/dist"
-                                sh "cp ${env.WORKSPACE}/nbbuild/build/*platform*.zip ${env.WORKSPACE}/dist/netbeans-platform-${version}-source.zip"
-                                sh "cp ${env.WORKSPACE}/nbbuild/build/release*.zip ${env.WORKSPACE}/dist/netbeans-${version}-source.zip"
-                                sh "cp ${env.WORKSPACE}/build-platform-temp/nbbuild/*.zip
${env.WORKSPACE}/dist/netbeans-platform-${version}-bin.zip"
-                                sh "cp ${env.WORKSPACE}/build-release-temp/nbbuild/*.zip
${env.WORKSPACE}/dist/netbeans-${version}-bin.zip"
+                                sh "cp ${env.WORKSPACE}/nbbuild/build/*platform*.zip ${env.WORKSPACE}/dist/netbeans-platform-${rmversion}-source.zip"
+                                sh "cp ${env.WORKSPACE}/nbbuild/build/release*.zip ${env.WORKSPACE}/dist/netbeans-${rmversion}-source.zip"
+                                sh "cp ${env.WORKSPACE}/build-platform-temp/nbbuild/*.zip
${env.WORKSPACE}/dist/netbeans-platform-${rmversion}-bin.zip"
+                                sh "cp ${env.WORKSPACE}/build-release-temp/nbbuild/*.zip
${env.WORKSPACE}/dist/netbeans-${rmversion}-bin.zip"
                                 sh "mkdir ${env.WORKSPACE}/dist/nbms"
-                                sh "mkdir ${env.WORKSPACE}/dist/mavenrepository"
+                                 
+                                // creat maven repository folder and content
+                                sh "mkdir ${env.WORKSPACE}/mavenrepository"
                                 sh "cp -r ${env.WORKSPACE}/build-release-temp/nbbuild/nbms/**
${env.WORKSPACE}/dist/nbms/"
                                 sh "cd ${env.WORKSPACE}/dist"+' && for z in $(find
. -name "*.zip") ; do sha512sum $z >$z.sha512 ; done'
                                 sh "cd ${env.WORKSPACE}/dist"+' && for z in $(find
. -name "*.nbm") ; do sha512sum $z >$z.sha512 ; done'
                                 sh "cd ${env.WORKSPACE}/dist"+' && for z in $(find
. -name "*.gz") ; do sha512sum $z >$z.sha512 ; done'
-
+                                
+                                archiveArtifacts 'dist/**'
+                                
                                 //prepare a maven repository to be used by RM 
                                 sh "rm -rf ${env.WORKSPACE}/repoindex/"
                                 sh "rm -rf ${env.WORKSPACE}/.repository"
@@ -148,10 +182,12 @@ def call(Map params = [:]) {
                                 {
                                     sh "mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get
-Dartifact=org.apache.netbeans.utilities:nb-repository-plugin:1.5-SNAPSHOT -Dmaven.repo.local=${env.WORKSPACE}/.repository
-DremoteRepositories=apache.snapshots.https::::https://repository.apache.org/snapshots"
                                     sh "mvn org.apache.netbeans.utilities:nb-repository-plugin:1.5-SNAPSHOT:download
-DnexusIndexDirectory=${env.WORKSPACE}/repoindex -Dmaven.repo.local=${env.WORKSPACE}/.repository
-DrepositoryUrl=https://repo.maven.apache.org/maven2"
-                                    sh "mvn org.apache.netbeans.utilities:nb-repository-plugin:1.5-SNAPSHOT:populate
-DnexusIndexDirectory=${env.WORKSPACE}/repoindex -Dmaven.repo.local=${env.WORKSPACE}/.repository
-DnetbeansNbmDirectory=${netbeansbase}/nbms -DnetbeansInstallDirectory=${netbeansbase}/netbeans
-DnetbeansSourcesDirectory=${netbeansbase}/build/source-zips -DnetbeansJavadocDirectory=${netbeansbase}/build/javadoc
-DparentGAV=org.apache.netbeans:netbeans-parent:2 -DforcedVersio [...]
+                                    sh "mvn org.apache.netbeans.utilities:nb-repository-plugin:1.5-SNAPSHOT:populate
-DnexusIndexDirectory=${env.WORKSPACE}/repoindex -Dmaven.repo.local=${env.WORKSPACE}/.repository
-DnetbeansNbmDirectory=${netbeansbase}/nbms -DnetbeansInstallDirectory=${netbeansbase}/netbeans
-DnetbeansSourcesDirectory=${netbeansbase}/build/source-zips -DnetbeansJavadocDirectory=${netbeansbase}/build/javadoc
-DparentGAV=org.apache.netbeans:netbeans-parent:2 -DforcedVersio [...]
                                 }
                                 
-                                archiveArtifacts 'dist/**'
+                                archiveArtifacts 'mavenrepository/**'
+                                
+                                
                                 
                             }
                         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Mime
View raw message