Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40766

Make M2 Release Plugin compatible with pipeline

      Allow to trigger release plugin from a pipeline dsl. It should be similar to trigger job's build.

      To support this the plugin would need to be refactored according to pipeline development instructions: https://github.com/jenkinsci/pipeline-plugin/blob/master/DEVGUIDE.md

          [JENKINS-40766] Make M2 Release Plugin compatible with pipeline

          Jesse Glick added a comment -

          Probably never going to happen. This plugin is tightly tied to maven-plugin. There is no obvious Pipeline equivalent.

          Jesse Glick added a comment - Probably never going to happen. This plugin is tightly tied to maven-plugin . There is no obvious Pipeline equivalent.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          COMPATIBILITY.md
          http://jenkins-ci.org/commit/pipeline-plugin/b293156039a223ee592298cbd762fed9291f68a5
          Log:
          Merge pull request #426 from estarter/patch-1

          JENKINS-40765 JENKINS-40766 Add release/m2release plugins to the list

          Compare: https://github.com/jenkinsci/pipeline-plugin/compare/be4c63608ad5...b293156039a2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: COMPATIBILITY.md http://jenkins-ci.org/commit/pipeline-plugin/b293156039a223ee592298cbd762fed9291f68a5 Log: Merge pull request #426 from estarter/patch-1 JENKINS-40765 JENKINS-40766 Add release/m2release plugins to the list Compare: https://github.com/jenkinsci/pipeline-plugin/compare/be4c63608ad5...b293156039a2

          Maybe something as part of https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Maven+Plugin

          But I'm not really sure what it could mean in term of features cc cleclerc

          Arnaud Héritier added a comment - Maybe something as part of https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Maven+Plugin But I'm not really sure what it could mean in term of features cc cleclerc

          The Pipeline Maven Plugin and its "withMaven()" wrapper make it very easy to create Maven releases from pipeline. "withMaven()" automatically archive and fingerprint the generated artifacts, publishes the Junit / SureFire reports...

          Sample:

          node {
              stage ('Release') {
                  withMaven(mavenSettingsConfig: 'settings-for-multi-module-maven-project', maven: 'maven-3.3.9') {
                     git "https://github.com/cyrille-leclerc/multi-module-maven-project.git"
                     sh "mvn release:prepare release:perform"
                  }
              }
          }
          

          We recommend to define the maven settings file and its credentials through the Config File Provider Plugin.

          The git configuration (author email and name) can be injected with environment variables:

          node {
              stage ('Release') {
                  withEnv([
                          'GIT_AUTHOR_NAME=My Team', 
                          'GIT_AUTHOR_EMAIL=my-team@example.com']) {
                      
                      withMaven(mavenSettingsConfig: 'settings-for-multi-module-maven-project', maven: 'maven-3.3.9') {
                         git "https://github.com/cyrille-leclerc/multi-module-maven-project.git"
                         sh "mvn release:prepare release:perform"
                      }
                  }
              }
          }
          

          Cyrille Le Clerc added a comment - The Pipeline Maven Plugin and its " withMaven() " wrapper make it very easy to create Maven releases from pipeline. " withMaven() " automatically archive and fingerprint the generated artifacts, publishes the Junit / SureFire reports... Sample: node { stage ( 'Release' ) { withMaven(mavenSettingsConfig: 'settings- for -multi-module-maven-project' , maven: 'maven-3.3.9' ) { git "https: //github.com/cyrille-leclerc/multi-module-maven-project.git" sh "mvn release:prepare release:perform" } } } We recommend to define the maven settings file and its credentials through the Config File Provider Plugin. The git configuration (author email and name) can be injected with environment variables: node { stage ( 'Release' ) { withEnv([ 'GIT_AUTHOR_NAME=My Team' , 'GIT_AUTHOR_EMAIL=my-team@example.com' ]) { withMaven(mavenSettingsConfig: 'settings- for -multi-module-maven-project' , maven: 'maven-3.3.9' ) { git "https: //github.com/cyrille-leclerc/multi-module-maven-project.git" sh "mvn release:prepare release:perform" } } } }

            petehayes Peter Hayes
            estarter Alexey M
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: