Jenkins maven release job to trigger downstream parameterized job

时光怂恿深爱的人放手 提交于 2021-01-28 14:07:58

问题


I'm using the jenkins maven-release plugin to tag, package and perform a release. This is working fine.

The plugin asks for:

  • the version of the release (parameter releaseVersion of the release plugin);
  • the version of development, after the release (parameter developmentVersion of the release plugin);

Now, I want to have a second step after packaging this release.

I want to import the specific version packaged (say 0.0.5) to our deployment tool.

I did this by configuring a second Jenkins jobs.

The job is parameterized with the tag name.

The job will checkout the tag: my-svn-repo/project/tags/$SVN_TAG

then read the version in the pom and import the packages in the deployment tool.

But this involves manual steps to wait for the release job to finish the release perform, then parameterize the import job and launch it.

I'd like the first job to trigger the second with the right parameter.

I tried to configure a parameterized job trigger, but the end of stack is :

[parameterized-trigger] Current build has no parameters.
[parameterized-trigger] Downstream builds will not be triggered.

I was expecting to have the parameter $MVN_RELEASE_VERSION in the context.

How can I get the parameters used by the maven release plugin ? Or any idea on how to automatically launch my second step ?

Thanks.

来源:https://stackoverflow.com/questions/15544435/jenkins-maven-release-job-to-trigger-downstream-parameterized-job

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!