Tests: project-type should also be taken from defaults

Change-Id: Idf5bff0f96eb34ffaedf44eafa7a6ccd4449dd3d
This commit is contained in:
Vsevolod Fedorov 2023-02-15 10:30:45 +03:00
parent 1f43cfb8a8
commit b3d9ad1cd2
4 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<flow-definition plugin="workflow-job">
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps">
<script>build job: &quot;job1&quot;
</script>
<sandbox>false</sandbox>
</definition>
<actions/>
<description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
<keepDependencies>false</keepDependencies>
<properties>
<org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/>
</properties>
</flow-definition>

View File

@ -0,0 +1,11 @@
# Project type defined at defaults should be honored.
- defaults:
name: custom
project-type: pipeline
- job:
name: sample-job
defaults: custom
dsl: |
build job: "job1"

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<flow-definition plugin="workflow-job">
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps">
<script>build job: &quot;job1&quot;
</script>
<sandbox>false</sandbox>
</definition>
<actions/>
<description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
<keepDependencies>false</keepDependencies>
<properties>
<org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/>
</properties>
</flow-definition>

View File

@ -0,0 +1,16 @@
# Project type defined at defaults should be honored.
- defaults:
name: custom
project-type: pipeline
- job-template:
name: sample-job
defaults: custom
dsl: |
build job: "job1"
- project:
name: sample-name
jobs:
- sample-job