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

add a Dockerfile and shell script for ... #520

Merged

Conversation

qrkourier
Copy link
Member

…reproducible Linux builds of all Ziti artifacts to enable forks and contributors who can't run ziti-ci.

@qrkourier qrkourier requested a review from a team as a code owner October 28, 2021 21:46
@ghost
Copy link

ghost commented Oct 28, 2021

CodeSee Review Map:

Review these changes using an interactive CodeSee Map

Review in an interactive map

View more CodeSee Maps

Legend

CodeSee Map Legend

# reproducible builds for downstream forks and Ziti contributors
#

ARG go_distribution_file=go1.16.9.linux-amd64.tar.gz
Copy link
Member

Choose a reason for hiding this comment

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

is there a reason you couldn't pull from a particular go base image? also - ziti updates the version of go aggressively. i think 17 is already required. is it possible to pass this via variable?

Copy link
Member

Choose a reason for hiding this comment

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

or maybe even use 'latest'? this feels like it could be a bit of a maintenance issue that will get lost. right now i think we rely on it being in the action's file but maybe we need to make this a variable for the project...

Copy link
Member

Choose a reason for hiding this comment

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

after looking through the rest of the PR i'm wondering if this is this still needed or if it was solved on a different pr?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's still needed unless there's already a local reproducible build counterpart to the procedures that GitHub Actions uses to build for Linux. I didn't find one in the local development resources.

I'll send an update to track the version of Go that's actually needed, if possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, would /quickstart/local be a better home for these?

Copy link
Member Author

Choose a reason for hiding this comment

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

@plorenz Where is the recommended version of Go detectable inside the repo? Is there a ziti-ci command for that? I looked through the ziti-ci and ziti repos but didn't find it.

Copy link
Member

Choose a reason for hiding this comment

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

You can look at the go.mod file for the ziti project. It has the required major release of go listed go 1.17. So currently the recommended version would be the latest patch version of 1.17.

@qrkourier qrkourier force-pushed the dockerfile-for-linux-builds branch 2 times, most recently from 7ecd420 to 37fd6ab Compare November 22, 2021 16:35
…l Ziti artifacts to enable forks and contributors who can't run ziti-ci

Release v0.22.12

always build the Linux container with latest Go

Use go install instead of go get

reconcile upstream's main workflow

reconcile upstream's common/version/info_generated.go
@qrkourier
Copy link
Member Author

@dovholuknf @plorenz I've updated the PR with comments to guide the downstream/fork builder to build with latest Go and where to find the minimum Go requirement for local builds.

@qrkourier
Copy link
Member Author

@plorenz Will you let me know if you need me to make any changes to this one? This is to add tools for downstream contributors to build artifacts on Linux in the same way that the upstream's Actions workflows do.

@plorenz
Copy link
Member

plorenz commented Dec 6, 2021

@plorenz Will you let me know if you need me to make any changes to this one? This is to add tools for downstream contributors to build artifacts on Linux in the same way that the upstream's Actions workflows do.

I think the implementation is fine. I wonder how useful it is. If a developer wants to build, aren't they likely to build on their target system? If that's the case all they need to do is go install ./.... Is it different for arm, do arm devs usually build on x86-64?

@qrkourier
Copy link
Member Author

Yes, I think they'll want to build the artifacts for all supported architectures on their workstation, but not necessarily run the artifact on their own workstation e.g. build for ARM on x86_64, run on ARM (just like we do in Actions for the upstream).

I'd love to avoid any future burden to maintain this, but I don't see a better way to document and automate the procedure for building for all supported architectures in downstream contributors' environments. My assumptions include that our upstream's Actions workflows will always fail when triggered by downstream repos' merges, and that it's better to offer them an alternative to enabling Actions in their forks than to make their forks' Actions functional.

If you like having these tools in the repo, they might be better organized under build tools or quick starts.

@plorenz
Copy link
Member

plorenz commented Dec 6, 2021

Seems reasonable. There should probably be a link to these somewhere in docs

@plorenz plorenz merged commit 688e6c1 into openziti:release-next Dec 6, 2021
@qrkourier qrkourier deleted the dockerfile-for-linux-builds branch December 6, 2021 19:07
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

3 participants