metal3: Parameterize version and reorganize projects 97/12497/3
authorLennart Jern <lennart.jern@est.tech>
Tue, 15 Feb 2022 06:27:59 +0000 (08:27 +0200)
committerLennart Jern <lennart.jern@est.tech>
Fri, 25 Feb 2022 07:35:59 +0000 (09:35 +0200)
By parameterizing the version, it was possible to reduce the number of files since
we used to have one job-template for each version.

Second, the projects.yml is reorganized so that we have projects based
on the different types of tests (e.g. integration and feature) instead
of based on the repository. This is because the test type has more in
common than the repository, so fewer things are duplicated.

Change-Id: I620254144f27861871c5b449afd74e9f1e0dd3a0

20 files changed:
jjb/metal3/job_bml_integration_tests.yml [moved from jjb/metal3/job_bml_integration_tests_centos.yml with 86% similarity]
jjb/metal3/job_bml_main_integration_tests.yml [moved from jjb/metal3/job_bml_main_integration_tests_centos.yml with 89% similarity]
jjb/metal3/job_capm3_e2e_tests.yml [moved from jjb/metal3/job_capm3_v1b1_e2e_tests.yml with 86% similarity]
jjb/metal3/job_capm3_e2e_upgrade_tests.yml [moved from jjb/metal3/job_capm3_v1b1_e2e_upgrade_tests_ubuntu.yml with 91% similarity]
jjb/metal3/job_capm3_main_e2e_tests.yml [moved from jjb/metal3/job_capm3_v1b1_main_e2e_tests.yml with 90% similarity]
jjb/metal3/job_capm3_main_integration_tests.yml [moved from jjb/metal3/job_capm3_v1b1_main_integration_tests.yml with 87% similarity]
jjb/metal3/job_capm3_v1a4_integration_tests.yml [deleted file]
jjb/metal3/job_capm3_v1a5_e2e_tests.yml [deleted file]
jjb/metal3/job_capm3_v1a5_integration_tests.yml [deleted file]
jjb/metal3/job_capm3_v1a5_main_e2e_tests.yml [deleted file]
jjb/metal3/job_capm3_v1a5_main_integration_tests.yml [deleted file]
jjb/metal3/job_feature_tests.yml
jjb/metal3/job_feature_tests_upgrade.yml [moved from jjb/metal3/job_feature_tests_upgrade_ubuntu.yml with 92% similarity]
jjb/metal3/job_integration_tests.yml [moved from jjb/metal3/job_capm3_v1b1_integration_tests.yml with 84% similarity]
jjb/metal3/job_keep_integration_vm.yml [moved from jjb/metal3/job_keep_integration_vm_v1b1.yml with 84% similarity]
jjb/metal3/job_keep_integration_vm_v1a5.yml [deleted file]
jjb/metal3/job_main_feature_tests.yml
jjb/metal3/job_main_feature_tests_upgrade.yml [moved from jjb/metal3/job_main_feature_tests_upgrade_ubuntu.yml with 91% similarity]
jjb/metal3/job_metal3_dev_tools_integration_test.yml
jjb/metal3/projects.yml

similarity index 86%
rename from jjb/metal3/job_bml_integration_tests_centos.yml
rename to jjb/metal3/job_bml_integration_tests.yml
index 8e85e169016436ea8c07feb30b968bfb9b23e895..582e3d3bd6cc642f4a1a81f1c1f7b25ae1204ace 100644 (file)
@@ -26,9 +26,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: bml_integration_tests_centos
-    name: '{job_prefix}_{name}_bml_integration_tests_centos'
-    description: "CAPM3 v1beta1 integration tests for {repo[org]}/{repo[name]} on CentOS in Bare Metal Lab."
+    id: bml_integration_tests
+    name: '{job_prefix}_{proj}_bml_integration_tests_{image_os}'
+    description: "CAPM3 v1beta1 integration tests for {org}/{repo} on {image_os} in Bare Metal Lab."
     project-type: pipeline
     defaults: global
     disabled: False
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -48,7 +48,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
@@ -56,7 +56,7 @@
         description: 'Target branch of the PR'
     - string:
         name: IMAGE_OS
-        default: 'centos'
+        default: '{image_os}'
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
@@ -78,7 +78,7 @@
         artifact-days-to-keep: -1
         artifact-num-to-keep: -1
     - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
+        url: https://github.com/{org}/{repo}
 
     triggers:
     - github-pull-request:
@@ -87,7 +87,7 @@
         org-list: "{ci_github_whitelist_org}"
         cron: 'H/5 * * * *'
         auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/test-integration-bml-centos(\s(.|\n)*)?'
+        trigger-phrase: '((.|\n)*\s)?/test-integration-bml-{image_os}(\s(.|\n)*)?'
         skip-build-phrase: '/skip-test'
         only-trigger-phrase: True
         github-hooks: True
@@ -97,7 +97,7 @@
         white-list-target-branches:
           - 'master'
           - 'main'
-        status-context: "test-integration-bml-centos"
+        status-context: "test-integration-bml-{image_os}"
         success-status: "Passed"
         failure-status: "Failed"
         error-status: "Error"
similarity index 89%
rename from jjb/metal3/job_bml_main_integration_tests_centos.yml
rename to jjb/metal3/job_bml_main_integration_tests.yml
index 161abee425499bdd622aa89dafeb9932e4fee925..a40174e51abb2711c578725a5c67755ae28360de 100644 (file)
@@ -26,9 +26,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: bml_main_integration_tests_centos
-    name: '{job_prefix}_main_bml_integration_tests_centos'
-    description: "CAPM3 v1beta1 main integration tests for {repo[org]}/{repo[name]} on CentOS in Bare Metal Lab."
+    id: bml_main_integration_tests
+    name: '{job_prefix}_main_bml_integration_tests_{image_os}'
+    description: "CAPM3 v1beta1 main integration tests for {org}/{repo} on {image_os} in Bare Metal Lab."
     project-type: pipeline
     defaults: global
     disabled: False
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -48,7 +48,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
@@ -56,7 +56,7 @@
         description: 'Target branch of the PR'
     - string:
         name: IMAGE_OS
