Merge pull request #2690 from crazy-max/ci-buildinfo-attrs
ci: opt-in buildinfo attrs with output optmaster
commit
1d66f6f174
|
@ -1,4 +1,4 @@
|
|||
# syntax = docker/dockerfile:1.3
|
||||
# syntax=docker/dockerfile-upstream:master
|
||||
|
||||
# xx is a helper for cross-compilation
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:golang@sha256:810dc54d5144f133a218e88e319184bf8b9ce01d37d46ddb37573e90decd9eef AS xx
|
||||
|
|
|
@ -87,7 +87,7 @@ case $TYP in
|
|||
buildxCmd build $platformFlag $cacheFromFlags $cacheToFlags \
|
||||
--build-arg "CHANNEL=$TAG" \
|
||||
--build-arg "BUILDTAGS=$buildTags" \
|
||||
--output "type=image,name=$REPO:$pushTag,$pushFlag" \
|
||||
--output "type=image,name=$REPO:$pushTag,buildinfo-attrs=true,$pushFlag" \
|
||||
--file "./frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile" \
|
||||
$currentcontext
|
||||
;;
|
||||
|
@ -104,7 +104,7 @@ case $TYP in
|
|||
buildxCmd build $platformFlag $cacheFromFlags $cacheToFlags \
|
||||
--build-arg "CHANNEL=$TAG" \
|
||||
--build-arg "BUILDTAGS=$buildTags" \
|
||||
--output "type=image,\"name=$publishedNames\",$pushFlag" \
|
||||
--output "type=image,\"name=$publishedNames\",buildinfo-attrs=true,$pushFlag" \
|
||||
--file "./frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile" \
|
||||
$currentcontext
|
||||
;;
|
||||
|
@ -144,7 +144,7 @@ case $TYP in
|
|||
buildxCmd build $platformFlag $cacheFromFlags $cacheToFlags \
|
||||
--build-arg "CHANNEL=$TAG" \
|
||||
--build-arg "BUILDTAGS=$buildTags" \
|
||||
--output "type=image,name=$REPO:$dt-$TAG,$pushFlag" \
|
||||
--output "type=image,name=$REPO:$dt-$TAG,buildinfo-attrs=true,$pushFlag" \
|
||||
--file "./frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile" \
|
||||
$currentcontext
|
||||
rm $tmp/buildid
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# syntax=docker/dockerfile:1.3
|
||||
# syntax=docker/dockerfile-upstream:master
|
||||
|
||||
# protoc is dynamically linked to glibc to can't use golang:1.10-alpine
|
||||
FROM golang:1.17-buster AS gobuild-base
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# syntax=docker/dockerfile:1.3
|
||||
# syntax=docker/dockerfile-upstream:master
|
||||
|
||||
FROM golang:1.17-alpine
|
||||
RUN apk add --no-cache gcc musl-dev yamllint
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# syntax = docker/dockerfile:1.3
|
||||
# syntax=docker/dockerfile-upstream:master
|
||||
FROM mvdan/shfmt:v3.1.2-alpine AS shfmt
|
||||
WORKDIR /src
|
||||
ARG SHFMT_FLAGS="-i 2 -ci"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# syntax = docker/dockerfile:1.3
|
||||
# syntax=docker/dockerfile-upstream:master
|
||||
|
||||
FROM golang:1.17-alpine AS vendored
|
||||
RUN apk add --no-cache git
|
||||
|
|
|
@ -41,10 +41,10 @@ fi
|
|||
|
||||
outputFlag="--output=type=image,push=false"
|
||||
if [ "$PUSH" = "push" ]; then
|
||||
outputFlag="--output=type=image,push=true"
|
||||
outputFlag="--output=type=image,buildinfo-attrs=true,push=true"
|
||||
fi
|
||||
if [ -n "$localmode" ]; then
|
||||
outputFlag="--output=type=docker"
|
||||
outputFlag="--output=type=docker,buildinfo-attrs=true"
|
||||
fi
|
||||
|
||||
targetFlag=""
|
||||
|
|
|
@ -59,5 +59,5 @@ if [ "$GITHUB_ACTIONS" = "true" ]; then
|
|||
fi
|
||||
fi
|
||||
if [ -n "$currentref" ]; then
|
||||
currentcontext="--build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 --build-arg BUILDKIT_INLINE_BUILDINFO_ATTRS=1 $currentref"
|
||||
currentcontext="--build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 $currentref"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue