我希望我的jenkins构建能够构建所有标签。即使我一次推送多个标签,我也希望jenkins能够构建它。我按照这两个链接
http://erics-notes.blogspot.ca/2013/05/jenkins-build-latest-git-tag.html
和
Is it possible for Jenkins to automatically detect and build newly created tags in a git repo?
但是我的构建总是只构建我最新的标记提交。即使我创建了一个全新的构建版本。这是我创建的新项目的控制台输出 - 它找到了我的所有分支和标签,但是只构建了最后一个标签:
> C:\Program Files (x86)\Git\bin\git.exe -c core.askpass=true fetch --tags --progress git@<giturl>.git +refs/tags/test/*:refs/remotes/origin/tags/test/*
Seen branch in repository origin/master
Seen branch in repository origin/nraomd
Seen branch in repository origin/tags/test/1
Seen branch in repository origin/tags/test/2
Seen branch in repository origin/tags/test/3
Seen branch in repository origin/tags/test/4
Seen branch in repository origin/tags/test/5
Seen branch in repository origin/tags/test/6
Seen branch in repository origin/tagtest
Seen 11 remote branches
Checking out Revision 5c79568e8a4ff29b48acf0d53548be79daf4ddc2 (origin/tags/test/6)
这是我的jenkins选项:
Refspec: +refs/tags/test/*:refs/remotes/origin/tags/test/*
Branch specifier: */tags/test/*
Poll SCM: * * * * *
当我标记我使用:
git tag -a test/2 a061791 -m 'test2'
git tag -a test/3 8f2c8ec -m 'test3'
git push --tags
我试过* / **。我使用
运气好了*/*
因为它构建了我的master和nraomd分支,但出于某种原因不是我的tagtest分支。
任何帮助将不胜感激