summaryrefslogtreecommitdiffstats
path: root/tests/multibranch/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'tests/multibranch/fixtures')
-rw-r--r--tests/multibranch/fixtures/multibranch_defaults_id_mode.xml (renamed from tests/multibranch/fixtures/multibranch_defaults.xml)3
-rw-r--r--tests/multibranch/fixtures/multibranch_defaults_id_mode.yaml9
-rw-r--r--tests/multibranch/fixtures/multibranch_defaults_path_mode.xml63
-rw-r--r--tests/multibranch/fixtures/multibranch_defaults_path_mode.yaml (renamed from tests/multibranch/fixtures/multibranch_defaults.yaml)0
-rw-r--r--tests/multibranch/fixtures/scm_github_full.xml5
-rw-r--r--tests/multibranch/fixtures/scm_github_full.yaml3
-rw-r--r--tests/multibranch/fixtures/scm_github_no_origin_pr_discovery.xml59
-rw-r--r--tests/multibranch/fixtures/scm_github_no_origin_pr_discovery.yaml7
8 files changed, 148 insertions, 1 deletions
diff --git a/tests/multibranch/fixtures/multibranch_defaults.xml b/tests/multibranch/fixtures/multibranch_defaults_id_mode.xml
index 94859b22..8136ab90 100644
--- a/tests/multibranch/fixtures/multibranch_defaults.xml
+++ b/tests/multibranch/fixtures/multibranch_defaults_id_mode.xml
@@ -58,6 +58,7 @@
</sources>
<factory class="org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineBranchDefaultsProjectFactory">
<owner class="org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject" reference="../.."/>
- <scriptPath>Jenkinsfile</scriptPath>
+ <scriptId>my-pipeline</scriptId>
+ <useSandbox>true</useSandbox>
</factory>
</org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject>
diff --git a/tests/multibranch/fixtures/multibranch_defaults_id_mode.yaml b/tests/multibranch/fixtures/multibranch_defaults_id_mode.yaml
new file mode 100644
index 00000000..b7b52f1a
--- /dev/null
+++ b/tests/multibranch/fixtures/multibranch_defaults_id_mode.yaml
@@ -0,0 +1,9 @@
+name: 'demo-multibranch-defaults'
+project-type: multibranch-defaults
+script-id: my-pipeline
+sandbox: true
+scm:
+ - github:
+ repo: 'foo'
+ repo-owner: 'johndoe'
+ credentials-id: 'secret'
diff --git a/tests/multibranch/fixtures/multibranch_defaults_path_mode.xml b/tests/multibranch/fixtures/multibranch_defaults_path_mode.xml
new file mode 100644
index 00000000..c8a0070e
--- /dev/null
+++ b/tests/multibranch/fixtures/multibranch_defaults_path_mode.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject plugin="workflow-multibranch">
+ <properties/>
+ <views>
+ <hudson.model.AllView>
+ <name>All</name>
+ <filterExecutors>false</filterExecutors>
+ <filterQueue>false</filterQueue>
+ <properties class="hudson.model.View$PropertyList"/>
+ <owner class="org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject" reference="../../.."/>
+ </hudson.model.AllView>
+ </views>
+ <viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
+ <folderViews class="jenkins.branch.MultiBranchProjectViewHolder" plugin="branch-api">
+ <owner class="org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject" reference="../.."/>
+ </folderViews>
+ <healthMetrics>
+ <com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric plugin="cloudbees-folder">
+ <nonRecursive>false</nonRecursive>
+ </com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric>
+ </healthMetrics>
+ <icon class="jenkins.branch.MetadataActionFolderIcon" plugin="branch-api">
+ <owner class="org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject" reference="../.."/>
+ </icon>
+ <orphanedItemStrategy class="com.cloudbees.hudson.plugins.folder.computed.DefaultOrphanedItemStrategy" plugin="cloudbees-folder">
+ <pruneDeadBranches>true</pruneDeadBranches>
+ <daysToKeep>-1</daysToKeep>
+ <numToKeep>-1</numToKeep>
+ </orphanedItemStrategy>
+ <triggers/>
+ <sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
+ <data>
+ <jenkins.branch.BranchSource>
+ <source class="org.jenkinsci.plugins.github_branch_source.GitHubSCMSource" plugin="github-branch-source">
+ <id>gh-johndoe-foo</id>
+ <repoOwner>johndoe</repoOwner>
+ <repository>foo</repository>
+ <credentialsId>secret</credentialsId>
+ <traits>
+ <org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
+ <strategyId>1</strategyId>
+ </org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
+ <org.jenkinsci.plugins.github__branch__source.ForkPullRequestDiscoveryTrait>
+ <strategyId>1</strategyId>
+ <trust class="org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustContributors"/>
+ </org.jenkinsci.plugins.github__branch__source.ForkPullRequestDiscoveryTrait>
+ <org.jenkinsci.plugins.github__branch__source.OriginPullRequestDiscoveryTrait>
+ <strategyId>1</strategyId>
+ </org.jenkinsci.plugins.github__branch__source.OriginPullRequestDiscoveryTrait>
+ <jenkins.plugins.git.traits.WipeWorkspaceTrait>
+ <extension class="hudson.plugins.git.extensions.impl.WipeWorkspace"/>
+ </jenkins.plugins.git.traits.WipeWorkspaceTrait>
+ </traits>
+ </source>
+ </jenkins.branch.BranchSource>
+ </data>
+ <owner class="org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject" reference="../.."/>
+ </sources>
+ <factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory" plugin="workflow-multibranch">
+ <owner class="org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject" reference="../.."/>
+ <scriptPath>Jenkinsfile</scriptPath>
+ </factory>
+</org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineMultiBranchDefaultsProject>
diff --git a/tests/multibranch/fixtures/multibranch_defaults.yaml b/tests/multibranch/fixtures/multibranch_defaults_path_mode.yaml
index 51e41beb..51e41beb 100644
--- a/tests/multibranch/fixtures/multibranch_defaults.yaml
+++ b/tests/multibranch/fixtures/multibranch_defaults_path_mode.yaml
diff --git a/tests/multibranch/fixtures/scm_github_full.xml b/tests/multibranch/fixtures/scm_github_full.xml
index 2d914b2b..6a52b72a 100644
--- a/tests/multibranch/fixtures/scm_github_full.xml
+++ b/tests/multibranch/fixtures/scm_github_full.xml
@@ -107,6 +107,11 @@
<org.jenkinsci.plugins.workflow.multibranch.DurabilityHintBranchProperty plugin="workflow-multibranch">
<hint>MAX_SURVIVABILITY</hint>
</org.jenkinsci.plugins.workflow.multibranch.DurabilityHintBranchProperty>
+ <com.adobe.jenkins.github__pr__comment__build.TriggerPRCommentBranchProperty plugin="github-pr-comment-build">
+ <commentBody>Ci build!</commentBody>
+ </com.adobe.jenkins.github__pr__comment__build.TriggerPRCommentBranchProperty>
+ <com.adobe.jenkins.github__pr__comment__build.TriggerPRReviewBranchProperty plugin="github-pr-comment-build"/>
+ <com.adobe.jenkins.github__pr__comment__build.TriggerPRUpdateBranchProperty plugin="github-pr-comment-build"/>
</a>
</properties>
</strategy>
diff --git a/tests/multibranch/fixtures/scm_github_full.yaml b/tests/multibranch/fixtures/scm_github_full.yaml
index 42350c67..591e0fd8 100644
--- a/tests/multibranch/fixtures/scm_github_full.yaml
+++ b/tests/multibranch/fixtures/scm_github_full.yaml
@@ -20,6 +20,9 @@ scm:
all-branches:
- suppress-scm-triggering: true
- pipeline-branch-durability-override: max-survivability
+ - trigger-build-on-pr-comment: "Ci build!"
+ - trigger-build-on-pr-review: true
+ - trigger-build-on-pr-update: true
build-strategies:
- tags:
ignore-tags-newer-than: 1
diff --git a/tests/multibranch/fixtures/scm_github_no_origin_pr_discovery.xml b/tests/multibranch/fixtures/scm_github_no_origin_pr_discovery.xml
new file mode 100644
index 00000000..d700a816
--- /dev/null
+++ b/tests/multibranch/fixtures/scm_github_no_origin_pr_discovery.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject plugin="workflow-multibranch">
+ <properties/>
+ <views>
+ <hudson.model.AllView>
+ <name>All</name>
+ <filterExecutors>false</filterExecutors>
+ <filterQueue>false</filterQueue>
+ <properties class="hudson.model.View$PropertyList"/>
+ <owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../../.."/>
+ </hudson.model.AllView>
+ </views>
+ <viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
+ <folderViews class="jenkins.branch.MultiBranchProjectViewHolder" plugin="branch-api">
+ <owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
+ </folderViews>
+ <healthMetrics>
+ <com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric plugin="cloudbees-folder">
+ <nonRecursive>false</nonRecursive>
+ </com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric>
+ </healthMetrics>
+ <icon class="jenkins.branch.MetadataActionFolderIcon" plugin="branch-api">
+ <owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
+ </icon>
+ <orphanedItemStrategy class="com.cloudbees.hudson.plugins.folder.computed.DefaultOrphanedItemStrategy" plugin="cloudbees-folder">
+ <pruneDeadBranches>true</pruneDeadBranches>
+ <daysToKeep>-1</daysToKeep>
+ <numToKeep>-1</numToKeep>
+ </orphanedItemStrategy>
+ <triggers/>
+ <sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
+ <data>
+ <jenkins.branch.BranchSource>
+ <source class="org.jenkinsci.plugins.github_branch_source.GitHubSCMSource" plugin="github-branch-source">
+ <id>gh-johndoe-foo</id>
+ <repoOwner>johndoe</repoOwner>
+ <repository>foo</repository>
+ <traits>
+ <org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
+ <strategyId>1</strategyId>
+ </org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
+ <org.jenkinsci.plugins.github__branch__source.ForkPullRequestDiscoveryTrait>
+ <strategyId>1</strategyId>
+ <trust class="org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustContributors"/>
+ </org.jenkinsci.plugins.github__branch__source.ForkPullRequestDiscoveryTrait>
+ <jenkins.plugins.git.traits.WipeWorkspaceTrait>
+ <extension class="hudson.plugins.git.extensions.impl.WipeWorkspace"/>
+ </jenkins.plugins.git.traits.WipeWorkspaceTrait>
+ </traits>
+ </source>
+ </jenkins.branch.BranchSource>
+ </data>
+ <owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
+ </sources>
+ <factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory">
+ <owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
+ <scriptPath>Jenkinsfile</scriptPath>
+ </factory>
+</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject>
diff --git a/tests/multibranch/fixtures/scm_github_no_origin_pr_discovery.yaml b/tests/multibranch/fixtures/scm_github_no_origin_pr_discovery.yaml
new file mode 100644
index 00000000..7852137e
--- /dev/null
+++ b/tests/multibranch/fixtures/scm_github_no_origin_pr_discovery.yaml
@@ -0,0 +1,7 @@
+name: 'demo-multibranch-github-no-fork-prs'
+project-type: multibranch
+scm:
+ - github:
+ repo: 'foo'
+ repo-owner: 'johndoe'
+ discover-pr-origin: no