Jump to content

Jenkins Integration - How to update to a certain changeset


KrisK

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

Link to comment
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.
     

Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
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
×
×
  • Create New...