Mohammed Boukhalfa | 1502a7f | 2024-02-02 18:06:17 +0200 | [diff] [blame] | 1 | --- |
| 2 | # |
| 3 | # ============LICENSE_START======================================================= |
| 4 | # Copyright (C) 2021 Nordix Foundation. |
| 5 | # ================================================================================ |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ============LICENSE_END========================================================= |
| 20 | |
| 21 | # Description: |
| 22 | # ============ |
| 23 | # This file contains job template definition for building the full stack of Metal3 |
| 24 | # from source. This job can be triggered on PRs manually. It creates a pipeline job. |
| 25 | # The pipeline scripts are maintained in Nordix/metal3-dev-tools repository. |
| 26 | |
| 27 | - job-template: |
Sunnatillo | 03fba5f | 2024-08-05 11:55:52 +0300 | [diff] [blame] | 28 | id: fullstack_project-infra_building |
| 29 | name: '{job_prefix}_fullstack_project-infra_building' |
Mohammed Boukhalfa | 1502a7f | 2024-02-02 18:06:17 +0200 | [diff] [blame] | 30 | description: "Build and test a Metal3 cluster stack from source." |
| 31 | project-type: pipeline |
| 32 | defaults: global |
| 33 | disabled: False |
| 34 | concurrent: True |
| 35 | parameters: |
| 36 | - string: |
| 37 | name: IRONIC_REFSPEC |
| 38 | default: '' |
| 39 | description: 'Gerrit refspec of the patch we want to test. Example: refs/changes/84/800084/22' |
| 40 | - string: |
| 41 | name: IRONIC_IMAGE_REPO_COMMIT |
| 42 | default: 'HEAD' |
| 43 | description: 'Metal3 Ironic image Git repository commit hash to build' |
| 44 | - string: |
| 45 | name: IRONIC_IMAGE_BRANCH |
| 46 | default: 'main' |
| 47 | description: 'Metal3 Ironic image Git repository branch to build' |
| 48 | - string: |
| 49 | name: IRONIC_INSPECTOR_REFSPEC |
| 50 | default: '' |
| 51 | description: 'Gerrit refspec of the patch we want to test. Example: refs/changes/84/800084/22' |
| 52 | - string: |
| 53 | name: IPA_REPO |
| 54 | default: 'https://opendev.org/openstack/ironic-python-agent.git' |
| 55 | description: "The default Git repository of IPA" |
| 56 | - string: |
| 57 | name: IPA_REF |
| 58 | default: 'HEAD' |
| 59 | description: 'Ironic Python Agent repository reference to use for the build. Example: refs/changes/84/800084/22' |
| 60 | - string: |
| 61 | name: IPA_BRANCH |
| 62 | default: 'master' |
| 63 | description: 'Ironic Python Agent repository branch to build' |
| 64 | - string: |
| 65 | name: IPA_BUILDER_REPO |
| 66 | default: 'https://opendev.org/openstack/ironic-python-agent-builder.git' |
| 67 | description: 'Ironic Python Agent builder Git repository' |
| 68 | - string: |
| 69 | name: IPA_BUILDER_BRANCH |
| 70 | default: 'master' |
| 71 | description: 'Ironic Python Agent builder Git repository tool branch' |
| 72 | - string: |
| 73 | name: IPA_BUILDER_COMMIT |
| 74 | default: 'HEAD' |
| 75 | description: 'Ironic Python Agent builder Git repository tool commit' |
| 76 | - string: |
| 77 | name: METAL3_DEV_ENV_REPO |
| 78 | default: 'https://github.com/metal3-io/metal3-dev-env.git' |
| 79 | description: 'The Git repository of metal3-dev-env' |
| 80 | - string: |
| 81 | name: METAL3_DEV_ENV_BRANCH |
| 82 | default: 'main' |
| 83 | description: 'Metal3 dev-env Git repository branch' |
| 84 | - string: |
| 85 | name: METAL3_DEV_ENV_COMMIT |
| 86 | default: 'HEAD' |
| 87 | description: 'Metal3 dev-env Git repository commit' |
| 88 | - bool: |
| 89 | name: BUILD_BMO_LOCALLY |
| 90 | default: true |
| 91 | description: 'Enable or disable BMO local building (enabled by default)' |
| 92 | - bool: |
| 93 | name: BUILD_CAPM3_LOCALLY |
| 94 | default: true |
| 95 | description: 'Enable or disable CAPM3 local building (enabled by default)' |
| 96 | - bool: |
| 97 | name: BUILD_IPAM_LOCALLY |
| 98 | default: true |
| 99 | description: 'Enable or disable IPAM local building (enabled by default)' |
| 100 | - bool: |
| 101 | name: BUILD_CAPI_LOCALLY |
| 102 | default: false |
| 103 | description: 'Enable or disable CAPI local building (disabled by default)' |
| 104 | - string: |
| 105 | name: BMOREPO |
| 106 | default: 'https://github.com/metal3-io/baremetal-operator.git' |
| 107 | description: 'The Git reposiotry used to build BMO' |
| 108 | - string: |
| 109 | name: BMO_BRANCH |
| 110 | default: 'main' |
| 111 | description: 'Bare Metal Operator Git repository branch to build' |
| 112 | - string: |
| 113 | name: BMO_COMMIT |
| 114 | default: 'HEAD' |
| 115 | description: 'Cluster API provider Metal3 Git repository commit hash to build' |
| 116 | - string: |
| 117 | name: CAPM3_REPO |
| 118 | default: 'https://github.com/metal3-io/cluster-api-provider-metal3.git' |
| 119 | description: 'The Git reposiotry used to build Cluster API provider Metal3' |
| 120 | - string: |
| 121 | name: CAPM3_BRANCH |
| 122 | default: 'main' |
| 123 | description: 'Cluster API provider Metal3 Git repository branch to build' |
| 124 | - string: |
| 125 | name: CAPM3_COMMIT |
| 126 | default: 'HEAD' |
| 127 | description: 'Cluster API provider Metal3 Git repository commit hash to build' |
| 128 | - string: |
| 129 | name: IPAM_REPO |
| 130 | default: 'https://github.com/metal3-io/ip-address-manager.git' |
| 131 | description: 'IP Address Manager Git repository branch to build' |
| 132 | - string: |
| 133 | name: IPAM_BRANCH |
| 134 | default: 'main' |
| 135 | description: 'IP Address Manager Git repository branch to build' |
| 136 | - string: |
| 137 | name: IPAM_COMMIT |
| 138 | default: 'HEAD' |
| 139 | description: 'IP Address Manager Git repository commit hash to build' |
| 140 | - string: |
| 141 | name: CAPI_REPO |
| 142 | default: 'https://github.com/kubernetes-sigs/cluster-api.git' |
| 143 | description: 'Cluster API Git repository branch to build' |
| 144 | - string: |
| 145 | name: CAPI_BRANCH |
| 146 | default: 'main' |
| 147 | description: 'Cluster API Git repository branch to build' |
| 148 | - string: |
| 149 | name: CAPI_COMMIT |
| 150 | default: 'HEAD' |
| 151 | description: 'Cluster API Git repository commit hash to build' |
| 152 | - string: |
| 153 | name: PROJECT_REPO_ORG |
| 154 | default: '{repo[org]}' |
| 155 | description: 'Project github repo org name' |
| 156 | - string: |
| 157 | name: PROJECT_REPO_NAME |
| 158 | default: '{repo[name]}' |
| 159 | description: 'Project github repo name' |
| 160 | - string: |
| 161 | name: ghprbActualCommit |
| 162 | default: 'main' |
| 163 | description: 'CI Repo branch for triggering manual build' |
| 164 | - string: |
| 165 | name: ghprbAuthorRepoGitUrl |
| 166 | default: 'https://github.com/{repo[org]}/{repo[name]}.git' |
| 167 | description: 'CI Repo URL for triggering manual build' |
| 168 | - string: |
| 169 | name: ghprbTargetBranch |
| 170 | default: 'main' |
| 171 | description: 'Target branch of the PR' |
| 172 | - string: |
| 173 | name: STAGING |
| 174 | default: 'false' |
| 175 | description: 'Configures IPA builder upload mode (staging/review)' |
| 176 | |
| 177 | properties: |
| 178 | - build-discarder: |
| 179 | days-to-keep: 30 |
| 180 | num-to-keep: 300 |
| 181 | artifact-days-to-keep: -1 |
| 182 | artifact-num-to-keep: -1 |
| 183 | - github: |
| 184 | url: https://github.com/{repo[org]}/{repo[name]} |
| 185 | |
| 186 | triggers: |
| 187 | - github-pull-request: |
| 188 | admin-list: |
| 189 | - '{ci_github_admin_user}' |
| 190 | org-list: "{ci_github_whitelist_org}" |
| 191 | cron: 'H/5 * * * *' |
| 192 | auth-id: "{ci_ghprb_auth_id}" |
Nauman Yaseen | 4426dc6 | 2024-02-21 13:49:40 +0000 | [diff] [blame] | 193 | trigger-phrase: '.*?/test-metal3-fullstack.*?' |
Mohammed Boukhalfa | 1502a7f | 2024-02-02 18:06:17 +0200 | [diff] [blame] | 194 | skip-build-phrase: '/skip-test' |
| 195 | only-trigger-phrase: True |
| 196 | github-hooks: True |
| 197 | permit-all: False |
| 198 | auto-close-on-fail: False |
| 199 | allow-whitelist-orgs-as-admins: True |
| 200 | white-list-target-branches: |
| 201 | - 'main' |
| 202 | status-context: "test-metal3-fullstack" |
| 203 | success-status: "Passed" |
| 204 | failure-status: "Failed" |
| 205 | error-status: "Error" |
| 206 | cancel-builds-on-update: True |
| 207 | pipeline-scm: |
| 208 | scm: |
| 209 | - git: |
| 210 | url: "{ci_github_repo}" |
| 211 | credentials-id: "{ci_github_jenkins_credentials_id}" |
| 212 | branches: |
| 213 | - '{branch|main}' |
| 214 | name: 'origin' |
| 215 | refspec: '+refs/heads/*:refs/remotes/origin/*' |
| 216 | wipe-workspace: True |
| 217 | honor-refspec: True |
| 218 | shallow-clone: False |
| 219 | included-regions: |
| 220 | - "jenkins/scripts/ipa_builder_elements/.*" |
| 221 | - "jenkins/scripts/build_ipa.sh" |
| 222 | - "jenkins/scripts/run_build_ironic.sh" |
| 223 | - "jenkins/scripts/start_centos_fullstack_build.sh" |
| 224 | script-path: "jenkins/jobs/fullstack_building.pipeline" |
| 225 | lightweight-checkout: False |