a
This commit is contained in:
parent
acc5cb167b
commit
fb9fcd1ea8
2 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,9 @@ steps:
|
||||||
annotation:
|
annotation:
|
||||||
org.opencontainers.image.title: My Image
|
org.opencontainers.image.title: My Image
|
||||||
org.opencontainers.image.description: A description.
|
org.opencontainers.image.description: A description.
|
||||||
|
build-args:
|
||||||
|
NPM_CONFIG_REGISTRY: # reused from ci env
|
||||||
|
FOO: bar
|
||||||
platform: [linux/amd64, linux/arm64]
|
platform: [linux/amd64, linux/arm64]
|
||||||
auth:
|
auth:
|
||||||
registry.example.org:
|
registry.example.org:
|
||||||
|
@ -75,6 +78,7 @@ docker run --rm --user=$(id -u) --volume=$HOME:$HOME:ro --workdir=$PWD --env=PLU
|
||||||
| `frontend` | PLUGIN_FRONTEND | `dockerfile.v0` | Only dockerfile frontend supported right now |
|
| `frontend` | PLUGIN_FRONTEND | `dockerfile.v0` | Only dockerfile frontend supported right now |
|
||||||
| `context` | PLUGIN_CONTEXT | `$PWD` | Context directory to use for build |
|
| `context` | PLUGIN_CONTEXT | `$PWD` | Context directory to use for build |
|
||||||
| `dockerfile` | PLUGIN_DOCKERFILE | `Dockerfile` | Dockerfile to use. |
|
| `dockerfile` | PLUGIN_DOCKERFILE | `Dockerfile` | Dockerfile to use. |
|
||||||
|
| `build-args` | PLUGIN_BUILD_ARGS | `none` | Build args to pass to build |
|
||||||
| `platform` | PLUGIN_PLATFORM | `none` | Target platform for container image. |
|
| `platform` | PLUGIN_PLATFORM | `none` | Target platform for container image. |
|
||||||
| `source-epoch-date` | PLUGIN_SOURCE_DATE_EPOCH | `0` | Timestamp to use for reproduceable builds. |
|
| `source-epoch-date` | PLUGIN_SOURCE_DATE_EPOCH | `0` | Timestamp to use for reproduceable builds. |
|
||||||
| `name` | PLUGIN_NAME | `none` | Images names where to push the image. |
|
| `name` | PLUGIN_NAME | `none` | Images names where to push the image. |
|
||||||
|
|
|
@ -37,6 +37,10 @@ fi
|
||||||
COMMAND+=" --frontend=$BUILDCTL_FRONTEND"
|
COMMAND+=" --frontend=$BUILDCTL_FRONTEND"
|
||||||
COMMAND+=" --local=context=$BUILDCTL_CONTEXT"
|
COMMAND+=" --local=context=$BUILDCTL_CONTEXT"
|
||||||
COMMAND+=" --local=dockerfile=$BUILDCTL_DOCKERFILE"
|
COMMAND+=" --local=dockerfile=$BUILDCTL_DOCKERFILE"
|
||||||
|
if [[ -n "${PLUGIN_BUILD_ARGS:-}" ]]; then
|
||||||
|
env|sort
|
||||||
|
OUTPUT+="$(echo "$PLUGIN_BUILD_ARGS" | jq --join-output 'keys[] as $k|",annotation.\($k)=\(.[$k])"')"
|
||||||
|
fi
|
||||||
if [[ -n "${PLUGIN_PLATFORM:-}" ]]; then
|
if [[ -n "${PLUGIN_PLATFORM:-}" ]]; then
|
||||||
COMMAND+=" --opt=platform=$PLUGIN_PLATFORM"
|
COMMAND+=" --opt=platform=$PLUGIN_PLATFORM"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue