I got rid of the release plugin and instead used the parameters plugin like
this:
parameters {
string(defaultValue: '', description: 'Release version. Leave blank to not
release.', name: 'version')
}
stages {
stage('Build') {
steps {
sh "./gradlew portal:build -Dbuild_number=${env.BUILD_NUMBER}
-PreleaseVersion=${params.version}"
junit 'portal/build/test-results/**/*.xml'
}
}
stage('Create release') {
when {
expression { params.version != '' }
}
steps {
script {
currentBuild.displayName = "Release ${params.version}"
}
sh "./gradlew
portal:publishExecutablesPublicationToExecutablesRepository
-PreleaseVersion=${params.version}"
}
}
}
It looks a bit messy but works OK. Unfortunately there is no easy way in
the Jenkins UI to show the latest release builds in a dashboard widget.
On Thursday, 26 April 2018 18:38:52 UTC+10, Sverre Moe wrote:
>
> What use has Jenkins Release Plugin to Pipeline jobs?
>
> According to documentation:
> "The release plugin supports the Maven2 and Free Style Job type".
>
> Still the release step is available as a pipeline step.
>
> Jobs to Release, gives up nothing when I start type. Enter an actual
> project and gets
> *ERROR*: Failed to load parameter definitions: Server Error
> release 'jobProjectName'
>
> So, it will trigger a release build of a maven2 project from a pipeline
> job.
> Is this correct understanding of this plugin?
>
> We no longer have any maven2 projects since all are now pipelines. I was
> then considering to uninstall this plugin.
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/18acd704-bd83-4cfa-acda-d1ee95892c58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.