Skip to content
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

Merged
merged 3 commits into from Oct 30, 2020

Conversation

btoll
Copy link
Contributor

@btoll btoll commented Oct 30, 2020

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

gpg -u rpm@algorand.com --detach-sign "$file"
done

HASHFILE="hashes_${CHANNEL}_${OS_TYPE}_${ARCH_TYPE}_${VERSION}"
Copy link
Contributor

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}?

Copy link
Contributor Author

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.

Copy link
Contributor

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)

Copy link
Contributor Author

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 ]
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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 ]
Copy link
Contributor

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.

gpg -u rpm@algorand.com --detach-sign "$file"
done

HASHFILE="hashes_${CHANNEL}_${OS_TYPE}_${ARCH_TYPE}_${VERSION}"
Copy link
Contributor

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)

egieseke
egieseke previously approved these changes Oct 30, 2020
Copy link
Contributor

@egieseke egieseke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK.

onetechnical
onetechnical previously approved these changes Oct 30, 2020
Copy link
Contributor

@egieseke egieseke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@algojohnlee algojohnlee merged commit 4de3deb into algorand:rel/beta Oct 30, 2020
@btoll btoll deleted the multi_arch branch October 30, 2020 04:41
tsachiherman pushed a commit to tsachiherman/go-algorand that referenced this pull request Jul 7, 2021
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants