-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(IDX): use github.ref_protected where applicable #3936
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,16 +11,6 @@ ic_version_rc_only="0000000000000000000000000000000000000000" | |
release_build="false" | ||
s3_upload="False" | ||
|
||
protected_branches=("master" "rc--*" "hotfix-*" "master-private") | ||
|
||
# if we are on a protected branch or targeting a rc branch we set ic_version to the commit_sha and upload to s3 | ||
for pattern in "${protected_branches[@]}"; do | ||
if [[ "$BRANCH_NAME" == $pattern ]]; then | ||
IS_PROTECTED_BRANCH="true" | ||
break | ||
fi | ||
done | ||
|
||
Comment on lines
-14
to
-23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately and confusingly setting In ic-private the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @basvandijk arguably this is an issue in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that we shouldn't protect So I think it's indeed a naming issue. Maybe we should use a different wordt than "PROTECTED" above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe:
|
||
# 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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmattia it looks like we had this logic before, but it didn't work as expected:
#1504
I think we would need to test this first to make sure this variable does show up as
true
on protected branches.