jenkinsaccurev

Using AccuRev and Jenkins CI (Gated Streams)


One of our clients is using AccuRev for Source Code Management / Version Control. We are trying to set-up a Jenkins CI environment for them. Currently we have done this and Jenkins is simply polling the same stream over and over.

However we are looking for a better way to integrate Jenkins CI with the AccuRev workflow. I read something about Gated Streams that can trigger an external build and determine whether changes from downstream may be promoted or not. This sounds promising, however due to my inexperience with AccuRev I'm not sure how this would be implemented.

Can anyone point me to examples and/or tutorials on using Jenkins CI with AccuRev, particularly with Gated Streams? Or perhaps explain the details on this specific subject?


Solution

  • I too use Jenkins and AccuRev.

    In my environment, my CI builds are started based on promote/purge/demote, this is accomplished by using the server_post_promote_trig (covers promote and purge) and the new server_master_trig (covers demote).

    I played around with the gated streams abit, but have not implemneted this feature in my environment as I hit a defect (maybe its fixed in the latest release).

    The basic concept with a gated stream is when you promote your changes into this stream, the changes are actually sent to a staging stream (child stream). You can build/test the change and based on your acceptance criteria, determine if that change can be promoted into the gated stream.

    Example: I you promote and the change fails the build, the change stays in the staging stream. You will need to fix the problem and have a successful build for the change to be promoted into the gated stream.

    This way you are not tainting all the streams under the gated stream.

    Currently today, if you promote a change into a stream and it breaks the build, all the streams below that stream now contain the bad code.

    Look at the online accurev help, Chapter 11. Using Streams to Enforce Process.