-        default: 'centos'
+        default: '{image_os}'
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
similarity index 86%
rename from jjb/metal3/job_capm3_v1b1_e2e_tests.yml
rename to jjb/metal3/job_capm3_e2e_tests.yml
index 76fad92e2f86c30de6ee854c92ed74317b46f6e3..ddf801a3424d5d3425e84d634581961368ffd41a 100644 (file)
@@ -25,9 +25,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: capm3_v1b1_e2e_tests
-    name: '{job_prefix}_{name}_v1b1_e2e_test_{image_os}'
-    description: "CAPM3 v1beta1 e2e tests for {repo[org]}/{repo[name]} on {image_os}."
+    id: capm3_e2e_tests
+    name: '{job_prefix}_{name}_{version}_e2e_test_{image_os}'
+    description: "CAPM3 {capm3_version} e2e tests for {repo[org]}/{repo[name]} on {image_os}."
     project-type: pipeline
     defaults: global
     disabled: False
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
-        default: 'v1beta1'
-        description: 'Cluster API version. Can be v1beta1.'
+        default: '{capi_version}'
+        description: 'Cluster API version. E.g. v1beta1.'
     - string:
         name: CAPM3_VERSION
-        default: 'v1beta1'
-        description: 'Cluster API provider Metal3 version. Can be v1beta1.'
+        default: '{capm3_version}'
+        description: 'Cluster API provider Metal3 version. E.g. v1beta1.'
     - string:
         name: TARGET_NODE_MEMORY
         default: 4096
         org-list: "{ci_github_whitelist_org}"
         cron: 'H/5 * * * *'
         auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/test-v1b1-{image_os}-e2e(\s(.|\n)*)?'
+        trigger-phrase: '((.|\n)*\s)?/test-{version}-{image_os}-e2e(\s(.|\n)*)?'
         skip-build-phrase: '/skip-test'
         only-trigger-phrase: True
         github-hooks: True
         permit-all: False
         auto-close-on-fail: False
         allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'master'
-          - 'main'
-        status-context: "test-v1b1-{image_os}-e2e"
+        white-list-target-branches: "{target_branches}"
+        status-context: "test-{version}-{image_os}-e2e"
         success-status: "Passed"
         failure-status: "Failed"
         error-status: "Error"
similarity index 91%
rename from jjb/metal3/job_capm3_v1b1_e2e_upgrade_tests_ubuntu.yml
rename to jjb/metal3/job_capm3_e2e_upgrade_tests.yml
index 72ad3e823708250102afb65b9e61eb904748b87b..b02651b559d2ae5120249a9034716ec961d6439e 100644 (file)
@@ -25,9 +25,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: capm3_v1b1_e2e_upgrade_tests_ubuntu
-    name: '{job_prefix}_{name}_v1b1_e2e_upgrade_test_ubuntu'
-    description: "CAPM3 v1beta1 e2e upgrade tests for {repo[org]}/{repo[name]} on Ubuntu."
+    id: capm3_e2e_upgrade_tests
+    name: '{job_prefix}_{name}_v1b1_e2e_upgrade_test_{image_os}'
+    description: "CAPM3 e2e upgrade tests for {repo[org]}/{repo[name]} on {image_os}."
     project-type: pipeline
     defaults: global
     disabled: False
         description: 'Target branch of the PR'
     - string:
         name: IMAGE_OS
-        default: 'ubuntu'
+        default: '{image_os}'
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
         default: 'v1beta1'
-        description: 'Cluster API version. Can be v1beta1.'
+        description: 'Cluster API version. E.g. v1beta1.'
     - string:
         name: CAPM3_VERSION
         default: 'v1beta1'
-        description: 'Cluster API provider Metal3 version. Can be v1beta1.'
+        description: 'Cluster API provider Metal3 version. E.g. v1beta1.'
     - string:
         name: TARGET_NODE_MEMORY
         default: 4096
similarity index 90%
rename from jjb/metal3/job_capm3_v1b1_main_e2e_tests.yml
rename to jjb/metal3/job_capm3_main_e2e_tests.yml
index d0b44a80af5a5d7bb2d477e10285fab02036ce72..255e95c7f3d7773894d16a6af8fcc21ded71fa03 100644 (file)
@@ -25,9 +25,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: capm3_v1b1_main_e2e_tests
-    name: '{job_prefix}_main_v1b1_e2e_test_{image_os}'
-    description: "CAPM3 v1beta1 e2e tests for {repo[org]}/{repo[name]} on {image_os}."
+    id: capm3_main_e2e_tests
+    name: '{job_prefix}_main_{version}_e2e_test_{image_os}'
+    description: "CAPM3 {capm3_version} e2e tests for {repo[org]}/{repo[name]} on {image_os}."
     project-type: pipeline
     defaults: global
     disabled: False
@@ -43,7 +43,7 @@
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
-        default: 'main'
+        default: '{capm3_branch}'
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
@@ -51,7 +51,7 @@
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
-        default: 'main'
+        default: '{capm3_branch}'
         description: 'Target branch of the PR'
     - string:
         name: IMAGE_OS
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
-        default: 'v1beta1'
+        default: '{capi_version}'
         description: 'Cluster API version.'
     - string:
         name: CAPM3_VERSION
-        default: 'v1beta1'
+        default: '{capm3_version}'
         description: 'Cluster API provider Metal3 version.'
     - string:
         name: TARGET_NODE_MEMORY
@@ -86,7 +86,7 @@
         artifact-num-to-keep: -1
 
     triggers:
-      - timed: "H 20 * * *"
+      - timed: "{schedule}"
 
     pipeline-scm:
       scm:
