-
Notifications
You must be signed in to change notification settings - Fork 235
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
Sign MacOS Binaries with JFrog Certificate #2563
base: dev
Are you sure you want to change the base?
Conversation
f8c06b3
to
4342c49
Compare
421e986
to
4342c49
Compare
local cooldown=15 # Cooldown in seconds between retries | ||
local retry_count=0 | ||
|
||
while [ $retry_count -lt $max_retries ]; do |
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.
@yahavi,
In here we can't use curl --retry, because the curl execution will be okay as it queries all the artifacts from the repo.
The retry is when the query doesn't return the specific version and release version executable, which we try to filter from the response.
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_ACCESS_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
-s https://api.github.com/repos/eyaldelarea/jfrog-cli/actions/artifacts) |
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.
-s https://api.github.com/repos/eyaldelarea/jfrog-cli/actions/artifacts) | |
-s https://api.github.com/repos/jfrog/jfrog-cli/actions/artifacts) |
response=$(curl -L \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_ACCESS_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ |
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.
According to the documentation:
When a new REST API version is released, the previous API version will be supported for at least 24 more months following the release of the new API version.
Let's use the latest API
cliExecutableName=$1 | ||
releaseVersion=$2 | ||
goarch=$3 | ||
GITHUB_ACCESS_TOKEN=$4 | ||
|
||
# This script downloads signed macOS binaries for a specific version and architecture. |
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.
cliExecutableName=$1 | |
releaseVersion=$2 | |
goarch=$3 | |
GITHUB_ACCESS_TOKEN=$4 | |
# This script downloads signed macOS binaries for a specific version and architecture. | |
# Script Purpose: Download signed macOS binaries for a specific version and architecture. | |
# The name of the CLI executable to be processed - jfrog or jf | |
cliExecutableName=$1 | |
# The version of the release being processed | |
releaseVersion=$2 | |
# The architecture of the macOS binary to be downloaded - amd64 or arm64 | |
goarch=$3 | |
# GitHub Access Token for authentication | |
GITHUB_ACCESS_TOKEN=$4 |
GITHUB_ACCESS_TOKEN=$3 # GitHub Access Token for authentication | ||
|
||
# Trigger | ||
curl -L \ |
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.
Let's add --retry
fi | ||
|
||
# Download the artifact | ||
curl -L \ |
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.
Let's add --retry
dev
branch.go vet ./...
.go fmt ./...
.Sign Darwin Binaries during Release
This PR introduce a way to integrate darwin signed executables singing during the CLI release.
Darwin Release Flow:
TODO Before merging: