Automating Repo Changes in Hudson
I'm putting together a Hudson setup and our build process has thrown up a bit of a roadblock. We have long been a web shop but are doing some more Java projects now. Every 2 weeks we create a tag of the root folder just after we release the previous tag to production. The new tag is tested for 2 weeks (and critical changes are merged) while development continues on the trunk. Most of the commits are not related to java and so the java project does not need to be built every time, just java changes are detected.
What I want to do is setup hudson to poll the in-testing tag for changes and then build and deploy to our testing server. However, since we release every 2 weeks, the testing repo URL will change along with it. Obviously I could manually update the repo URL, but I want to automate this to avoid human error. Is there some way to create a sort of svn symlink url that we could have a script change to point to the new tag when we release? Is there some scripting mechanism that I could use to run and automatically update hudson's repo f开发者_高级运维rom the CLI? Any other ideas to fix this?
How about you reuse the same tag every two weeks.
Following the description of the process that you use. When you create a release, you copy trunk into a new tag and test until its good enough (about two weeks). Than you release this tag.
Proposed changes: After releasing a version. You copy trunk to 'ReleaseCandidate' branch. You test it there until good for releasing. When releasing, you specifically create the release tag (e.g. Rel_3_5_2) and copy the Release Candidate into the release tag. Now you can repurpose the ReleaseCandidate branch and copy trunk there.
Your Hudson always just runs against the ReleaseCandidate and trunk
Another solution would be to pass the URL into the job using a post commit hook. This hook will first need to find out what tag just changed and trigger the job with this URL.
精彩评论