Skip to content

Commit

Permalink
chore(idx): don't upload artifacts on PRs to rc-* (#3987)
Browse files Browse the repository at this point in the history
This stops uploading artifacts to S3 when a PR is targetting an `rc-*`
branch.

We did this at some point as an experiment but we don't have a use case
for this anymore.
  • Loading branch information
nmattia authored Feb 17, 2025
1 parent 5b947cb commit 85c8f63
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/actions/bazel-test-all/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ runs:
BUILDEVENT_APIKEY: ${{ inputs.BUILDEVENT_APIKEY }}
CI_EVENT_NAME: ${{ github.event_name }}
CI_JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
CI_PULL_REQUEST_TARGET_BRANCH_NAME: ${{ github.event.pull_request.base.ref }}
MERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }}
SSH_PRIVATE_KEY_BACKUP_POD: ${{ inputs.SSH_PRIVATE_KEY_BACKUP_POD }}
GPG_PASSPHRASE: ${{ inputs.GPG_PASSPHRASE }}
2 changes: 1 addition & 1 deletion ci/bazel-scripts/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ done

# if we are on a protected branch or targeting a rc branch we set release build, ic_version to the commit_sha and
# upload to s3
if [[ "${IS_PROTECTED_BRANCH:-}" == "true" ]] || [[ "${CI_PULL_REQUEST_TARGET_BRANCH_NAME:-}" == "rc--"* ]]; then
if [[ "${IS_PROTECTED_BRANCH:-}" == "true" ]]; then
ic_version_rc_only="${CI_COMMIT_SHA}"
s3_upload="True"
release_build="true"
Expand Down
3 changes: 1 addition & 2 deletions ci/src/git_changes/git_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@


def target_branch() -> str:
default_branch = os.getenv("CI_DEFAULT_BRANCH", "master")
return os.getenv("CI_PULL_REQUEST_TARGET_BRANCH_NAME", default_branch)
return os.getenv("CI_DEFAULT_BRANCH", "master")


def git_fetch_target_branch(git_repo, max_attempts=10):
Expand Down

0 comments on commit 85c8f63

Please sign in to comment.