similarity index 87%
rename from jjb/metal3/job_capm3_v1b1_main_integration_tests.yml
rename to jjb/metal3/job_capm3_main_integration_tests.yml
index e63a1698c6bcc488221219cd8c3f056f708153ce..1221a8ba1b14f608169de851dcd008371f763ddd 100644 (file)
@@ -25,9 +25,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: capm3_v1b1_main_integration_tests
-    name: '{job_prefix}_main_v1b1_integration_test_{image_os}'
-    description: "CAPM3 v1beta1 integration tests for {repo[org]}/{repo[name]} on {image_os}."
+    id: capm3_main_integration_tests
+    name: '{job_prefix}_main_{version}_integration_test_{image_os}'
+    description: "CAPM3 {capm3_version} integration tests for {org}/{repo} on {image_os}."
     project-type: pipeline
     defaults: global
     disabled: False
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -47,7 +47,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
-        default: 'v1beta1'
+        default: '{capi_version}'
         description: 'Cluster API version.'
     - string:
         name: CAPM3_VERSION
-        default: 'v1beta1'
+        default: '{capm3_version}'
         description: 'Cluster API provider Metal3 version.'
     - string:
         name: TARGET_NODE_MEMORY
@@ -78,7 +78,7 @@
         artifact-num-to-keep: -1
 
     triggers:
-      - timed: "H 4 * * *"
+      - timed: "{schedule}"
 
     pipeline-scm:
       scm:
