Merge "multibranch: Configurable script-path"
This commit is contained in:
commit
85d16244a1
|
@ -55,6 +55,8 @@ Plugins required:
|
|||
(default '-1, all')
|
||||
* **days-to-keep** (`int`): For how many days should a build be kept.
|
||||
(default '-1, forever')
|
||||
* **script-path** (`str`): Path to Jenkinsfile, relative to workspace.
|
||||
(default 'Jenkinsfile')
|
||||
|
||||
Job examples:
|
||||
|
||||
|
@ -270,7 +272,8 @@ class WorkflowMultiBranch(jenkins_jobs.modules.base.Base):
|
|||
'class': self.jenkins_class,
|
||||
'reference': '../..'
|
||||
})
|
||||
XML.SubElement(factory, 'scriptPath').text = 'Jenkinsfile'
|
||||
XML.SubElement(factory, 'scriptPath').text = data.get(
|
||||
'script-path', 'Jenkinsfile')
|
||||
|
||||
return xml_parent
|
||||
|
||||
|
|
|
@ -79,6 +79,6 @@
|
|||
</sources>
|
||||
<factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory">
|
||||
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
|
||||
<scriptPath>Jenkinsfile</scriptPath>
|
||||
<scriptPath>some.Jenkinsfile</scriptPath>
|
||||
</factory>
|
||||
</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject>
|
||||
|
|
|
@ -7,6 +7,7 @@ periodic-folder-trigger: 1d
|
|||
prune-dead-branches: True
|
||||
number-to-keep: '10'
|
||||
days-to-keep: '10'
|
||||
script-path: 'some.Jenkinsfile'
|
||||
scm:
|
||||
- bitbucket:
|
||||
repo-owner: 'SANDBOX'
|
||||
|
|
|
@ -47,6 +47,6 @@
|
|||
</sources>
|
||||
<factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory">
|
||||
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
|
||||
<scriptPath>Jenkinsfile</scriptPath>
|
||||
<scriptPath>some.Jenkinsfile</scriptPath>
|
||||
</factory>
|
||||
</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
name: 'demo-multibranch-bitbucket-min'
|
||||
project-type: multibranch
|
||||
script-path: 'some.Jenkinsfile'
|
||||
scm:
|
||||
- bitbucket:
|
||||
credentials-id: 'secret'
|
||||
|
|
|
@ -55,6 +55,6 @@
|
|||
</sources>
|
||||
<factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory">
|
||||
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
|
||||
<scriptPath>Jenkinsfile</scriptPath>
|
||||
<scriptPath>some.Jenkinsfile</scriptPath>
|
||||
</factory>
|
||||
</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
name: 'demo-multibranch-gerrit-min'
|
||||
project-type: multibranch
|
||||
script-path: some.Jenkinsfile
|
||||
scm:
|
||||
- gerrit:
|
||||
url: 'https://review.gerrithub.io/johndoe/foo'
|
||||
|
|
|
@ -46,6 +46,6 @@
|
|||
</sources>
|
||||
<factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory">
|
||||
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
|
||||
<scriptPath>Jenkinsfile</scriptPath>
|
||||
<scriptPath>some.Jenkinsfile</scriptPath>
|
||||
</factory>
|
||||
</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
name: 'demo-multibranch-git-min'
|
||||
project-type: multibranch
|
||||
script-path: some.Jenkinsfile
|
||||
scm:
|
||||
- git:
|
||||
url: 'https://example.com/jonhndoe/keep-frontend.git'
|
||||
|
|
|
@ -57,6 +57,6 @@
|
|||
</sources>
|
||||
<factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory">
|
||||
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
|
||||
<scriptPath>Jenkinsfile</scriptPath>
|
||||
<scriptPath>some.Jenkinsfile</scriptPath>
|
||||
</factory>
|
||||
</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
name: scm-github-full
|
||||
project-type: multibranch
|
||||
script-path: some.Jenkinsfile
|
||||
scm:
|
||||
- github:
|
||||
api-uri: http://example.org/github
|
||||
|
|
Loading…
Reference in New Issue