Skip to content

Commit

Permalink
Merge pull request #674 from Nordix/Update-feature-tests-pipeline-to-…
Browse files Browse the repository at this point in the history
…be-triggerable-from-prow/mohammed

Update feature tests pipeline to trigger them from prow
  • Loading branch information
metal3-io-bot authored Mar 25, 2024
2 parents 5731b7a + 6e7a455 commit d1fe309
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions jenkins/jobs/parallel_e2e_features_test.pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ def NODE_REUSE_TIMEOUT = 18000
KEEP_TEST_ENV = (env.KEEP_TEST_ENV)

script {
PROJECT_REPO_ORG = (env.REPO_OWNER) ?: (env.PROJECT_REPO_ORG)
PROJECT_REPO_NAME = (env.REPO_NAME) ?: (env.PROJECT_REPO_NAME)
UPDATED_REPO = "https://github.com/${PROJECT_REPO_ORG}/${PROJECT_REPO_NAME}.git"
echo "Test triggered from ${UPDATED_REPO}"

if ("${PROJECT_REPO_ORG}" == "metal3-io" && "${PROJECT_REPO_NAME}" == "project-infra") {
echo "Checkout ${ghprbAuthorRepoGitUrl} branch ${ghprbActualCommit}"
ci_git_branch = "${ghprbActualCommit}"
ci_git_url = "${ghprbAuthorRepoGitUrl}"
ci_git_branch = (env.PULL_PULL_SHA) ?: (env.ghprbActualCommit) ?: "main"
ci_git_url = (env.ghprbAuthorRepoGitUrl) ?: "https://github.com/metal3-io/project-infra.git"
} else {
echo "Checkout ${ghprbAuthorRepoGitUrl} main"
ci_git_branch = "main"
ci_git_url = "https://github.com/metal3-io/project-infra.git"
}
echo "Checkout ${ci_git_url} branch ${ci_git_branch}"

def date = new Date()
def dateFormat = new SimpleDateFormat("yyyyMMddHHmmss")
Expand All @@ -31,6 +35,13 @@ script {
}.join("")

agent_label="metal3ci-large-${IMAGE_OS}"

UPDATED_BRANCH = (env.PULL_PULL_SHA) ?: (env.ghprbActualCommit)
REPO_BRANCH = (env.PULL_BASE_REF) ?: (env.ghprbTargetBranch)
if (!env.REPO_OWNER) {
UPDATED_REPO = "${ghprbAuthorRepoGitUrl}"
}

}

pipeline {
Expand All @@ -39,11 +50,11 @@ pipeline {
METAL3_CI_USER = "metal3ci"
REPO_ORG = "${PROJECT_REPO_ORG}"
REPO_NAME = "${PROJECT_REPO_NAME}"
UPDATED_REPO = "${ghprbAuthorRepoGitUrl}"
REPO_BRANCH = "${ghprbTargetBranch}"
UPDATED_BRANCH = "${ghprbActualCommit}"
UPDATED_REPO = "${UPDATED_REPO}"
REPO_BRANCH = "${REPO_BRANCH}"
UPDATED_BRANCH = "${UPDATED_BRANCH}"
BUILD_TAG = "${env.BUILD_TAG}"
PR_ID = "${ghprbPullId}"
PR_ID = "${env.PULL_NUMBER}"
IMAGE_OS = "${IMAGE_OS}"
CAPI_VERSION = "${CAPI_VERSION}"
CAPM3_VERSION = "${CAPM3_VERSION}"
Expand Down

0 comments on commit d1fe309

Please sign in to comment.