mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 09:11:45 +00:00
I noticed these warnings in CI logs;
+buildctl build --progress=plain --frontend=dockerfile.v0 --opt context=git://github.com/moby/buildkit#refs/pull/1482/merge --opt build-arg:BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 --opt platform=linux/amd64,linux/arm/v7,linux/arm64,linux/s390x,linux/ppc64le,darwin/amd64,windows/amd64 --import-cache cicache.buildk.it/moby/buildkit/master:binaries-cross-helper
WARN[0000] --import-cache <ref> is deprecated. Please use --import-cache type=registry,ref=<ref>,<opt>=<optval>[,<opt>=<optval>] instead.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
. $(dirname $0)/util
|
|
|
|
: ${PLATFORMS=linux/arm}
|
|
|
|
importCacheFlags=""
|
|
if [ -n "$cacheref" ]; then
|
|
importCacheFlags="--import-cache=type=registry,ref=$cacheref:binaries"
|
|
fi
|
|
|
|
set -ex
|
|
|
|
if [ -n "$MASTERCACHE_PASSWORD" ] && [ -n "$RUNC_PLATFORMS" ]; then
|
|
repo="cicache.buildk.it/moby/buildkit/master"
|
|
$(dirname $0)/login_ci_cache
|
|
buildctl build $progressFlag --frontend=dockerfile.v0 \
|
|
$currentcontextBuildctl \
|
|
--opt target=binaries-linux-helper \
|
|
--opt platform=$RUNC_PLATFORMS \
|
|
--import-cache type=registry,ref=cicache.buildk.it/moby/buildkit/master:binaries-cross-helper \
|
|
--export-cache type=inline --output type=image,push=true,name=$repo:binaries-cross-helper
|
|
fi
|
|
|
|
buildctl build --progress=plain --frontend=dockerfile.v0 \
|
|
$currentcontextBuildctl \
|
|
--opt platform=$PLATFORMS \
|
|
--import-cache type=registry,ref=cicache.buildk.it/moby/buildkit/master:binaries-cross-helper
|
|
|
|
buildctl build --progress=plain --frontend=dockerfile.v0 \
|
|
$currentcontextBuildctl \
|
|
--opt platform=windows/amd64 --opt target=buildkit-buildkitd \
|
|
--import-cache type=registry,ref=cicache.buildk.it/moby/buildkit/master:binaries
|