Thanks for the suggestions Stephen. I'd like to try a couple more ideas...

Is it possible to modify a global variable? What are my options to deal 
with variables cross-jobs?

On Wednesday, May 31, 2017 at 5:00:50 PM UTC+3, Stephen Connolly wrote:
>
>
>
> On 31 May 2017 at 14:17, Idan Adar <id...@adar.me <javascript:>> wrote:
>
>> I actually do want these to build automatically. I control what then 
>> happens in the jenkinsfile...
>>
>
> multi-branch is strongly opinionated. One of the core opinions is that 
> branches are independent.
>
> it sounds like what you are trying to do is significantly more reliant on 
> repository cohesive state.
>
> I would suggest taking a different approach. In any case, the stuff you 
> are likely trying to do is not something that is "permitted" from a 
> Jenkinsfile as there are too many security risks. As such you will probably 
> have to write a plugin.
>
> I recommend re-thinking your use-case and requirements if you want to do 
> something off-the-shelf without having to write a Jenkins plugin. 
>  
>
>>
>>
>> On Wednesday, May 31, 2017 at 4:03:18 PM UTC+3, Stephen Connolly wrote:
>>>
>>> no.
>>>
>>> What you really want to do is not have those branches build 
>>> automatically.... effectively you want to turn the multbranch source to be 
>>> something like[image: Inline images 1]
>>> or (assuming you want master to still build automatically)
>>> [image: Inline images 2]
>>>
>>> Should be possible to configure that by groovy or a plugin
>>>
>>> On 30 May 2017 at 20:19, Idan Adar <id...@adar.me> wrote:
>>>
>>>> To disable, can I point to a branch like so?
>>>> def job = Jenkins.instance.getItem("job-name/branch-name"); job.disable
>>>> (); 
>>>>
>>>> And then to enable, maybe it could be achieved also programmatically?
>>>> def job = Jenkins.instance.getItem("job-name/branch-name"); job.enable
>>>> (); 
>>>>
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to jenkinsci-use...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/jenkinsci-users/63a5e368-ff1a-4898-b86f-1eee9536961c%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/63a5e368-ff1a-4898-b86f-1eee9536961c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/1e9347b6-b304-4c74-bb33-e3c119b9ac06%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/1e9347b6-b304-4c74-bb33-e3c119b9ac06%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cab1b66c-6996-4a18-8e87-32b5250cf51a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to