Jump to content
Sign in to follow this  
KrisK

Jenkins Integration - How to update to a certain changeset

Recommended Posts

The jenkins plastic plugin states that:

" You can setup not only branches (which is the normal case), but labels as well as changesets in the selector. "

... but it doesnt state how to do that. Tried different approaches but none did work.

Please help.

Thanks Kris

Share this post


Link to post
Share on other sites

Hi, sorry it's not clear in the documentation. You can copy the selector from any of your workspaces. Let me show you some examples:

repository "default@localhost:8087"
  path "/"
    label "v1.0" 
repository "default@localhost:8087"
  path "/"
    smartbranch "/main" changeset "11"  


Regards,

Carlos.
     

Share this post


Link to post
Share on other sites

Thanks for the quick answer! :)

Why do I still need to define the "smartbranch"? The changeset may not be on particulary branch.

Share this post


Link to post
Share on other sites

This is the workspace selector format. You can open a console in any if your workspaces and run the following command:

cm showselector --help

Regards,

Carlos.

Share this post


Link to post
Share on other sites

We're having the same issue. We're using Jenkins to pull the jenkinsfile from the repository using the following selector, where "source" is a Jenkins parameter:

repository "default@localhost:8087"
  path "/"
    smartbranch "${source}"

It works fine as long as "source" is a branch. It does not work for labels nor changesets, because the syntax of the selector would be different. It would be useful to us if there was a way to specify the selector like "cm switchtobranch", which supports branch names, labels, and changesets at the same time. For example, it would solve our problem if smartbranch accepted both "br:/main/task001" and "cs:1234" as valid arguments.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...