diff --git a/jjb/metal3/job_capm3_v1a4_integration_tests.yml b/jjb/metal3/job_capm3_v1a4_integration_tests.yml
deleted file mode 100644 (file)
index 0dc6599..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# Description:
-# ============
-# This file contains job template definition for Cluster API Provider Metal3 (CAPM3) integration tests.
-# This job can be triggered manually or through a Github pull request. It creates a
-# pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
-
-- job-template:
-    id: capm3_v1a4_integration_tests
-    name: '{job_prefix}_{name}_v1a4_integration_test_{image_os}'
-    description: "CAPM3 v1alpha4 integration tests for {repo[org]}/{repo[name]} on {image_os}."
-    project-type: pipeline
-    defaults: global
-    disabled: False
-    concurrent: True
-    parameters:
-    - string:
-        name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
-        description: 'Project github repo org name'
-    - string:
-        name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
-        description: 'Project github repo name'
-    - string:
-        name: ghprbActualCommit
-        default: 'master'
-        description: 'CI Repo branch for triggering manual build'
-    - string:
-        name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
-        description: 'CI Repo URL for triggering manual build'
-    - string:
-        name: ghprbTargetBranch
-        default: 'master'
-        description: 'Target branch of the PR'
-    - string:
-        name: IMAGE_OS
-        default: '{image_os}'
-        description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
-    - string:
-        name: CAPI_VERSION
-        default: 'v1alpha3'
-        description: 'Cluster API version. Can be v1alpha3.'
-    - string:
-        name: CAPM3_VERSION
-        default: 'v1alpha4'
-        description: 'Cluster API provider Metal3 version. Can be v1alpha4 or v1alpha5.'
-    - string:
-        name: TARGET_NODE_MEMORY
-        default: 4096
-        description: 'RAM size of the target host.'
-
-    properties:
-    - build-discarder:
-        days-to-keep: 30
-        num-to-keep: 300
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-    - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
-
-    triggers:
-    - github-pull-request:
-        admin-list:
-          - '{ci_github_admin_user}'
-        org-list: "{ci_github_whitelist_org}"
-        cron: 'H/5 * * * *'
-        auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/test-v1a4-{image_os}-integration(\s(.|\n)*)?'
-        skip-build-phrase: '/skip-test'
-        only-trigger-phrase: True
-        github-hooks: True
-        permit-all: False
-        auto-close-on-fail: False
-        allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'master'
-          - 'main'
-          - 'release-0.4'
-          - 'release-0.0'
-        status-context: "test-v1a4-{image_os}-integration"
-        success-status: "Passed"
-        failure-status: "Failed"
-        error-status: "Error"
-        cancel-builds-on-update: True
-    pipeline-scm:
-      scm:
-      - git:
-          url: "{ci_github_repo}"
-          credentials-id: "{ci_github_jenkins_credentials_id}"
-          branches:
-            - '{branch|main}'
-          name: 'origin'
-          refspec: '+refs/heads/*:refs/remotes/origin/*'
-          wipe-workspace: True
-          honor-refspec: True
-          shallow-clone: False
-      script-path: "{ci_github_pipeline}"
-      lightweight-checkout: False
diff --git a/jjb/metal3/job_capm3_v1a5_e2e_tests.yml b/jjb/metal3/job_capm3_v1a5_e2e_tests.yml
deleted file mode 100644 (file)
index 57ad750..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2021 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# Description:
-# ============
-# This file contains job template definition for Cluster API Provider Metal3 (CAPM3) e2e tests.
-# This job can be triggered manually or through a Github pull request. It creates a
-# pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
-
-- job-template:
-    id: capm3_v1a5_e2e_tests
-    name: '{job_prefix}_{name}_v1a5_e2e_test_{image_os}'
-    description: "CAPM3 v1alpha5 e2e tests for {repo[org]}/{repo[name]} on {image_os}."
-    project-type: pipeline
-    defaults: global
-    disabled: False
-    concurrent: True
-    parameters:
-    - string:
-        name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
-        description: 'Project github repo org name'
-    - string:
-        name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
-        description: 'Project github repo name'
-    - string:
-        name: ghprbActualCommit
-        default: 'master'
-        description: 'CI Repo branch for triggering manual build'
-    - string:
-        name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
-        description: 'CI Repo URL for triggering manual build'
-    - string:
-        name: ghprbTargetBranch
-        default: 'master'
-        description: 'Target branch of the PR'
-    - string:
-        name: IMAGE_OS
-        default: '{image_os}'
-        description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
-    - string:
-        name: CAPI_VERSION
-        default: 'v1alpha4'
-        description: 'Cluster API version. Can be v1alpha4.'
-    - string:
-        name: CAPM3_VERSION
-        default: 'v1alpha5'
-        description: 'Cluster API provider Metal3 version. Can be v1alpha5 or v1alpha4.'
-    - string:
-        name: TARGET_NODE_MEMORY
-        default: 4096
-        description: 'RAM size of the target host.'
-    - string:
-        name: TESTS_FOR
-        default: "e2e_tests"
-        description: 'Tests using the e2e framework.'
-
-    properties:
-    - build-discarder:
-        days-to-keep: 30
-        num-to-keep: 300
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-    - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
-
-    triggers:
-    - github-pull-request:
-        admin-list:
-          - '{ci_github_admin_user}'
-        org-list: "{ci_github_whitelist_org}"
-        cron: 'H/5 * * * *'
-        auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/test-v1a5-{image_os}-e2e(\s(.|\n)*)?'
-        skip-build-phrase: '/skip-test'
-        only-trigger-phrase: True
-        github-hooks: True
-        permit-all: False
-        auto-close-on-fail: False
-        allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'master'
-          - 'main'
-          - 'release-0.5'
-        status-context: "test-v1a5-{image_os}-e2e"
-        success-status: "Passed"
-        failure-status: "Failed"
-        error-status: "Error"
-        cancel-builds-on-update: True
-    pipeline-scm:
-      scm:
-      - git:
-          url: "{ci_github_repo}"
-          credentials-id: "{ci_github_jenkins_credentials_id}"
-          branches:
-            - '{branch|main}'
-          name: 'origin'
-          refspec: '+refs/heads/*:refs/remotes/origin/*'
-          wipe-workspace: True
-          honor-refspec: True
-          shallow-clone: False
-      script-path: "{ci_github_pipeline}"
-      lightweight-checkout: False
diff --git a/jjb/metal3/job_capm3_v1a5_integration_tests.yml b/jjb/metal3/job_capm3_v1a5_integration_tests.yml
deleted file mode 100644 (file)
index 7c64d11..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# Description:
-# ============
-# This file contains job template definition for Cluster API Provider Metal3 (CAPM3) integration tests.
-# This job can be triggered manually or through a Github pull request. It creates a
-# pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
-
-- job-template:
-    id: capm3_v1a5_integration_tests
-    name: '{job_prefix}_{name}_v1a5_integration_test_{image_os}'
-    description: "CAPM3 v1alpha5 integration tests for {repo[org]}/{repo[name]} on {image_os}."
-    project-type: pipeline
-    defaults: global
-    disabled: False
-    concurrent: True
-    parameters:
-    - string:
-        name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
-        description: 'Project github repo org name'
-    - string:
-        name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
-        description: 'Project github repo name'
-    - string:
-        name: ghprbActualCommit
-        default: 'master'
-        description: 'CI Repo branch for triggering manual build'
-    - string:
-        name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
-        description: 'CI Repo URL for triggering manual build'
-    - string:
-        name: ghprbTargetBranch
-        default: 'master'
-        description: 'Target branch of the PR'
-    - string:
-        name: IMAGE_OS
-        default: '{image_os}'
-        description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
-    - string:
-        name: CAPI_VERSION
-        default: 'v1alpha4'
-        description: 'Cluster API version.'
-    - string:
-        name: CAPM3_VERSION
-        default: 'v1alpha5'
-        description: 'Cluster API provider Metal3 version.'
-    - string:
-        name: TARGET_NODE_MEMORY
-        default: 4096
-        description: 'RAM size of the target host.'
-
-    properties:
-    - build-discarder:
-        days-to-keep: 30
-        num-to-keep: 300
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-    - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
-
-    triggers:
-    - github-pull-request:
-        admin-list:
-          - '{ci_github_admin_user}'
-        org-list: "{ci_github_whitelist_org}"
-        cron: 'H/5 * * * *'
-        auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/test-v1a5-{image_os}-integration(\s(.|\n)*)?'
-        skip-build-phrase: '/skip-test'
-        only-trigger-phrase: True
-        github-hooks: True
-        permit-all: False
-        auto-close-on-fail: False
-        allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'master'
-          - 'main'
-          - 'release-0.5'
-          - 'release-0.1'
-        status-context: "test-v1a5-{image_os}-integration"
-        success-status: "Passed"
-        failure-status: "Failed"
-        error-status: "Error"
-        cancel-builds-on-update: True
-    pipeline-scm:
-      scm:
-      - git:
-          url: "{ci_github_repo}"
-          credentials-id: "{ci_github_jenkins_credentials_id}"
-          branches:
-            - '{branch|main}'
-          name: 'origin'
-          refspec: '+refs/heads/*:refs/remotes/origin/*'
-          wipe-workspace: True
-          honor-refspec: True
-          shallow-clone: False
-      script-path: "{ci_github_pipeline}"
-      lightweight-checkout: False
diff --git a/jjb/metal3/job_capm3_v1a5_main_e2e_tests.yml b/jjb/metal3/job_capm3_v1a5_main_e2e_tests.yml
deleted file mode 100644 (file)
index afa4dd3..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# Description:
-# ============
-# This file contains job template definition for Cluster API Provider Metal3 (CAPM3) main e2e tests.
-# This job can be triggered manually or periodically by the CI system. It creates a
-# pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
-
-- job-template:
-    id: capm3_v1a5_main_e2e_tests
-    name: '{job_prefix}_main_v1a5_e2e_test_{image_os}'
-    description: "CAPM3 v1alpha5 main e2e tests for {repo[org]}/{repo[name]} on {image_os}."
-    project-type: pipeline
-    defaults: global
-    disabled: False
-    concurrent: True
-    parameters:
-    - string:
-        name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
-        description: 'Project github repo org name'
-    - string:
-        name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
-        description: 'Project github repo name'
-    - string:
-        name: ghprbActualCommit
-        default: 'release-0.5'
-        description: 'CI Repo branch for triggering manual build'
-    - string:
-        name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
-        description: 'CI Repo URL for triggering manual build'
-    - string:
-        name: ghprbTargetBranch
-        default: 'release-0.5'
-        description: 'Target branch of the PR'
-    - string:
-        name: IMAGE_OS
-        default: '{image_os}'
-        description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
-    - string:
-        name: CAPI_VERSION
-        default: 'v1alpha4'
-        description: 'Cluster API version.'
-    - string:
-        name: CAPM3_VERSION
-        default: 'v1alpha5'
-        description: 'Cluster API provider Metal3 version.'
-    - string:
-        name: TARGET_NODE_MEMORY
-        default: 4096
-        description: 'RAM size of the target host.'
-    - string:
-        name: NUM_NODES
-        default: 4
-        description: 'Number of libvirt VMs.'
-    - string:
-        name: TESTS_FOR
-        default: "e2e_tests"
-        description: 'Tests using the e2e framework.'
-
-    properties:
-    - build-discarder:
-        days-to-keep: 30
-        num-to-keep: 300
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-
-    triggers:
-      - timed: "H 20 * * *"
-
-    pipeline-scm:
-      scm:
-      - git:
-          url: "{ci_github_repo}"
-          credentials-id: "{ci_github_jenkins_credentials_id}"
-          branches:
-            - '{branch|main}'
-          name: 'origin'
-          refspec: '+refs/heads/*:refs/remotes/origin/*'
-          wipe-workspace: True
-          honor-refspec: True
-          shallow-clone: False
-      script-path: "{ci_github_pipeline}"
-      lightweight-checkout: False
diff --git a/jjb/metal3/job_capm3_v1a5_main_integration_tests.yml b/jjb/metal3/job_capm3_v1a5_main_integration_tests.yml
deleted file mode 100644 (file)
index 05c65ed..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# Description:
-# ============
-# This file contains job template definition for Cluster API Provider Metal3 (CAPM3) main integration tests.
-# This job can be triggered manually or through a Github pull request. It creates a
-# pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
-
-- job-template:
-    id: capm3_v1a5_main_integration_tests
-    name: '{job_prefix}_main_v1a5_integration_test_{image_os}'
-    description: "CAPM3 v1alpha5 main integration tests for {repo[org]}/{repo[name]} on {image_os}."
-    project-type: pipeline
-    defaults: global
-    disabled: False
-    concurrent: True
-    parameters:
-    - string:
-        name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
-        description: 'Project github repo org name'
-    - string:
-        name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
-        description: 'Project github repo name'
-    - string:
-        name: ghprbActualCommit
-        default: 'master'
-        description: 'CI Repo branch for triggering manual build'
-    - string:
-        name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
-        description: 'CI Repo URL for triggering manual build'
-    - string:
-        name: ghprbTargetBranch
-        default: 'master'
-        description: 'Target branch of the PR'
-    - string:
-        name: IMAGE_OS
-        default: '{image_os}'
-        description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
-    - string:
-        name: CAPI_VERSION
-        default: 'v1alpha4'
-        description: 'Cluster API version.'
-    - string:
-        name: CAPM3_VERSION
-        default: 'v1alpha5'
-        description: 'Cluster API provider Metal3 version.'
-    - string:
-        name: TARGET_NODE_MEMORY
-        default: 4096
-        description: 'RAM size of the target host.'
-
-    properties:
-    - build-discarder:
-        days-to-keep: 30
-        num-to-keep: 300
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-
-    triggers:
-      - timed: "30 4 * * *"
-
-    pipeline-scm:
-      scm:
-      - git:
-          url: "{ci_github_repo}"
-          credentials-id: "{ci_github_jenkins_credentials_id}"
-          branches:
-            - '{branch|main}'
-          name: 'origin'
-          refspec: '+refs/heads/*:refs/remotes/origin/*'
-          wipe-workspace: True
-          honor-refspec: True
-          shallow-clone: False
-      script-path: "{ci_github_pipeline}"
-      lightweight-checkout: False
index a51f5f51ef1b760ce16d930cad98cb51e83bb9e6..4aba1085c7217d24fa643018381a1ca55eecb216 100644 (file)
@@ -26,7 +26,7 @@
 
 - job-template:
     id: feature_tests
