feat: change downloadurl and add fallback on setup action#146
Merged
feat: change downloadurl and add fallback on setup action#146
Conversation
5fd14c4 to
6b740f8
Compare
docs: add comment chore: snyk exec
6b740f8 to
7c6dead
Compare
j-luong
reviewed
Jul 24, 2024
j-luong
reviewed
Jul 25, 2024
setup/setup_snyk.sh
Outdated
| # $2: Output file name | ||
| download_file() { | ||
| # Try to download from the main URL | ||
| if curl --compressed --retry 2 --output "$2" "$MAIN_URL/$1?utm_source=GITHUB_ACTIONS"; then |
Contributor
There was a problem hiding this comment.
suggestion(magic strings): let's move the "GITHUB_ACTIONS" string to a var and reuse it in ln68 and for the SNYK_INTEGRATION_NAME parameter defined in ln44.
j-luong
approved these changes
Jul 26, 2024
j-luong
added a commit
that referenced
this pull request
Jul 26, 2024
…)" This reverts commit 2db9624.
j-luong
added a commit
that referenced
this pull request
Jul 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR changes the default download url to https://downloads.snyk.io, adds a backup URL that uses https://static.sn yk.io, for downloading the Snyk CLI
Changes
download_filefunction that attempts to download from the main URL first, then the backup URL if neededMotivation
This is done as part of our AKAMAI Ion <> Download Delivery migration
Testing
Tested the script to ensure:
Please review and test in your environment to ensure it meets our reliability standards.