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

adjust supercronic download to allow multiarch builds #1053

Merged
merged 1 commit into from
Jul 8, 2023

Conversation

guidopetri
Copy link
Collaborator

@guidopetri guidopetri commented Jul 6, 2023

The download of supercronic in the Dockerfile hardcodes amd64 as the architecture, but we can make it flexible to allow for multiarch builds.

For this purpose I added all three of the SHA1SUMs and just select the "correct" one to use based on the ARCH build argument (which has a default of amd64).

This built successfully for me with the command:

docker build -t stringer-arch-test --build-arg ARCH=arm64 .

(as well as arm and amd64)

I changed the shell that executes the Dockerfile to bash to take advantage of the ${!ENV_VAR_CONTAINING_OTHER_ENV_VAR_NAME} construction - the SUPERCRONIC_SHA1SUM arg contains one of SUPERCRONIC_{amd64,arm,arm64}_SHA1SUM, and we need to evaluate this value as an env var. The easiest way to do this with /bin/sh seems to be eval echo \$$SUPERCRONIC_SHA1SUM, but that's a bit unsafe since we're using eval so I selected to switch to bash instead.

@guidopetri guidopetri marked this pull request as ready for review July 7, 2023 01:20
@guidopetri
Copy link
Collaborator Author

@mockdeep / @hozza I think this is ready for review :)

@mockdeep
Copy link
Collaborator

mockdeep commented Jul 7, 2023

This all looks pretty reasonable to me. Since we've moved to GoodJob, we might eventually be able to use their repeating jobs support, but I think it makes sense to get this working for now.

@hozza do you want to take a look before I merge this?

@mockdeep mockdeep merged commit 5742556 into stringer-rss:main Jul 8, 2023
1 check passed
@mockdeep
Copy link
Collaborator

mockdeep commented Jul 8, 2023

thanks @guidopetri!

@guidopetri guidopetri deleted the patch-1 branch July 8, 2023 15:54
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

2 participants