KrisK Posted March 18, 2019 Report Share Posted March 18, 2019 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 More sharing options...
calbzam Posted March 19, 2019 Report Share Posted March 19, 2019 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 More sharing options...
KrisK Posted March 19, 2019 Author Report Share Posted March 19, 2019 Thanks for the quick answer! Why do I still need to define the "smartbranch"? The changeset may not be on particulary branch. Link to comment Share on other sites More sharing options...
calbzam Posted March 19, 2019 Report Share Posted March 19, 2019 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. Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2020 Report Share Posted May 5, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now