File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ pipeline:
1616 - echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
1717 - make docker-build docker-immutable-push
1818 secrets :
19+ - codename
1920 - dev_registry
2021 - drycc_registry
2122 - container_username
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ pipeline:
1414 commands :
1515 - make bootstrap test test-cover
1616 secrets :
17+ - codename
1718 - dev_registry
1819 when :
1920 event :
Original file line number Diff line number Diff line change 1+ ARG LDFLAGS CODENAME
2+
13FROM registry.drycc.cc/drycc/go-dev:latest AS build
2- ARG LDFLAGS
34ADD . /workspace
45RUN export GO111MODULE=on \
56 && cd /workspace \
67 && CGO_ENABLED=0 init-stack go build -ldflags "${LDFLAGS}" -o /usr/local/bin/boot boot.go
78
8-
9- FROM registry.drycc.cc/drycc/base:bookworm
9+ FROM registry.drycc.cc/drycc/base:${CODENAME}
1010
1111ENV DRYCC_UID=1001 \
1212 DRYCC_GID=1001 \
Original file line number Diff line number Diff line change 11SHORT_NAME ?= builder
22
33include versioning.mk
4+ DRYCC_REGISTRY ?= ${DEV_REGISTRY}
45
56# dockerized development environment variables
67REPO_PATH := github.com/drycc/${SHORT_NAME}
@@ -18,8 +19,6 @@ LDFLAGS := "-s -w -X main.version=${VERSION}"
1819# Docker Root FS
1920BINDIR := ./rootfs
2021
21- DRYCC_REGISTRY ?= ${DEV_REGISTRY}
22-
2322bootstrap :
2423 ${DEV_ENV_CMD} go mod vendor
2524
@@ -44,11 +43,11 @@ test-cover:
4443 ${DEV_ENV_CMD} test-cover.sh
4544
4645docker-build :
47- docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} --build-arg LDFLAGS=${LDFLAGS} .
46+ docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} --build-arg LDFLAGS=${LDFLAGS} --build-arg CODENAME= ${CODENAME} .
4847 docker tag ${IMAGE} ${MUTABLE_IMAGE}
4948
5049docker-buildx :
51- docker buildx build --platform ${PLATFORM} -t ${IMAGE} --build-arg LDFLAGS=${LDFLAGS} . --push
50+ docker buildx build --platform ${PLATFORM} -t ${IMAGE} --build-arg LDFLAGS=${LDFLAGS} --build-arg CODENAME= ${CODENAME} --push .
5251
5352check-kubectl :
5453 @if [ -z $$ (which kubectl) ]; then \
You can’t perform that action at this time.
0 commit comments