Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-01-13 13:47:43 +01:00
Родитель caa31d9374
Коммит 663f01b9cc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3248E46B6BB8C7F7
3 изменённых файлов: 4 добавлений и 9 удалений

Просмотреть файл

@ -90,16 +90,12 @@ target "update-vendor" {
output = ["."]
}
// Used to invalidate cache for mod-outdated run stage
// See also https://github.com/moby/buildkit/issues/1213
variable "TIMESTAMP" {
default = ""
}
target "mod-outdated" {
dockerfile = "./dockerfiles/Dockerfile.vendor"
target = "outdated"
args = {
TIMESTAMP = TIMESTAMP
// used to invalidate cache (more info https://github.com/moby/buildkit/issues/1213)
UUID = uuidv4()
}
output = ["type=cacheonly"]
}

Просмотреть файл

@ -20,7 +20,6 @@ ifeq ($(DOCKER_CLI_GO_BUILD_CACHE),y)
DOCKER_CLI_MOUNTS += -v "$(CACHE_VOLUME_NAME):/root/.cache/go-build"
endif
VERSION = $(shell cat VERSION)
TIMESTAMP = $(shell date '+%s')
ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM -e TESTFLAGS -e TESTDIRS -e GOOS -e GOARCH -e GOARM -e TEST_ENGINE_VERSION=$(E2E_ENGINE_VERSION)
# Some Dockerfiles use features that are only supported with BuildKit enabled
@ -94,7 +93,7 @@ validate-vendor: ## validate vendor
.PHONY: mod-outdated
mod-outdated: ## check outdated dependencies
TIMESTAMP=$(TIMESTAMP) docker buildx bake mod-outdated
docker buildx bake mod-outdated
.PHONY: authors
authors: ## generate AUTHORS file from git history

Просмотреть файл

@ -34,7 +34,7 @@ EOT
FROM psampaz/go-mod-outdated:${MODOUTDATED_VERSION} AS go-mod-outdated
FROM base AS outdated
ARG TIMESTAMP
ARG UUID
RUN --mount=target=.,rw \
--mount=target=/go/pkg/mod,type=cache \
--mount=from=go-mod-outdated,source=/home/go-mod-outdated,target=/usr/bin/go-mod-outdated \