wwwwwwww
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test/2 Pipeline failed
ci/woodpecker/push/test/1 Pipeline failed

This commit is contained in:
Stephan Schnabel 2025-06-07 20:14:28 +02:00
parent 187841ba12
commit 79d41a9020
Signed by: stephan.schnabel
SSH key fingerprint: SHA256:99zuzxNGFb5/5P+E/O7ONU2qhUojUe/D8rIPTW+9Xp0
4 changed files with 10 additions and 14 deletions

View file

@ -32,7 +32,7 @@ steps:
image: kokuwaio/buildctl:v0.21.0
settings:
<<: *settings
names:
name:
- registry.kokuwa.io/buildctl:latest
- registry.kokuwa.io/buildctl:v0.21.0
- docker.io/kokuwaio/buildctl:latest

View file

@ -7,7 +7,6 @@ steps:
renovate:
image: kokuwaio/renovate-config-validator
pull: true
depends_on: []
when: [path: [.woodpecker/lint.yaml, renovate.json]]

View file

@ -1,5 +1,5 @@
FROM docker.io/library/bash:5.2.37@sha256:01a15c6f48f6a3c08431cd77e11567823530b18159889dca3b7309b707beef91
SHELL ["/bin/bash", "-u", "-e", "-o", "pipefail", "-c"]
SHELL ["/usr/local/bin/bash", "-u", "-e", "-o", "pipefail", "-c"]
# ignore pipefail because
# bash is non-default location https://github.com/tianon/docker-bash/issues/29
# hadolint only uses default locations https://github.com/hadolint/hadolint/issues/977

View file

@ -6,11 +6,6 @@ env | sort | grep -v DRONE
## check input
##
BUILDKIT_HOST=${PLUGIN_ADDR:-${BUILDKIT_HOST:-}}
if [[ -z "${BUILDKIT_HOST:-}" ]]; then
echo "Missing buildkit addr."
exit 1
fi
BUILDCTL_CONTEXT=${PLUGIN_CONTEXT:-$(pwd)}
BUILDCTL_DOCKERFILE=$(dirname "${PLUGIN_DOCKERFILE:-$BUILDCTL_CONTEXT/Dockerfile}")
if [[ ! -f $BUILDCTL_DOCKERFILE/Dockerfile ]]; then
@ -22,15 +17,16 @@ if [[ "$BUILDCTL_FRONTEND" != "dockerfile.v0" ]]; then
echo "Only frontend 'dockerfile.v0' testet and supported yet."
exit 1
fi
SOURCE_DATE_EPOCH=${PLUGIN_SOURCE_DATE_EPOCH:-${SOURCE_DATE_EPOCH:-0}}
SOURCE_DATE_EPOCH=${PLUGIN_SOURCE_DATE_EPOCH:-0}
##
## build command
##
COMMAND="buildctl"
COMMAND="$COMMAND --addr $BUILDKIT_HOST"
if [[ -n "${PLUGIN_ADDR:-}" ]]; then
COMMAND="$COMMAND --addr $PLUGIN_ADDR"
fi
COMMAND="$COMMAND build"
COMMAND="$COMMAND --frontend $BUILDCTL_FRONTEND"
COMMAND="$COMMAND --local context='$BUILDCTL_CONTEXT'"
@ -39,11 +35,11 @@ if [[ "${PLUGIN_PLATFORM:-}" == "true" ]]; then
COMMAND="$COMMAND --opt platform='$PLUGIN_PLATFORM'"
fi
# https://github.com/moby/buildkit/blob/master/README.md#output
if [[ -n "${PLUGIN_NAMES:-}" ]]; then
if [[ -n "${PLUGIN_NAME:-}" ]]; then
COMMAND="$COMMAND --output type=image,name=$PLUGIN_NAMES,push=${PLUGIN_PUSH:-true}"
fi
# custom args, e.g. docker run --rm --volume=$(pwd):$(pwd) --workdir=$(pwd) --env=CI=test kokuwaio/buildkit --opt buildarg=foo=bar
# custom args, e.g. docker run --rm --volume=$HOME:HOME:ro --workdir=$PWD kokuwaio/buildkit --opt buildarg=foo=bar
if [[ -n "${1:-}" ]]; then
COMMAND="$COMMAND $*"
fi
@ -52,5 +48,6 @@ fi
## execute command
##
echo -e "${COMMAND// --/\\n --}\n"
echo -e "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH ${COMMAND// --/\\n --}\n"
eval "$COMMAND"