-    name: '{job_prefix}_{name}_feature_tests_{image_os}'
+    name: '{job_prefix}_{proj}_feature_tests_{image_os}'
     description: "Inspection, remediation, pivoting, node reuse and repivoting feature tests on {image_os}."
     project-type: pipeline
     defaults: global
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -47,7 +47,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
@@ -85,7 +85,7 @@
         artifact-days-to-keep: -1
         artifact-num-to-keep: -1
     - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
+        url: https://github.com/{org}/{repo}
 
     triggers:
     - github-pull-request:
similarity index 92%
rename from jjb/metal3/job_feature_tests_upgrade_ubuntu.yml
rename to jjb/metal3/job_feature_tests_upgrade.yml
index ef751b019acef183cfeb2dff6e853b4622458f24..fb44f5b2f3e675dff3009a5573b3117c2a10d274 100644 (file)
@@ -26,9 +26,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: feature_tests_upgrade_ubuntu
-    name: '{job_prefix}_{name}_feature_tests_upgrade_ubuntu'
-    description: "Upgrade tests on Ubuntu."
+    id: feature_tests_upgrade
+    name: '{job_prefix}_{proj}_feature_tests_upgrade_{image_os}'
+    description: "Upgrade tests on {image_os}."
     project-type: pipeline
     defaults: global
     disabled: False
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -48,7 +48,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
@@ -56,7 +56,7 @@
         description: 'Target branch of the PR'
     - string:
         name: IMAGE_OS
-        default: 'ubuntu'
+        default: '{image_os}'
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
@@ -92,7 +92,7 @@
         artifact-days-to-keep: -1
         artifact-num-to-keep: -1
     - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
+        url: https://github.com/{org}/{repo}
 
     triggers:
     - github-pull-request:
similarity index 84%
rename from jjb/metal3/job_capm3_v1b1_integration_tests.yml
rename to jjb/metal3/job_integration_tests.yml
index 26ef8aef0045288fb4f362087ab31e472f0c9838..c8e52af9ad84d35b4f2bf44692b4aa234b10baee 100644 (file)
@@ -25,9 +25,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: capm3_v1b1_integration_tests
-    name: '{job_prefix}_{name}_v1b1_integration_test_{image_os}'
-    description: "CAPM3 v1beta1 integration tests for {repo[org]}/{repo[name]} on {image_os}."
+    id: integration_tests
+    name: '{job_prefix}_{proj}_{version}_integration_test_{image_os}'
+    description: "CAPM3 {capm3_version} integration tests for {org}/{repo} on {image_os}."
     project-type: pipeline
     defaults: global
     disabled: False
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -47,7 +47,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
-        default: 'v1beta1'
+        default: '{capi_version}'
         description: 'Cluster API version.'
     - string:
         name: CAPM3_VERSION
