Search code examples
gitbitbucketjenkins-job-dsl

How to trigger build using Job-DSL


How to trigger build when push is done on BitBucket, using Job-DSL?

enter image description here

I think it is something like that, but with BitBucket, not GitHub...

    triggers{
        githubPush()
    }

I am also looking for a "pull" behavior, with Jenkins looking every N minutes if there is someting new on BitBucket.


Solution

  •     triggers{
            scm("*/5 * * * *")
        }
    

    worked fine for me.