-
Notifications
You must be signed in to change notification settings - Fork 44
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
update build/release process and add static binary builds #22
update build/release process and add static binary builds #22
Conversation
I have the flannel cni plugin building as a statically linked binary now on linux/amd64. make build_linux
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 scripts/build_flannel.sh
Building flannel for linux in amd64
dist/flannel-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=mLVLxfqNj4YGYi6HA8Lk/H0AAocC3f3VLIaxfEPEL/Ac0Mx1i37e5OypcAa18d/T1eyQiZ_PX8H71iCUcte, not stripped
verified static links for dist/flannel-amd64 |
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.
Thanks Ross! We currently have a mismatch in how we are building the "raw" binaries and how we are building the binaries being distributed inside images (target: dist/flannel-$(ARCH)). Could you modify that target too so that they use the script build_flannel.sh please? That way we will have both statically built
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.
Could you adapt .github/workflows/release.yml and .github/workflows/buildTests.yml to the new Makefile please?
Please separate this into two different PRs.
The second PR requires changes in how flannel is consumed and we will need to bring it up in the bi-weekly meeting |
@Oats87 @luthermonson @manuelbuil @rajatchopra This is ready for review. |
Another comment I forgot: I guess we don't need the |
@rosskirkpat will drop the version stuff and update the src_dir stuff per @manuelbuil 's request and we will merge this. |
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.
/lgtm
And rebasing. There are apparently conflicts :) |
After a rebase, there are no conflicts and I also resolved the remaining feedback. |
switch to statically linked builds of the flannel-cni plugin binary on linux and windows add verification of static builds for linux and windows update the go build logic to fail if GOOS is not linux or windows
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.
Thanks Ross!
Dockerfile
that will build all of the binaries in a reproducible manner for dev/debug purposes