-        default: 'v1beta1'
+        default: '{capm3_version}'
         description: 'Cluster API provider Metal3 version.'
     - string:
         name: TARGET_NODE_MEMORY
@@ -77,7 +77,7 @@
         artifact-days-to-keep: -1
         artifact-num-to-keep: -1
     - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
+        url: https://github.com/{org}/{repo}
 
     triggers:
     - github-pull-request:
         org-list: "{ci_github_whitelist_org}"
         cron: 'H/5 * * * *'
         auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/test-v1b1-{image_os}-integration(\s(.|\n)*)?'
+        trigger-phrase: '((.|\n)*\s)?/test-{version}-{image_os}-integration(\s(.|\n)*)?'
         skip-build-phrase: '/skip-test'
         only-trigger-phrase: True
         github-hooks: True
         permit-all: False
         auto-close-on-fail: False
         allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'master'
-          - 'main'
-        status-context: "test-v1b1-{image_os}-integration"
+        white-list-target-branches: "{target_branches}"
+        status-context: "test-{version}-{image_os}-integration"
         success-status: "Passed"
         failure-status: "Failed"
         error-status: "Error"
similarity index 84%
rename from jjb/metal3/job_keep_integration_vm_v1b1.yml
rename to jjb/metal3/job_keep_integration_vm.yml
index 791dbfc406b1e075dbb928b1d8c06656707fcdf1..6886dc34d25c9f726be2bc0f898024d5e50a5a11 100644 (file)
@@ -26,9 +26,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: keep_v1b1_test_alive
-    name: '{job_prefix}_{name}_keep_v1b1_test_{image_os}_alive'
-    description: "CAPM3 v1beta1 integration tests for keeping the vm for {repo[org]}/{repo[name]} on {image_os}."
+    id: keep_integration_tests
+    name: '{job_prefix}_{proj}_keep_{version}_test_{image_os}_alive'
+    description: "CAPM3 {capm3_version} integration tests for keeping the vm for {org}/{repo} on {image_os}."
     project-type: pipeline
     defaults: global
     disabled: False
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -48,7 +48,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
-        default: 'v1beta1'
+        default: '{capi_version}'
         description: 'Cluster API version.'
     - string:
         name: CAPM3_VERSION
-        default: 'v1beta1'
+        default: '{capm3_version}'
         description: 'Cluster API provider Metal3 version.'
     - string:
         name: TARGET_NODE_MEMORY
@@ -82,7 +82,7 @@
         artifact-days-to-keep: -1
         artifact-num-to-keep: -1
     - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
+        url: https://github.com/{org}/{repo}
 
     triggers:
     - github-pull-request:
         org-list: "{ci_github_whitelist_org}"
         cron: 'H/5 * * * *'
         auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/keep-test-v1b1-{image_os}-integration(\s(.|\n)*)?'
+        trigger-phrase: '((.|\n)*\s)?/keep-test-{version}-{image_os}-integration(\s(.|\n)*)?'
         skip-build-phrase: '/skip-test'
         only-trigger-phrase: True
         github-hooks: True
         permit-all: False
         auto-close-on-fail: False
         allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'master'
-          - 'main'
-        status-context: "keep-test-v1b1-{image_os}-integration"
+        white-list-target-branches: "{target_branches}"
+        status-context: "keep-test-{version}-{image_os}-integration"
         success-status: "Passed"
         failure-status: "Failed"
         error-status: "Error"
diff --git a/jjb/metal3/job_keep_integration_vm_v1a5.yml b/jjb/metal3/job_keep_integration_vm_v1a5.yml
deleted file mode 100644 (file)
index 2405de7..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# Description:
-# ============
-# This file contains job template definition for Cluster API Provider Metal3 (CAPM3)
-# keeping integration test vm.
-# This job can be triggered manually or through a Github pull request. It creates a
-# pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
-
-- job-template:
-    id: keep_v1a5_test_alive
-    name: '{job_prefix}_{name}_keep_v1a5_test_{image_os}_alive'
-    description: "CAPM3 v1alpha5 integration tests for keeping the vm for {repo[org]}/{repo[name]} on {image_os}."
-    project-type: pipeline
-    defaults: global
-    disabled: False
-    concurrent: True
-    parameters:
-    - string:
-        name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
-        description: 'Project github repo org name'
-    - string:
-        name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
-        description: 'Project github repo name'
-    - string:
-        name: ghprbActualCommit
-        default: 'master'
-        description: 'CI Repo branch for triggering manual build'
-    - string:
-        name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
-        description: 'CI Repo URL for triggering manual build'
-    - string:
-        name: ghprbTargetBranch
-        default: 'master'
-        description: 'Target branch of the PR'
-    - string:
-        name: IMAGE_OS
-        default: '{image_os}'
-        description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
-    - string:
-        name: CAPI_VERSION
-        default: 'v1alpha4'
-        description: 'Cluster API version.'
-    - string:
-        name: CAPM3_VERSION
-        default: 'v1alpha5'
-        description: 'Cluster API provider Metal3 version.'
-    - string:
-        name: TARGET_NODE_MEMORY
-        default: 4096
-        description: 'RAM size of the target host.'
-    - string:
-        name: SKIP_DELETION
-        default: 'true'
-        description: 'Whether tester VM should be deleted or not by the end of the test'
-
-    properties:
-    - build-discarder:
-        days-to-keep: 30
-        num-to-keep: 300
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-    - github:
-        url: https://github.com/{repo[org]}/{repo[name]}
-
-    triggers:
-    - github-pull-request:
-        admin-list:
-          - '{ci_github_admin_user}'
-        org-list: "{ci_github_whitelist_org}"
-        cron: 'H/5 * * * *'
-        auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/keep-test-v1a5-{image_os}-integration(\s(.|\n)*)?'
-        skip-build-phrase: '/skip-test'
-        only-trigger-phrase: True
-        github-hooks: True
-        permit-all: False
-        auto-close-on-fail: False
-        allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'master'
-          - 'main'
-          - 'release-0.5'
-          - 'release-0.1'
-        status-context: "keep-test-v1a5-{image_os}-integration"
-        success-status: "Passed"
-        failure-status: "Failed"
-        error-status: "Error"
-        cancel-builds-on-update: True
-    pipeline-scm:
-      scm:
-      - git:
-          url: "{ci_github_repo}"
-          credentials-id: "{ci_github_jenkins_credentials_id}"
-          branches:
-            - '{branch|main}'
-          name: 'origin'
-          refspec: '+refs/heads/*:refs/remotes/origin/*'
-          wipe-workspace: True
-          honor-refspec: True
-          shallow-clone: False
-      script-path: "{ci_github_pipeline}"
-      lightweight-checkout: False
index bedd509406de26b5bd5f0430be0887e154de24ba..bd0a15666ca21618de992f1ab44480d0a4601312 100644 (file)
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -48,7 +48,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
similarity index 91%
rename from jjb/metal3/job_main_feature_tests_upgrade_ubuntu.yml
rename to jjb/metal3/job_main_feature_tests_upgrade.yml
index 6138de05c061474d31556a8c901bf1f040386f36..f7cd89575565578d9e7672a59cdd33ff6e9c5b1c 100644 (file)
@@ -26,9 +26,9 @@
 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
 
 - job-template:
