Building tags using Continuous Integration

2019-07-13 13:45发布

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?

2条回答
手持菜刀,她持情操
2楼-- · 2019-07-13 13:58

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.

查看更多
神经病院院长
3楼-- · 2019-07-13 14:17

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

查看更多
登录 后发表回答