Building tags using Continuous Integration

喜欢而已 提交于 2019-12-11 00:40:20

问题


How could I establish practice of continuously integrating tags instead of branches?

I have following structure of tags repository directory (here is more detailed explanation of the repository structure):

/tags
    /builds
        /PA
        /A
        /B
    /releases
        /AR
        /BR
        /RC
        /ST

I would like to configure my continuous integration tool (it could be anything from CruiseControl, Hudson and Jenkins to TeamCity) to build latest tag if it has been created in either of those folders.

For example, if structure has changed and tag 1.x.0 has appeared in PA directory, I want to trigger building of source code under 1.x.0 tag:

/tags
    /builds
        /PA
            /1.x.0 -> triggers build
        /A
        /B
    /releases
        /AR
        /BR
        /RC
        /ST

Is it possible to build source under tags with any of the existing continuous integration tools or I should write my own plugin for that purpose?


回答1:


With Jenkins: use a periodic job to check for new tags, then use the Parametrized Trigger Plugin to kick off your job with the tag as a parameter. The job will manually update to the tag and build.




回答2:


With Jenkins (Hudson) and Subversion you can have a tag that is constant e.g tags/BUILD. When anything with the tag changes, Jenkins will build based on that tag. You can then ask it to apply a new tag after the build.

In your example, you can create a new tag as tags/builds/PA and have Jenkins listen to that tag. Jenkins will detect any changes in the tags/builds/PA folder and will build if it detects any changes. You can configure a post build step to create a new tag (1.x.0) when it completes the build.

I posted a similar question on the topic and got some responses here - http://groups.google.com/group/jenkinsci-users/browse_thread/thread/59ca7f0f9e21a382/fe14fc7269611b26#fe14fc7269611b26



来源:https://stackoverflow.com/questions/9180648/building-tags-using-continuous-integration

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