From 3a1c2e497538948556640941f9accee2eb9dd476 Mon Sep 17 00:00:00 2001 From: Mohammed Boukhalfa Date: Mon, 4 Mar 2024 15:21:13 +0200 Subject: [PATCH] Make basic e2e test triggerable from prow runnable on project-infra and fix branch issue Signed-off-by: Mohammed Boukhalfa --- jenkins/jobs/prow_integration_tests.pipeline | 11 ++++++++--- prow/manifests/overlays/metal3/config.yaml | 12 +++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/jenkins/jobs/prow_integration_tests.pipeline b/jenkins/jobs/prow_integration_tests.pipeline index 8c0497f5..e434ae2a 100644 --- a/jenkins/jobs/prow_integration_tests.pipeline +++ b/jenkins/jobs/prow_integration_tests.pipeline @@ -11,10 +11,15 @@ KUBECTL_SHA256=(env.KUBECTL_SHA256) script { UPDATED_REPO = "https://github.com/${env.REPO_OWNER}/${env.REPO_NAME}.git" - echo "Checkout ${UPDATED_REPO} main" - // Set defaults for non-PR jobs ci_git_url = "https://github.com/metal3-io/project-infra.git" - ci_git_branch = "main" + + if ("${PROJECT_REPO_ORG}" == "metal3-io" && "${PROJECT_REPO_NAME}" == "project-infra") { + ci_git_branch = (env.PULL_PULL_SHA) ?: (env.ghprbActualCommit) ?: "main" + } else { + ci_git_branch = "main" + } + echo "Checkout ${ci_git_url} branch ${ci_git_branch}" + def date = new Date() def dateFormat = new SimpleDateFormat("yyyyMMddHHmmss") def rand = new Random() diff --git a/prow/manifests/overlays/metal3/config.yaml b/prow/manifests/overlays/metal3/config.yaml index e74f3aed..9248437b 100644 --- a/prow/manifests/overlays/metal3/config.yaml +++ b/prow/manifests/overlays/metal3/config.yaml @@ -1139,7 +1139,7 @@ presubmits: value: "TRUE" image: docker.io/golang:1.19 imagePullPolicy: Always - # name: {job_prefix}_{proj}_{capm3_target_branch}_e2e_basic_test_{image_os} + # name: {job_prefix}-{proj}-{capm3_target_branch}-e2e-basic-test-{image_os} - name: metal3-capm3-main-e2e-basic-test-centos branches: - main @@ -1149,6 +1149,16 @@ presubmits: always_run: false # Until we have checked that it works, keep it optional optional: true + # name: {job_prefix}-{proj}-{capm3_target_branch}-e2e-basic-test-{image_os} + - name: metal3-project_infra-main-e2e-basic-test-centos + branches: + - main + - release-1.6 + agent: jenkins + # Don't run unless triggered to avoid wasting resources + always_run: false + # Until we have checked that it works, keep it optional + optional: true metal3-io/community: - name: markdownlint