Refactor build of docker images
This commit is contained in:
parent
8e2eebb197
commit
ea8e711d2c
21 changed files with 89 additions and 183 deletions
|
|
@ -38,10 +38,7 @@ if [ ! -f "${ENV_FILE}" ]; then
|
|||
fi
|
||||
|
||||
# build local terraform image to build nginx
|
||||
docker buildx build \
|
||||
--load \
|
||||
--progress plain \
|
||||
--platform linux/amd64 \
|
||||
docker build \
|
||||
--tag build-ingress-controller-terraform $DIR/images/ingress-controller
|
||||
|
||||
# build nginx and publish docker images to quay.io.
|
||||
|
|
|
|||
|
|
@ -37,12 +37,7 @@ if [ ! -f "${ENV_FILE}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# build local terraform image to build nginx
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
docker buildx build \
|
||||
--load \
|
||||
--progress plain \
|
||||
--platform linux/amd64 \
|
||||
docker build \
|
||||
--tag build-nginx-terraform $DIR/images/nginx
|
||||
|
||||
# build nginx and publish docker images to quay.io.
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ export CGO_ENABLED=0
|
|||
export GOARCH=${ARCH}
|
||||
|
||||
go build \
|
||||
"${GOBUILD_FLAGS}" \
|
||||
-ldflags "-s -w \
|
||||
-X ${PKG}/version.RELEASE=${TAG} \
|
||||
-X ${PKG}/version.COMMIT=${GIT_COMMIT} \
|
||||
|
|
@ -55,16 +54,13 @@ go build \
|
|||
-o "bin/${ARCH}/nginx-ingress-controller" "${PKG}/cmd/nginx"
|
||||
|
||||
go build \
|
||||
"${GOBUILD_FLAGS}" \
|
||||
-ldflags "-s -w \
|
||||
-X ${PKG}/version.RELEASE=${TAG} \
|
||||
-X ${PKG}/version.COMMIT=${GIT_COMMIT} \
|
||||
-X ${PKG}/version.REPO=${REPO_INFO}" \
|
||||
-o "bin/${ARCH}/dbg" "${PKG}/cmd/dbg"
|
||||
|
||||
|
||||
go build \
|
||||
"${GOBUILD_FLAGS}" \
|
||||
-ldflags "-s -w \
|
||||
-X ${PKG}/version.RELEASE=${TAG} \
|
||||
-X ${PKG}/version.COMMIT=${GIT_COMMIT} \
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function cleanup {
|
|||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
E2E_IMAGE=quay.io/kubernetes-ingress-controller/e2e:v05312020-d250b97b4
|
||||
E2E_IMAGE=${E2E_IMAGE:-quay.io/kubernetes-ingress-controller/e2e:v05312020-d250b97b4}
|
||||
|
||||
DOCKER_OPTS=${DOCKER_OPTS:-}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue