Skip to content

Commit da13bf9

Browse files
committed
merge to master
2 parents 6dd0831 + 22bed6e commit da13bf9

File tree

8 files changed

+655
-585
lines changed

8 files changed

+655
-585
lines changed

.buildkite/pipeline.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ steps:
22
- label: ":shell: Shellcheck"
33
plugins:
44
- shellcheck#v1.3.0:
5-
files: hooks/**
5+
files:
6+
- hooks/**
7+
- commands/**
8+
- lib/**
69

710
- label: ":sparkles:"
811
plugins:
@@ -25,4 +28,4 @@ steps:
2528
- ${BUILDKITE_PULL_REQUEST_REPO:-$BUILDKITE_REPO}#${BUILDKITE_COMMIT}:
2629
image: ubuntu:22.04
2730
soft_fail:
28-
- exit_status: 3
31+
- exit_status: 3

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Also see the [Docker Compose Buildkite Plugin](https://github.com/buildkite-plug
66

77
## Example
88

9+
### `run`
10+
911
The following pipeline will build a binary in the dist directory using [golang Docker image](https://hub.docker.com/_/golang/) and then uploaded as an artifact.
1012

1113
```yml
@@ -275,6 +277,10 @@ Whether or not to leave the container after the run, or immediately remove it wi
275277

276278
Default: `false`
277279

280+
### `load` (optional, string)
281+
282+
Specify a file to load a docker image from. If omitted no load will be done.
283+
278284
### `mount-checkout` (optional, boolean)
279285

280286
Whether to automatically mount the current working directory which contains your checked out codebase. Mounts onto `/workdir`, unless `workdir` is set, in which case that will be used.

commands/load.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
arg="${BUILDKITE_PLUGIN_DOCKER_LOAD:-}"
6+
7+
if [[ -z "$arg" ]]; then
8+
echo "Error: load has to be given a path to the file that should be loaded"
9+
exit 1
10+
fi
11+
12+
# Don't convert paths on gitbash on windows, as that can mangle user paths and cmd options.
13+
# See https://github.com/buildkite-plugins/docker-buildkite-plugin/issues/81 for more information.
14+
( if is_windows ; then export MSYS_NO_PATHCONV=1; fi && docker load -i "${arg}" )

0 commit comments

Comments
 (0)