Re: Declarative Pipeline: Add trigger only on when condition

2021-11-19 Thread 'Björn Pedersen' via Jenkins Users
You can't do it on the triggers level ( the trigger config only can affect the next run, as the job is already triggered), but you can wrap the whole work in the pipeline in a when, so if the branch is a userbranch this run is mostly a do-nothing. Björn sverr...@gmail.com schrieb am

Re: Declarative Pipeline: Add trigger only on when condition

2021-10-27 Thread Sverre Moe
User branches are like origin/username/CICD Official branches are origin/CICD og origin/master All part of the same project. CICD branch has a different Declarative Pipeline for CICD release build and deployment. Same goes for user branches that are based on this CICD branch. All other branches

Re: Declarative Pipeline: Add trigger only on when condition

2021-10-27 Thread Victor Martinez
I'm not sure if I understood correctly what user branches of the CICD mean in this particular case, can you clarify it? Some other questions: - Are the master and CICD branches part of the same projectA? - If so, how do users interact with the project? As far as I see the upstream trigger

Declarative Pipeline: Add trigger only on when condition

2021-10-22 Thread Sverre Moe
We have a branch in projectA called CICD. This branch we want to be triggered automatically after the master branch has built. However we do not want user branches of the CICD to be triggered automatically. Is it possible to avoid configuring a trigger if the branch is not CICD? This is