Add CACHEBUST for dependencies
continuous-integration/drone/tag Build is passing Details

master v0.4.5
René Jochum 1 year ago
parent fb55c7dbcf
commit abe26200fa
Signed by: jochum
GPG Key ID: F7D906F5E51E8E5E

@ -70,6 +70,7 @@ tasks:
- podman build
-v "{{.BUILD_MOUNT_FOLDER_INT}}:{{.BUILD_MOUNT_FOLDER_INT}}"
-v "{{.VOLUME_PATH}}:/go:rw"
--build-arg CACHEBUST={{.DATE}}
--build-arg VERSION={{.VERSION}}
--build-arg=DOCKER_IO={{.DOCKER_IO}}
--build-arg=DOCKER_ORG_JO_MICRO={{.DOCKER_ORG_JO_MICRO}}
@ -77,6 +78,8 @@ tasks:
-f ./docker/router/Dockerfile
.
vars:
DATE:
sh: date -u -Iseconds
VOLUME_PATH:
sh: podman volume inspect jo_micro-router_go --format "{{"{{"}}.Mountpoint{{"}}"}}"
BUILD_MOUNT_FOLDER_INT:

@ -10,6 +10,8 @@ RUN useradd appuser
ARG VERSION
COPY . /code/
WORKDIR /code
ARG CACHEBUST=1
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -installsuffix cgo -ldflags="-w -s -X 'jochum.dev/jo-micro/router/internal/config.Version=$VERSION'" -o /usr/local/bin/microrouterd jochum.dev/jo-micro/router/cmd/microrouterd
# STEP 2 build a small image

Loading…
Cancel
Save