Skip to content

Commit

Permalink
Jenkins pipline groovy
Browse files Browse the repository at this point in the history
  • Loading branch information
yanivomc committed Aug 7, 2019
1 parent d1a14e4 commit 0daa501
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions basics/misc/jenkins-pipline-dsl.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pipelineJob('DSL_Pipeline') {

def repo = 'https://github.com/path/to/your/repo.git'

triggers {
scm('H/5 * * * *')
}
description("Pipeline for $repo")

definition {
cpsScm {
scm {
git {
remote { url(repo) }
branches('master', '**/feature*')
scriptPath('misc/jenkinsfile')
extensions { } // required as otherwise it may try to tag the repo, which you may not want
}
}
}
}
}

0 comments on commit 0daa501

Please sign in to comment.