TC8.0.3 Finish Build Trigger & SVN Update

We have a five step build process:

  1. Build & Unit-Test
  2. Container-Test
  3. Package for deployment
  4. Deploy to functional test environment
  5. Deploy to integration test environment


Steps 2 & 3 are triggered by a fiish build trigger on step 1. Step 4 is triggered by a finish build trigger on step 3, and uses the artifacts generated in 3. Step 5 is manual.

Steps 1 through 3 are maven builds performed on a clean checkout of the head from subversion. Herein lies the problem. If a developer commits during step 1, then steps 2 and 3 will be run against a different revision than step 1. With really bad timing it is possible for steps 1 through 3 to run on different revisions.

Is there a way to carry the revision number from step 1 through the other steps?

3 comments
Comment actions Permalink

If you want to use build.number from another build, you should have snapshot dependency (direct or indirect) and use parameter %dep.<Base_CONFname>.build.number%.

0
Comment actions Permalink

Hi Sergey,

Thanks for the response. Can you clarify a little?

Following your advice I have tried creating a snapshot dependency but I can't find a place to use the parameter you mentioned. With the snapshot dependency I have selected options to not run a new build if a successful one exits and to only use successful builds from suitable ones. When running the build manually this tries to rebuild the (currently) broken build, rather than taking the previous successful build.

I have also looked at adding an artifact depedecy, which does contain a placeholder for the parameter, but when I use it TC complains that it "cannot find build by specified parameters". I have tried changing the artifact dependency to 'last successful build', but the artifact list is empty. In both of these cases I cannot create an artifact dependency.

Thanks,
Bryan

0
Comment actions Permalink

Actually, I read your first post wrong. What you need is just snapshot dependencies and nothing else http://confluence.jetbrains.com/display/TCD8/Snapshot+Dependencies.

And in the artifact dependency you should use "build from the same chain"

0

Please sign in to leave a comment.