-
Notifications
You must be signed in to change notification settings - Fork 493
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
Support multiple OS and ARCH for signing #1674
Conversation
scripts/release/mule/sign/sign.sh
Outdated
gpg -u [email protected] --detach-sign "$file" | ||
done | ||
|
||
HASHFILE="hashes_${CHANNEL}_${OS_TYPE}_${ARCH_TYPE}_${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.
should ARCH_TYPE and OS_TYPE be ${os}_${arch}?
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.
Oh, yeah, I believe so. Good call.
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.
^^^ I think this is the case (see Brice's comment on $os / $arch)
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.
Fixed.
# Note the surrounding parens turns the string created by `find` into an array. | ||
OS_TYPES=($(find . -mindepth 1 -maxdepth 1 -type d -printf '%f\n')) | ||
for os in "${OS_TYPES[@]}"; do | ||
if [ "$os" = linux ] |
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.
Do we need to also sign the darwin builds?
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.
Yes, that's my understanding.
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.
Eventually, but we aren't building them yet. Because of the ARCHS loop below, it'd probably need to be a separate block anyway.
# Note the surrounding parens turns the string created by `find` into an array. | ||
OS_TYPES=($(find . -mindepth 1 -maxdepth 1 -type d -printf '%f\n')) | ||
for os in "${OS_TYPES[@]}"; do | ||
if [ "$os" = linux ] |
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.
Eventually, but we aren't building them yet. Because of the ARCHS loop below, it'd probably need to be a separate block anyway.
scripts/release/mule/sign/sign.sh
Outdated
gpg -u [email protected] --detach-sign "$file" | ||
done | ||
|
||
HASHFILE="hashes_${CHANNEL}_${OS_TYPE}_${ARCH_TYPE}_${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.
^^^ I think this is the case (see Brice's comment on $os / $arch)
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.
Looks OK.
bc24dce
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.
Looks good.
This supports multiple OS and ARCH by downloading assets recursively from s3. It then will determine multiple OS by inspecting the direct child directories of tmp/node_pkgs to determine how to proceed. Assets are separated by ARCH as usual, i.e. tmp/node_pkgs/OS/ARCH, but when uploaded to staging they all go in the same object (flat directory structure).
Summary
This supports multiple OS and ARCH by downloading assets recursively from s3. It then will determine multiple OS by inspecting the direct child directories of
tmp/node_pkgs
to determine how to proceed.Assets are separated by ARCH as usual, i.e. tmp/node_pkgs/OS/ARCH, but when uploaded to staging they all go in the same object (flat directory structure).
Test Plan
mule -f package-sign.yaml package-sign
mule -f package-upload.yaml package-upload