Skip to content

Commit

Permalink
TASK: Passthru the target branch
Browse files Browse the repository at this point in the history
  • Loading branch information
markusguenther committed Sep 20, 2024
1 parent 8905c2e commit 863412f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
17 changes: 12 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ jobs:
name: Login to GitHub
command: |
echo $AUTH_TOKEN_GITHUB | gh auth login --with-token
- run:
name: Define target branch
command: |
TARGET_BRANCH=$(gh pr view $CIRCLE_PULL_REQUEST --json baseRefName --jq '.baseRefName')
echo "Target Branch: $TARGET_BRANCH"
- run:
name: Install Sauce Connect
command: |
Expand All @@ -131,6 +126,18 @@ jobs:
background: true
command: sc run --username ${SAUCE_USERNAME} --access-key ${SAUCE_ACCESS_KEY} --tunnel-name "circleci-tunnel" --region "us-west-1" --proxy-localhost allow
- run:
name: Define target branch
command: |
TARGET_BRANCH=$(gh pr view $CIRCLE_PULL_REQUEST --json baseRefName --jq '.baseRefName')
echo "Target Branch: $TARGET_BRANCH"
# Save the variable to BASH_ENV to be able to access it in the next steps
echo "export TARGET_BRANCH=$TARGET_BRANCH" >> $BASH_ENV
- run:
name: Use target branch
command: |
echo "Using target branch: $TARGET_BRANCH"
- run:
name: Prepare and run e2e tests
no_output_timeout: 30m
command: |
export NVM_DIR="$HOME/.nvm"
Expand Down
2 changes: 1 addition & 1 deletion .sauce/config1Dimension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sauce:
tags:
- e2e
- $TARGET_BRANCH
build: Release $CI_COMMIT_SHORT_SHA
build: $TARGET_BRANCH
tunnel:
name: "circleci-tunnel"
testcafe:
Expand Down
2 changes: 1 addition & 1 deletion .sauce/config2Dimension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sauce:
tags:
- e2e
- $TARGET_BRANCH
build: Release $CI_COMMIT_SHORT_SHA
build: $TARGET_BRANCH
tunnel:
name: "circleci-tunnel"
testcafe:
Expand Down

0 comments on commit 863412f

Please sign in to comment.