Parameterize DISTRIBUTION and merge job templates
[infra/cicd.git] / jjb / metal3 / job_capm3_v1a4_integration_tests.yml
similarity index 92%
rename from jjb/metal3/job_capm3_v1a4_integration_tests_centos.yml
rename to jjb/metal3/job_capm3_v1a4_integration_tests.yml
index 51ee1bf1c3726d4e1bacbe556bf062436f09d873..feb4d7d2b8dbb6a73a11d72bcf418c33a77e14ab 100644 (file)
@@ -25,9 +25,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: capm3_v1a4_integration_tests_centos
-    name: '{job_prefix}_{name}_v1a4_integration_test_centos'
-    description: "CAPM3 v1alpha4 integration tests for {repo[org]}/{repo[name]} on CentOS."
+    id: capm3_v1a4_integration_tests
+    name: '{job_prefix}_{name}_v1a4_integration_test_{distribution}'
+    description: "CAPM3 v1alpha4 integration tests for {repo[org]}/{repo[name]} on {distribution}."
     project-type: pipeline
     defaults: global
     disabled: False
@@ -55,7 +55,7 @@
         description: 'Target branch of the PR'
     - string:
         name: DISTRIBUTION
-        default: 'centos'
+        default: '{distribution}'
         description: 'Distribution to use for the target host and the tests. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
@@ -86,7 +86,7 @@
         org-list: "{ci_github_whitelist_org}"
         cron: 'H/5 * * * *'
         auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/test-v1a4-centos-integration(\s(.|\n)*)?'
+        trigger-phrase: '((.|\n)*\s)?/test-v1a4-{distribution}-integration(\s(.|\n)*)?'
         skip-build-phrase: '/skip-test'
         only-trigger-phrase: True
         github-hooks: True
@@ -98,7 +98,7 @@
           - 'main'
           - 'release-0.4'
           - 'release-0.0'
-        status-context: "test-v1a4-centos-integration"
+        status-context: "test-v1a4-{distribution}-integration"
         success-status: "Passed"
         failure-status: "Failed"
         error-status: "Error"