-    id: main_feature_tests_upgrade_ubuntu
-    name: '{job_prefix}_main_feature_tests_upgrade_ubuntu'
-    description: "Upgrade main tests on Ubuntu."
+    id: main_feature_tests_upgrade
+    name: '{job_prefix}_main_feature_tests_upgrade_{image_os}'
+    description: "Upgrade main tests on {image_os}."
     project-type: pipeline
     defaults: global
     disabled: False
     parameters:
     - string:
         name: PROJECT_REPO_ORG
-        default: '{repo[org]}'
+        default: '{org}'
         description: 'Project github repo org name'
     - string:
         name: PROJECT_REPO_NAME
-        default: '{repo[name]}'
+        default: '{repo}'
         description: 'Project github repo name'
     - string:
         name: ghprbActualCommit
@@ -48,7 +48,7 @@
         description: 'CI Repo branch for triggering manual build'
     - string:
         name: ghprbAuthorRepoGitUrl
-        default: 'https://github.com/{repo[org]}/{repo[name]}.git'
+        default: 'https://github.com/{org}/{repo}.git'
         description: 'CI Repo URL for triggering manual build'
     - string:
         name: ghprbTargetBranch
@@ -56,7 +56,7 @@
         description: 'Target branch of the PR'
     - string:
         name: IMAGE_OS
-        default: 'ubuntu'
+        default: '{image_os}'
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: CAPI_VERSION
index 9e19186deb250b8dbdf9d04a4a9a2923e284dac7..4ff6dc2c2e9d581c8127f3cb12c4f1aeb71f6801 100644 (file)
     - string:
         name: CAPI_VERSION
         default: 'v1beta1'
-        description: 'Cluster API version. Can be v1alpha4.'
+        description: 'Cluster API version. E.g. v1beta1.'
     - string:
         name: CAPM3_VERSION
         default: 'v1beta1'
-        description: 'Cluster API provider Metal3 version. Can be v1alpha5 or v1alpha4.'
+        description: 'Cluster API provider Metal3 version. E.g. v1beta1.'
     - string:
         name: TARGET_NODE_MEMORY
         default: 4096
index 8c79f463b43d3e75f9e112a79107925c80990b2c..2ba404079e3f43f5617b9155b93ac10e25ba7389 100644 (file)
     ci_github_repo: 'https://github.com/Nordix/metal3-dev-tools.git'
 
 - project:
-    name: 'project_infra'
-    branch: '${{ghprbActualCommit}}'
-    repo:
-      org: "metal3-io"
-      name: "project-infra"
-    ci_github_repo: '${{ghprbAuthorRepoGitUrl}}'
+    name: integration-tests
+    org: metal3-io
+    proj:
+      - metal3_dev_env:
+          repo: metal3-dev-env
+      - project_infra:
+          repo: project-infra
+          branch: '${{ghprbActualCommit}}'
+          ci_github_repo: '${{ghprbAuthorRepoGitUrl}}'
+      - capm3:
+          repo: cluster-api-provider-metal3
+      - bmo:
+          repo: baremetal-operator
+      - ipam:
+          repo: ip-address-manager
+      - ironic_image:
+          repo: ironic-image
+      - ironic_ipa_downloader:
+          repo: ironic-ipa-downloader
+    image_os:
+      - ubuntu
+      - centos
+    version:
+      - v1b1:
+          capi_version: v1beta1
+          capm3_version: v1beta1
+          target_branches:
+            - 'master'
+            - 'main'
+      - v1a5:
+          capi_version: v1alpha4
+          capm3_version: v1alpha5
+          target_branches:
+            - 'master'
+            - 'main'
+            - 'release-0.5'
+            - 'release-0.1'
+      - v1a4:
+          capi_version: v1alpha3
+          capm3_version: v1alpha4
+          target_branches:
+            - 'master'
+            - 'main'
+            - 'release-0.4'
+            - 'release-0.0'
+    exclude:
+      - proj: ironic_ipa_downloader
+        image_os: centos
+        version: v1a5
+      - proj: ironic_ipa_downloader
+        image_os: centos
+        version: v1a4
     jobs:
-    - capm3_v1a4_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - feature_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - feature_tests_upgrade_ubuntu
-    - bml_integration_tests_centos
-    - keep_v1b1_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1a5_test_alive:
-        image_os:
-          - ubuntu
-          - centos
+      - integration_tests
 
 - project:
