Skip to content

Commit

Permalink
revert yurt-tunnel components release (#1494)
Browse files Browse the repository at this point in the history
(cherry picked from commit 59f476c)

Co-authored-by: rambohe-ch <[email protected]>
  • Loading branch information
github-actions[bot] and rambohe-ch authored May 24, 2023
1 parent d108d25 commit 071d86d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ docker-build:


# Build and Push the docker images with multi-arch
docker-push: docker-push-yurthub docker-push-node-servant docker-push-yurt-manager
docker-push: docker-push-yurthub docker-push-node-servant docker-push-yurt-manager docker-push-yurt-tunnel-server docker-push-yurt-tunnel-agent


docker-buildx-builder:
Expand All @@ -165,6 +165,13 @@ docker-push-node-servant: docker-buildx-builder
docker-push-yurt-manager: manifests docker-buildx-builder
docker buildx build --no-cache --push ${DOCKER_BUILD_ARGS} --platform ${TARGET_PLATFORMS} -f hack/dockerfiles/release/Dockerfile.yurt-manager . -t ${IMAGE_REPO}/yurt-manager:${GIT_VERSION}

docker-push-yurt-tunnel-server: docker-buildx-builder
docker buildx build --no-cache --push ${DOCKER_BUILD_ARGS} --platform ${TARGET_PLATFORMS} -f hack/dockerfiles/release/Dockerfile.yurt-tunnel-server . -t ${IMAGE_REPO}/yurt-tunnel-server:${GIT_VERSION}

docker-push-yurt-tunnel-agent: docker-buildx-builder
docker buildx build --no-cache --push ${DOCKER_BUILD_ARGS} --platform ${TARGET_PLATFORMS} -f hack/dockerfiles/release/Dockerfile.yurt-tunnel-agent . -t ${IMAGE_REPO}/yurt-tunnel-agent:${GIT_VERSION}


generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
# hack/make-rule/generate_openapi.sh // TODO by kadisi
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./pkg/apis/..."
Expand Down
14 changes: 14 additions & 0 deletions hack/dockerfiles/release/Dockerfile.yurt-tunnel-agent
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# multi-arch image building for yurt-tunnel-agent

FROM --platform=${BUILDPLATFORM} golang:1.18 as builder
ADD . /build
ARG TARGETOS TARGETARCH GIT_VERSION GOPROXY MIRROR_REPO
WORKDIR /build/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GIT_VERSION=${GIT_VERSION} make build WHAT=cmd/yurt-tunnel-agent

FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat && update-ca-certificates && rm /var/cache/apk/*
COPY --from=builder /build/_output/local/bin/${TARGETOS}/${TARGETARCH}/yurt-tunnel-agent /usr/local/bin/yurt-tunnel-agent
ENTRYPOINT ["/usr/local/bin/yurt-tunnel-agent"]
14 changes: 14 additions & 0 deletions hack/dockerfiles/release/Dockerfile.yurt-tunnel-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# multi-arch image building for yurt-tunnel-server

FROM --platform=${BUILDPLATFORM} golang:1.18 as builder
ADD . /build
ARG TARGETOS TARGETARCH GIT_VERSION GOPROXY MIRROR_REPO
WORKDIR /build/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GIT_VERSION=${GIT_VERSION} make build WHAT=cmd/yurt-tunnel-server

FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat iptables ip6tables conntrack-tools && update-ca-certificates && rm /var/cache/apk/*
COPY --from=builder /build/_output/local/bin/${TARGETOS}/${TARGETARCH}/yurt-tunnel-server /usr/local/bin/yurt-tunnel-server
ENTRYPOINT ["/usr/local/bin/yurt-tunnel-server"]

0 comments on commit 071d86d

Please sign in to comment.