[英]Jenkins Versioning Artefacts Automatically
My Jenkins builds my maven repo that is stored in GitHub. 我的Jenkins构建了我的Maven存储库,该存储库存储在GitHub中。 I have three main branches: 我有三个主要分支:
Master
Develop
Release_xx
What I store in Master is the results of the release branch being merged into Master, and therefore my production branch. 我存储在Master中的是发布分支合并到Master中的结果,因此合并到了生产分支中。
My Jenkins builds the Master branch, but the best i can figure out for versioning is to use the git_commit
, git_branch
and build_number
. 我的詹金斯(Jenkins)构建了Master分支,但是我能弄清楚的最好的版本是使用git_commit
, git_branch
和build_number
。
I want to be able to version my artefacts like this 0.14.5
for my master
branch. 我希望能够为我的master
分支对我的伪像进行此版本0.14.5
版本控制。 So this would be 0
. 所以这将是0
。 release
. release
。 increment
I want to be able to automate the bumping of the minor version, and I don't mind manually changing the major version. 我希望能够自动化次要版本的升级,并且我不介意手动更改主要版本。 I normally pass in variables using mvn install -Dvariable=value
. 我通常使用mvn install -Dvariable=value
传递变量。
Please, can someone help guide me! 请,有人可以帮我指导! Ideally, i do not want to install the maven release plugin. 理想情况下,我不想安装Maven版本插件。 I would prefer to use a script or a jenkins plugin. 我更喜欢使用脚本或詹金斯插件。
Can you try using https://wiki.jenkins.io/display/JENKINS/Jenkins+Artifactory+Plugin+-+Release+Management plugin? 您可以尝试使用https://wiki.jenkins.io/display/JENKINS/Jenkins+Artifactory+Plugin+-+Release+Management插件吗?
This plugin helped me to automate the release process. 这个插件帮助我实现了发布过程的自动化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.