206e7909fc1c6fe999070264a3f41d29fc88a102
[infra/cicd.git] / jjb / metal3 / job_capm3_periodic_e2e_k8s_upgrade_tests_prow.yml
1 #
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2024 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 # Description:
21 # ============
22 # This file contains job template definition for Cluster API Provider Metal3 (CAPM3) main e2e k8s upgrade tests.
23 # This job can be triggered manually or periodically by the CI system. It creates a
24 # pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
25
26 - job-template:
27     id: capm3_periodic_e2e_k8s_upgrade_tests_prow
28     name: '{job_prefix}-periodic-e2e-{k8s_versions}-upgrade-{capm3_target_branch}'
29     description: "CAPM3 e2e k8s upgrade tests on ubuntu."
30     project-type: pipeline
31     defaults: global
32     disabled: False
33     concurrent: True
34     parameters:
35     # Parameters set by Prow
36     - string:
37         name: BUILD_ID
38         description: 'Used by Prow when triggering jobs'
39     - string:
40         name: PROW_JOB_ID
41         description: 'Used by Prow when triggering jobs'
42     - string:
43         name: REPO_OWNER
44         default: 'metal3-io'
45         description: 'Project github repo org name'
46     - string:
47         name: REPO_NAME
48         default: 'cluster-api-provider-metal3'
49         description: 'Project github repo name'
50     - string:
51         name: PULL_BASE_REF
52         default: '{capm3_release_branch}'
53         description: 'Ref name of the base branch'
54     - string:
55         name: PULL_PULL_SHA
56         default: '{capm3_release_branch}'
57         description: 'Pull request head SHA'
58     - string:
59         name: PULL_NUMBER
60         description: 'Pull request number'
61     # End of Prow parameters
62     - string:
63         name: IMAGE_OS
64         default: "ubuntu"
65         description: 'Distribution to use for the target host as well as source and target cluster. Default is ubuntu'
66     - string:
67         name: capm3_release_branch
68         default: '{capm3_release_branch}'
69         description: 'The target branch of CAPM3 to be used for this test'
70     - string:
71         name: bmo_release_branch
72         default: '{bmo_release_branch}'
73         description: 'The target branch of BMO to be used for this test'
74     - string:
75         name: CAPI_VERSION
76         default: 'v1beta1'
77         description: 'Cluster API version. E.g. v1beta1.'
78     - string:
79         name: CAPM3_VERSION
80         default: 'v1beta1'
81         description: 'Cluster API provider Metal3 version. E.g. v1beta1.'
82     - string:
83         name: TARGET_NODE_MEMORY
84         default: 4096
85         description: 'RAM size of the target host.'
86     - string:
87         name: NUM_NODES
88         default: 4
89         description: 'Number of libvirt VMs.'
90     - string:
91         name: GINKGO_FOCUS
92         default: "k8s-upgrade"
93         description: 'Select the e2e upgrade test'
94     - string:
95         name: KUBERNETES_VERSION_UPGRADE_FROM
96         default: '{k8s_version_upgrade_from}'
97         description: 'Kubernetes version upgrade from'
98     - string:
99         name: KUBERNETES_VERSION_UPGRADE_TO
100         default: '{k8s_version_upgrade_to}'
101         description: 'Kubernetes version upgrade to'
102
103     properties:
104     - build-discarder:
105         days-to-keep: 30
106         num-to-keep: 300
107         artifact-days-to-keep: -1
108         artifact-num-to-keep: -1
109
110     triggers:
111     - timed: "{schedule}"
112
113     pipeline-scm:
114       scm:
115       - git:
116           url: "{ci_github_repo}"
117           credentials-id: "{ci_github_jenkins_credentials_id}"
118           branches:
119           - '{branch|main}'
120           name: 'origin'
121           refspec: '+refs/heads/*:refs/remotes/origin/*'
122           wipe-workspace: True
123           honor-refspec: True
124           shallow-clone: False
125       script-path: "{e2e_tests_pipeline}"
126       lightweight-checkout: False