From: Adam Rozman Date: Tue, 29 Oct 2024 10:59:09 +0000 (+0200) Subject: convert fullstack ghprb PR test job to prow job X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=332cdeb97d1f960b19cad74078745db74e5abb4a;p=infra%2Fcicd.git convert fullstack ghprb PR test job to prow job This commit: - Configures both the PR and the periodic fullstack jobs to use the dynamic pipeline script. - Adds Prow specific parameters for both the PR and periodic fullstack test jjbs. - Removes the IPA_REF parameter from both the PR and the periodic fullstack jobs as that parameter will have no role in the future in the IPA building. Notes: - The PR fullstack test is planned to be triggered by Prow. Signed-off-by: Adam Rozman Change-Id: I322a9442ea5e5beb861cc94ea200f36548dfad9b --- diff --git a/jjb/metal3/job_fullstack_project-infra_building_test.yml b/jjb/metal3/job_fullstack_project_infra_building_test_prow.yml similarity index 78% rename from jjb/metal3/job_fullstack_project-infra_building_test.yml rename to jjb/metal3/job_fullstack_project_infra_building_test_prow.yml index ad450df6..da043dd8 100644 --- a/jjb/metal3/job_fullstack_project-infra_building_test.yml +++ b/jjb/metal3/job_fullstack_project_infra_building_test_prow.yml @@ -25,8 +25,8 @@ # The pipeline scripts are maintained in Nordix/metal3-dev-tools repository. - job-template: - id: fullstack_project-infra_building - name: '{job_prefix}_fullstack_project-infra_building' + id: fullstack_project_infra_building_test_prow + name: '{job_prefix}-project-infra-fullstack-test' description: "Build and test a Metal3 cluster stack from source." project-type: pipeline defaults: global @@ -53,10 +53,6 @@ name: IPA_REPO default: 'https://opendev.org/openstack/ironic-python-agent.git' description: "The default Git repository of IPA" - - string: - name: IPA_REF - default: 'HEAD' - description: 'Ironic Python Agent repository reference to use for the build. Example: refs/changes/84/800084/22' - string: name: IPA_BRANCH default: 'master' @@ -150,29 +146,36 @@ default: 'HEAD' description: 'Cluster API Git repository commit hash to build' - string: - name: PROJECT_REPO_ORG - default: '{repo[org]}' + name: STAGING + default: 'false' + description: 'Configures IPA builder upload mode (staging/review)' + # Parameters set by Prow + - string: + name: BUILD_ID + description: 'Used by Prow when triggering jobs' + - string: + name: PROW_JOB_ID + description: 'Used by Prow when triggering jobs' + - string: + name: REPO_OWNER + default: 'metal3-io' description: 'Project github repo org name' - string: - name: PROJECT_REPO_NAME - default: '{repo[name]}' + name: REPO_NAME + default: 'project-infra' description: 'Project github repo name' - string: - name: ghprbActualCommit + name: PULL_BASE_REF default: 'main' - 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' + description: 'Ref name of the base branch' - string: - name: ghprbTargetBranch + name: PULL_PULL_SHA default: 'main' - description: 'Target branch of the PR' + description: 'Pull request head SHA' - string: - name: STAGING - default: 'false' - description: 'Configures IPA builder upload mode (staging/review)' + name: PULL_NUMBER + description: 'Pull request number' + # End of Prow parameters properties: - build-discarder: @@ -180,30 +183,9 @@ 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: '.*?/test-metal3-fullstack.*?' - 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: - - 'main' - status-context: "test-metal3-fullstack" - success-status: "Passed" - failure-status: "Failed" - error-status: "Error" - cancel-builds-on-update: True + triggers: [] + pipeline-scm: scm: - git: @@ -217,9 +199,11 @@ honor-refspec: True shallow-clone: False included-regions: - - "jenkins/scripts/ipa_builder_elements/.*" - - "jenkins/scripts/build_ipa.sh" - - "jenkins/scripts/run_build_ironic.sh" - - "jenkins/scripts/start_centos_fullstack_build.sh" - script-path: "jenkins/jobs/fullstack_building.pipeline" + - "jenkins/scripts/artifactory/.*" + - "jenkins/scripts/harbor/.*" + - "jenkins/scripts/dynamic_worker_workflow/ipa_builder_elements/.*" + - "jenkins/scripts/dynamic_worker_workflow/build_ipa.sh" + - "jenkins/scripts/dynamic_worker_workflow/fullstack.sh" + - "jenkins/scripts/dynamic_worker_workflow/fullstack_build_ironic.sh" + script-path: "jenkins/jobs/dynamic_fullstack_building.pipeline" lightweight-checkout: False diff --git a/jjb/metal3/job_periodic_fullstack_building.yml b/jjb/metal3/job_periodic_fullstack_building.yml index 290e592a..7fe089f3 100644 --- a/jjb/metal3/job_periodic_fullstack_building.yml +++ b/jjb/metal3/job_periodic_fullstack_building.yml @@ -53,10 +53,6 @@ name: IPA_REPO default: 'https://opendev.org/openstack/ironic-python-agent.git' description: "The default Git repository of IPA" - - string: - name: IPA_REF - default: 'HEAD' - description: 'Ironic Python Agent repository reference to use for the build. Example: refs/changes/84/800084/22' - string: name: IPA_BRANCH default: 'master' @@ -153,6 +149,24 @@ name: STAGING default: 'true' description: 'Configures IPA builder upload mode (staging/review)' + # Fakeing Prow parameters + - string: + name: REPO_OWNER + default: 'metal3-io' + description: 'Project github repo org name' + - string: + name: REPO_NAME + default: 'project-infra' + description: 'Project github repo name' + - string: + name: PULL_BASE_REF + default: 'main' + description: 'Ref name of the base branch' + - string: + name: PULL_PULL_SHA + default: 'main' + description: 'Pull request head SHA' + # End of fakeing Prow parameters properties: - github: diff --git a/jjb/metal3/projects.yml b/jjb/metal3/projects.yml index f89e3f3e..0423fdfa 100644 --- a/jjb/metal3/projects.yml +++ b/jjb/metal3/projects.yml @@ -66,7 +66,7 @@ org: "metal3-io" name: "project-infra" jobs: - - fullstack_project-infra_building + - fullstack_project_infra_building_test_prow - periodic_fullstack_building - project: