-
Notifications
You must be signed in to change notification settings - Fork 428
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
Publish packages from CircleCI #4026
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
55bce0a
added debian buster and ubuntu to packages build job
pawlooss1 ecea234
added publish package job
pawlooss1 5b51903
added otp version info to package name
pawlooss1 8262a83
bump otp version for building debian packages
pawlooss1 2023845
Add rockylinux and almalinux package build
pawlooss1 9522a9f
code review follow-up
pawlooss1 5c2ed1f
Publishing only on release
pawlooss1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,21 @@ | ||
#!/usr/bin/env sh | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# Params - override for your env | ||
SHA256SUM="shasum -a 256" | ||
REMOTE_SHA256SUM=sha256sum | ||
PACKAGES_LOCAL=packages | ||
. env/publish | ||
cd tools/pkg/packages | ||
PACKAGE_NAME=$(ls) | ||
PKG_PROFILE=packages | ||
prefix=${pkg_PLATFORM/_//} | ||
|
||
# CLI arguments | ||
VERSION=${1:-"(missing)"} | ||
REVISION=${2:-1} | ||
|
||
if [ x"$VERSION" = x"(missing)" ]; then | ||
echo "usage: $0 VERSION [REVISION]" | ||
echo | ||
echo Look for package \$VERSION-\$REVISION and publish to $PACKAGES_HOST. | ||
exit 1 | ||
if which aws ; then | ||
echo "aws tool ready" | ||
else | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip -q awscliv2.zip | ||
sudo ./aws/install | ||
fi | ||
|
||
set +e | ||
PKG=$(ls -1 ${PACKAGES_LOCAL} | grep "$VERSION-$REVISION" | head -1) | ||
if [ -z "$PKG" ]; then | ||
echo "$0: can't find package version $VERSION-$REVISION" | ||
exit 2 | ||
fi | ||
set -e | ||
aws configure set aws_access_key_id "$PKG_ACCESS_KEY_ID" --profile "$PKG_PROFILE" | ||
aws configure set aws_secret_access_key "$PKG_SECRET_ACCESS_KEY" --profile "$PKG_PROFILE" | ||
|
||
rsync $PACKAGES_LOCAL/$PKG $PACKAGES_HOST:$PACKAGES_PATH | ||
CHKSUM=$($SHA256SUM $PACKAGES_LOCAL/$PKG) | ||
REMOTE_CHKSUM=$(ssh $PACKAGES_HOST "cd $PACKAGES_PATH && $REMOTE_SHA256SUM $PKG") | ||
|
||
if [ x"$(echo $CHKSUM | cut -d" " -f1)" != x"$(echo $REMOTE_CHKSUM | cut -d" " -f1)" ]; then | ||
echo "$0: checksum mismatch - try again or check your connection" | ||
exit 3 | ||
fi | ||
ssh $PACKAGES_HOST "sed -i /$VERSION-$REVISION/d $PACKAGES_PATH/sha256sum " \ | ||
"&& echo $REMOTE_CHKSUM >> $PACKAGES_PATH/sha256sum" | ||
echo Package $PKG is now public at: | ||
echo https://$PACKAGES_HOST/$PACKAGES_PROJECT/$PKG | ||
aws s3 cp "$PACKAGE_NAME" "s3://arn:aws:s3:$PKG_AWS_REGION:$PKG_USER_ID:accesspoint/mim-packages/$prefix/$PACKAGE_NAME" --acl public-read --profile "$PKG_PROFILE" --region "$PKG_AWS_REGION" |
This file contains 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
This file contains 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
This file contains 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
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.
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.
any reason to use an older version?
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.
Currently there is no otp 25 package available for almalinux and rockylinux. I believe that when the new site with packages is running we could expect some newer version published.