Skip to content

Commit

Permalink
Fetch changes from pr-id when triggering from prow
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammed Boukhalfa <mohammed.boukhalfa@est.tech>
  • Loading branch information
mboukhalfa committed Mar 4, 2024
1 parent 25e7815 commit 2830f3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jenkins/scripts/files/run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ if [[ "${UPDATED_REPO}" != *"${REPO_ORG}/${REPO_NAME}"* ]] ||
git config user.name "Test"
git remote add test "${UPDATED_REPO}"
git fetch test
# if triggered from prow we cannot get the ghprbAuthorRepoGitUrl then we pull the PR
git fetch origin pull/${PR_ID:-0}/head:"${UPDATED_BRANCH}-branch" || true
# Merging the PR with the target branch
git merge "${UPDATED_BRANCH}" || exit
fi
Expand Down
2 changes: 2 additions & 0 deletions jenkins/scripts/integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ REPO_ORG="${REPO_ORG:-metal3-io}"
REPO_NAME="${REPO_NAME:-metal3-dev-env}"
UPDATED_REPO="${UPDATED_REPO:-https://github.com/${REPO_ORG}/${REPO_NAME}.git}"
UPDATED_BRANCH="${UPDATED_BRANCH:-main}"
PR_ID="${PR_ID}"
CAPI_VERSION="${CAPI_VERSION:-v1beta1}"
CAPM3_VERSION="${CAPM3_VERSION:-v1beta1}"
CAPM3RELEASEBRANCH="${CAPM3RELEASEBRANCH:-main}"
Expand Down Expand Up @@ -140,6 +141,7 @@ REPO_NAME="${REPO_NAME}"
REPO_BRANCH="${REPO_BRANCH}"
UPDATED_REPO="${UPDATED_REPO}"
UPDATED_BRANCH="${UPDATED_BRANCH}"
PR_ID="${PR_ID}"
CAPI_VERSION="${CAPI_VERSION}"
CAPM3_VERSION="${CAPM3_VERSION}"
CAPM3RELEASEBRANCH="${CAPM3RELEASEBRANCH}"
Expand Down

0 comments on commit 2830f3c

Please sign in to comment.