In your Branch Sources section of your Multibranch job, you just have to 
add the "Suppress Automatic SCM Triggering". This will prevent the branch 
indexing scan from kicking off a new build when it finds changes. 

On Tuesday, September 12, 2017 at 8:56:32 AM UTC-6, ishan jain wrote:
>
> Hi all,
>
> I keep my Jenkinsfile in a git repo. For features and fixes, i create 
> branches on this repo, each having a slightly different Jenkinsfile. I have 
> a jenkins job of type multibranch pipeline, scanning these pipelines as i 
> create a branch.
>
> Assuming i have the basic declarative pipeline structure for all 
> Jenkinsfiles in different branches
>
> pipeline {
>     agent any
>     triggers {
>         cron('H 4/* 0 0 1-5')
>     }
>     stages {
>         stage('Example') {
>             steps {
>                 echo 'Hello World'
>             }
>         }
>     }
> }
>
>
>
> I sometimes want to change the cron of certain jobs, sometimes even to 
> disable it. The best ideal way to do it would be to change it in 
> Jenkinsfile in the GIT repo. But after changing the code and invoking 'scan 
> multibranch pipeline' from Jenkins UI, it does 1 execution, which is 
> something i do not want.
>
> How can i make sure that updated settings done in Jenkinsfile are picked 
> up without executing it ? And can it happen automatically immediately ?
> What is the simplest way to disable a job for a while in the above setup ?
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8d7b71dc-67d1-4a19-936c-ac5bce5d8b9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to