-
Notifications
You must be signed in to change notification settings - Fork 72
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
fix(arm64): use qemu to do the packaging step for arm64 images refs: #ENGEN-715 #520
Conversation
ab15393
to
ec0d62d
Compare
648d71b
to
cd6639c
Compare
@@ -43,11 +43,12 @@ OFFICIAL_RELEASE ?= true | |||
PACKAGE_CONFLICTS ?= `grep PACKAGE_CONFLICTS $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'` | |||
PACKAGE_PROVIDES ?= `grep PACKAGE_PROVIDES $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'` | |||
PACKAGE_REPLACES ?= `grep PACKAGE_REPLACES $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'` | |||
DOCKER_RELEASE_REPOSITORY ?= `grep DOCKER_RELEASE_REPOSITORY $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'` |
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.
Did this get tested with kong-ee? I am skeptical this would correctly overwrite with the variable's value in .requirements
(https://github.com/Kong/kong-ee/blob/c2d854b8dea021ab581588b8e758665a519e4746/.requirements#L9)
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 couldn't find a way to keep this PR backwards compatible with current Kong CE which doesn't have a value for DOCKER_RELEASE_REPOSITORY
.
Someway of in order of precedence:
- use an environment variable
- use the DOCKER_RELEASE_REPOSITORY value from .requirements
- some sensible default
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 our build infrastructure for the gateway product already presumes that default values pertain to the building of CE. So option 3, a sensible default for the value required for the CE build, makes sense to me.
DOCKER_TLS_VERIFY=1 \ | ||
DOCKER_HOST=$(shell docker-machine env $(DOCKER_MACHINE_ARM64_NAME) | grep 'DOCKER_HOST=".*"' | cut -d\" -f2) \ | ||
DOCKER_CERT_PATH=$(shell docker-machine env $(DOCKER_MACHINE_ARM64_NAME) | grep 'DOCKER_CERT_PATH=".*"' | cut -d\" -f2) \ | ||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && \ |
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.
So, does this PR do away with docker-machine? If so, we should also strip out the docker-machine install.
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.
It does not.
We use docker-machine / a remote arm worker for the purposes of building Kong arm64. The final step of packaing and placing said package onto the host system output/
directory is via qemu.
🎉 This PR is included in version 4.33.8 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
…#ENGEN-715 (#520) * fix(arm64): use qemu to do the packaging step for arm64 images * chore(revert): revert me * Revert "chore(revert): revert me" This reverts commit 3913aaa. * chore(src): dont do anything when we're doing a source code release * small tweaks * fix(arm64): s/BUILDPLATFORM/TARGETPLATFORM/g * docs(README): update and refresh the README.md * test(wip): run only the oss alpine build #revertme * Revert "test(wip): run only the oss alpine build #revertme" This reverts commit 17444f5. * chore(fix): facepalm * fix(ci): ADDITIONAL_TAGS applies to non arm manifests as well * Update test/tests/01-package/run.sh
Goal of the PR is the addition of
release-kong-docker-images
make task that usesbuild-test-container
to build production worthy docker images and push them (leaving the task of renamingbuild-test-container
and a few misnamed environment variables for a subsequent PR)Putting this capability into kong-build-tools as it's the sensible location to share the logic between Kong and Kong Enterprise without having to copy-pasta between the two repositories. The
build-test-container
image name change is backwards compatible as it was assigned a variable everywhere it was used.Previous result
Adjusted result
New behaviour