-    name: 'project_infra_cleanup'
-    repo:
-      org: "metal3-io"
-      name: "project-infra"
-    ci_github_pipeline: 'jenkins/jobs/integration_tests_clean.pipeline'
+    name: keep-integration-tests-alive
+    org: metal3-io
+    proj:
+      - metal3_dev_env:
+          repo: metal3-dev-env
+      - project_infra:
+          repo: project-infra
+          branch: '${{ghprbActualCommit}}'
+          ci_github_repo: '${{ghprbAuthorRepoGitUrl}}'
+      - capm3:
+          repo: cluster-api-provider-metal3
+      - bmo:
+          repo: baremetal-operator
+      - ipam:
+          repo: ip-address-manager
+      - ironic_image:
+          repo: ironic-image
+    image_os:
+      - ubuntu
+      - centos
+    version:
+      - v1b1:
+          capi_version: v1beta1
+          capm3_version: v1beta1
+          target_branches:
+            - 'master'
+            - 'main'
+      - v1a5:
+          capi_version: v1alpha4
+          capm3_version: v1alpha5
+          target_branches:
+            - 'master'
+            - 'main'
+            - 'release-0.5'
+            - 'release-0.1'
     jobs:
-    - main_clean
+      - keep_integration_tests
 
 - project:
-    name: "bmo"
-    repo:
-      org: "metal3-io"
-      name: "baremetal-operator"
+    name: feature-tests
+    org: metal3-io
+    proj:
+      - metal3_dev_env:
+          repo: metal3-dev-env
+      - project_infra:
+          repo: project-infra
+          branch: '${{ghprbActualCommit}}'
+          ci_github_repo: '${{ghprbAuthorRepoGitUrl}}'
+      - bmo:
+          repo: baremetal-operator
+    image_os:
+      - ubuntu
+      - centos
+    exclude:
+      - proj: bmo
+        image_os: centos
     jobs:
-    - capm3_v1a4_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1b1_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1a5_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-    - feature_tests:
-        image_os: ubuntu
+      - feature_tests
+      - feature_tests_upgrade:
+          exclude:
+            - image_os: centos
+            - proj: bmo
 
 - project:
-    name: "ipam"
-    repo:
-      org: "metal3-io"
-      name: "ip-address-manager"
+    name: metal3-dev-env-main-tests
+    org: metal3-io
+    repo: metal3-dev-env
+    image_os:
+      - ubuntu
+      - centos
     jobs:
-    - capm3_v1a4_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1b1_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1a5_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-
-- project:
-    name: "metal3_dev_env"
-    repo:
-      org: "metal3-io"
-      name: "metal3-dev-env"
-    jobs:
-    - capm3_v1a4_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_main_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_main_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - feature_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - feature_tests_upgrade_ubuntu
-    - main_feature_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - main_feature_tests_upgrade_ubuntu
-    - bml_integration_tests_centos
-    - bml_main_integration_tests_centos
-    - keep_v1b1_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1a5_test_alive:
-        image_os:
-          - ubuntu
-          - centos
+      - main_feature_tests
+      - main_feature_tests_upgrade:
+          exclude:
+            - image_os: centos
+      - capm3_main_integration_tests:
+          version:
+            - v1b1:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                schedule: "H 4 * * *"
+            - v1a5:
+                capi_version: v1alpha4
+                capm3_version: v1alpha5
+                schedule: "30 4 * * *"
 
 - project:
-    name: "capm3"
-    repo:
-      org: "metal3-io"
-      name: "cluster-api-provider-metal3"
+    name: bml-tests
+    org: metal3-io
+    image_os: centos
     jobs:
-    - capm3_v1a4_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_e2e_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_main_e2e_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_e2e_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_e2e_upgrade_tests_ubuntu
-    - capm3_v1b1_main_e2e_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1b1_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1a5_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-
+      - bml_integration_tests:
+          proj:
+            - metal3_dev_env:
+                repo: metal3-dev-env
+            - project_infra:
+                repo: project-infra
+                branch: '${{ghprbActualCommit}}'
+                ci_github_repo: '${{ghprbAuthorRepoGitUrl}}'
+      - bml_main_integration_tests:
+          repo: metal3-dev-env
 
 - project:
-    name: "ironic_image"
+    name: 'project_infra_cleanup'
     repo:
       org: "metal3-io"
-      name: "ironic-image"
+      name: "project-infra"
+    ci_github_pipeline: 'jenkins/jobs/integration_tests_clean.pipeline'
     jobs:
-    - capm3_v1a4_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1a5_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - capm3_v1b1_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1b1_test_alive:
-        image_os:
-          - ubuntu
-          - centos
-    - keep_v1a5_test_alive:
-        image_os:
-          - ubuntu
-          - centos
+    - main_clean
 
 - project:
-    name: "ironic_ipa_downloader"
+    name: "capm3"
     repo:
       org: "metal3-io"
-      name: "ironic-ipa-downloader"
+      name: "cluster-api-provider-metal3"
+    image_os:
+      - ubuntu
+      - centos
     jobs:
-    - capm3_v1a4_integration_tests:
-        image_os: ubuntu
-    - capm3_v1a5_integration_tests:
-        image_os: ubuntu
-    - capm3_v1b1_integration_tests:
-        image_os:
-          - ubuntu
-          - centos
+      - capm3_e2e_upgrade_tests:
+          exclude:
+            - image_os: centos
+      - capm3_e2e_tests:
+          version:
+            - v1b1:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                target_branches:
+                  - 'master'
+                  - 'main'
+            - v1a5:
+                capi_version: v1alpha4
+                capm3_version: v1alpha5
+                target_branches:
+                  - 'master'
+                  - 'main'
+                  - 'release-0.5'
+      - capm3_main_e2e_tests:
+          version:
+            - v1b1:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_branch: main
+                schedule: "H 20 * * *"
+            - v1a5:
+                capi_version: v1alpha4
+                capm3_version: v1alpha5
+                capm3_branch: release-0.5
+                schedule: "H 20 * * *"