-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support architecture targeted builds (#837)
This reworks much of the Makefile and, to a lesser extent, the Dockerfiles for building the CNI plugins for other platforms. Additional clean up work is included as well as this was combed through to support these builds. Including: - ARCH resolver to identify the ARCH (GOARCH styled) to pass around - Updated ARCH and GOARCH references throughout to support against other ARCHes - Make base container build appropriately for ARCH - Docker explicit multiarch references in targets and Dockerfiles - Updated related container images to allow testing where possible - Eliminate ./tmp usage with tar unpacking from a pipe - Clean up and consistent call sites all around - Reconciled image naming - Updated stale golang images references - Added docstrings for reference
- Loading branch information
Showing
7 changed files
with
254 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,28 +5,46 @@ orbs: | |
aws-cli: circleci/[email protected] | ||
k8s: circleci/[email protected] | ||
|
||
jobs: | ||
build: | ||
references: | ||
build_job: &build | ||
docker: | ||
- image: circleci/golang:1.13-stretch | ||
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}} | ||
environment: | ||
environment: &env | ||
GO111MODULE: "on" | ||
steps: | ||
- checkout | ||
- run: go get -u golang.org/x/lint/golint | ||
- run: go get -u golang.org/x/tools/cmd/goimports | ||
- run: make check-format | ||
- run: make build-linux | ||
- run: make lint | ||
- run: make build-linux "ARCH=$ARCH" | ||
# TODO: Make lint a hard-check once baselined | ||
- run: make lint LINT_FLAGS= | ||
- run: make vet | ||
- run: make unit-test | ||
# TODO: Enable architecture specific unit-test when Circle CI supports it! | ||
- run: make unit-test ARCH=amd64 | ||
|
||
jobs: | ||
build_x86_64: | ||
<<: *build | ||
environment: | ||
<<: *env | ||
# Target the GOARCH for x86_64 | ||
ARCH: amd64 | ||
|
||
build_aarch64: | ||
<<: *build | ||
environment: | ||
<<: *env | ||
# Target the GOARCH for aarch64 | ||
ARCH: arm64 | ||
|
||
integration_test: | ||
docker: | ||
- image: circleci/golang:1.13-stretch | ||
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}} | ||
environment: | ||
GO111MODULE: "on" | ||
<<: *env | ||
RUN_CONFORMANCE: "true" | ||
steps: | ||
- checkout | ||
|
@@ -47,11 +65,13 @@ workflows: | |
version: 2 | ||
check: | ||
jobs: | ||
- build | ||
- build_x86_64 | ||
- build_aarch64 | ||
- hold: | ||
type: approval | ||
requires: | ||
- build | ||
- build_x86_64 | ||
- build_aarch64 | ||
- integration_test: | ||
requires: | ||
- hold | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
aws-cni | ||
aws-k8s-agent | ||
cni-metrics-helper | ||
grpc-health-probe | ||
portmap | ||
cni-metrics-helper/cni-metrics-helper | ||
routed-eni-cni-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.