Specify a Git tag to be processed with Jenkins

  1. 建立一个tag标签git

    例如经过Idea建立一个taggithub

    git->Repository->tagmaven

    将tag推送到远程仓库ui

2.参数化构建spa

2.1 Click "Add Parameter"rest

2.2 Click "Git Parameter"ip

2.3 Enter "tag" to "Name"ci

2.4 Enter “*/master” to “Branch”​​​​​​​get

2.5 Enter "xxx" to Tag Filter(填写本身的tag过滤规则)jenkins

      2.5 Find the section named “Source Code Management”

      2.6 Enter “${tag}” to “Branch Specifier”

     

If use git-parameter-plugin-4.0 could't get list of tag,You must upgrade to 4.1-SNAPSHORT. You could check the could from https://github.com/jenkinsci/git-parameter-plugin.git

the build step:

  1. git clone https://github.com/jenkinsci/git-parameter-plugin.git

  2. cd git-parameter-plugin

  3. mvn clean package -DskipTests=true

  4. copy git-parameter.hpi from git-parameter-plugin\target to jenkins/WEB-INF/plugins

  5. restart jenkins

 

3.jenkins构建上下游项目构建管理

   对于maven多模块项目,若是选择构建触发选择Build whenever a SNAPSHOT dependency is built,构建顶级模块时会触发下级项目构建,若是没有须要去掉前面的钩子便可

相关文章
相关标签/搜索