Releases: buildkite-plugins/docker-buildkite-plugin
v3.3.0 (🦙 So Many Llamas)
Added
- Add support for
deviceflags on docker run (#135) @omeid - Add support for the
add-hostflag ondocker run(#133) @underscorebrody
Fixed
Other Changes
- Add entrypoint disabling tests from #125 (thanks @pecigonzalo) (#131) @lox
- Remove debug mode and always print command executed (#130) @lox
- Update buildkite plugin docker-compose to v3.0.3 (#123) @renovate
- Update README to include sysctl (#124) @moorthya
Upgrading
To upgrade, update your pipeline.yml files:
steps:
- command: test.sh
plugins:
- docker#v3.2.0:
+ docker#v3.3.0:
image: someimage
workdir: /appv3.2.0 (🏙 Big City)
v3.1.0
New
- Allow
entrypoint: falseto disable default entrypoints (#73) @lox - Add
propagate-uid-gid option(#114) @benesch
Other Changes
- Mention that the Docker Compose plugin supports building images (#102) @toolmantim
- Update buildkite plugin docker-compose to v3 (#108) @renovate[bot]
- Add documentation for pull-retries (#107) @lox
- Update buildkite plugin docker-compose to v3.0.1 (#115) @renovate[bot]
Upgrading
To upgrade, update your pipeline.yml files:
steps:
- command: test.sh
plugins:
- docker#v3.0.1:
+ docker#v3.1.0:
image: someimage
workdir: /appv3.0.1 (☀️Awkward Docs Release)
v3.0.0 (☀️Melbourne Heatwave)
What's new in v3.0.0
We've improved the defaults for volume and checkout mounting, and introduced a new mount-checkout option. And we've also added a new --init option that is enabled by default, to help prevent zombie processes.
New mount-checkout option and volume changes
In v2.0.0 we made it so the checkout directory ($PWD) would be mounted into your container only if you didn't add volume mounts using the volumes option, and if you wanted to disable checkout mounting you set volumes: false.
This turned out to be very confusing behaviour, so instead we've added a new dedicated option mount-checkout which defaults to true, even if you use the volumes option. The volumes option also no longer takes a boolean, you can now only set a list of volumes you'd like mounted.
If you want to disable mounting of the checkout directory, you can set mount-checkout: false
New --init option
Docker now has an --init option](https://docs.docker.com/engine/reference/run/#specify-an-init-process), which provides a built-in process manager that signals child processes correctly on exit. We've enabled this by default, but can be disabled by setting init: false
🆙 Upgrading
If you have .:/workdir or similar in your volumes mounts, you can remove it as the new mount-checkout option will be applied by default. Make sure to set the workdir option to the directory you want it mounted to in the container.
Changes
v2.2.0 (🧠 Shared Memory)
v2.1.0 (🌽 Spring Gardening)
What's Changed?
- Add
propagate-environmentoption for propagating the environment to the container (#80) @zsims - Support multiple line command on windows and fix command execution from Gitbash shells (#82) @filipesilva
- Add
privilegedoption for running privileged containers (#83) @magec
Upgrading
To upgrade, update your pipeline.yml files:
steps:
- command: test.sh
plugins:
- docker#v2.0.0:
+ docker#v2.1.0:
image: someimagev2.0.0 (🌧Rainy day)
The first major release since 1.0 🎉 Buildkite Docker Plugin v2.0.0 includes some major improvements, and some breaking changes.
🆙 Upgrading
To upgrade your steps from v1 of the plugin:
- Rename
mountstovolumesand include.:/workdirif you want the behaviour of mounting in the checkout directory to your container. - If you were using shell invocations in your commands (e.g
/bin/bash -c "echo hello") you can remove them (e.g.echo blah) - Specifying
shellas a string is no longer supported, and needs to be changed to use the array syntax.
🐢 Improved Shell Handling (New)
This plugin can now run multi-command steps by default. It does this by running commands via a shell—the default shell is /bin/sh -e -c for *nix and CMD.EXE /c for Windows.
steps:
- command:
- "yarn install"
- "yarn run test"
plugins:
- docker#v2.0.0:
image: "node:7"
always-pull: trueThis also means if your commands include bash-ism's, like make && make publish, this will also just work, instead of failing with a cryptic Docker failure message.
If you want to skip the shell—for example if you have a custom entrypoint in your image—we've added a command option (vs the command at the Buildkite step level) that takes an array of parameters. This is handy for shell-less, single binary images, and allows for very precise control of what arguments are passed to the docker run invocation.
For example, the following command uses the mesosphere/awscli Docker image to fetch files from S3 and upload them to Buildkite as artifacts:
steps:
- plugins:
docker#v2.0.0:
image: "mesosphere/aws-cli"
always-pull: true
command: ["s3", "sync", "s3://my-bucket/dist/", "/app/dist"]
volumes: [ "./:/app" ]
artifact_paths: "dist/**"Specifying shell as a string is no longer supported. You need to use the array syntax now.
🏆 Automatic Windows shell support (New)
Windows Docker images are now better supported, with the new shell behaviour auto-detecting Windows and setting the shell option to CMD.exe /c. To use PowerShell, set the shell option to [ "powershell", "-Command" ].
steps:
- command: "dotnet publish -c Release -o published"
plugins:
- docker#v2.0.0:
image: "microsoft/dotnet:latest"
always-pull: true📚 mounts is now volumes (Changed)
The previous mounts option is now called volumes to match standard Docker naming, and no longer mounts the build directory into the container if any volumes value is set.
If you provide a list of mounts, you can mount in the working directory by adding .:/work to the list of mounts:
steps:
- commands:
- "docker build . -t image:tag"
- "docker push image:tag"
plugins:
docker#v2.0.0:
image: "docker:latest"
always-pull: true
volumes:
- ".:/app"
- "/var/run/docker.sock:/var/run/docker.sock"
workdir: /appSetting volumes also disables the default workdir setting, so be sure to set one if you need.
👜 workdir has been simplified (Changed)
The previous workdir option would control both mounting the build directory, and setting the container's working directory, which was different to how the standard Docker workdir option behaved.
The plugins workdir option now just sets the working directory of the container, and all volume mounting settings are done via the new volumes option.
Full Changelog
- Add a command parameter and support arrays for command and shell #68 (@lox)
- On windows and macOS,
mount-buildkite-agentdefaults tofalse#76 (@lox) - On windows the default shell is
CMD.EXE /c#76 (@lox) - Rename parameter
mountstovolumesto be inline with docker terminology #72 (@lox) - Allow mounts to be explicitly disabled #71 (@lox)
- Skip mounting the current checkout dir if custom mounts are provided #69 (@lox)
v1.4.0 (🌽 Chip and Dip)
What’s changed?
- Adds
-eto the default shell arguments, to ensure steps fail properly if any of one of multiple commands fail (#55) @toolmantim
Upgrading
To upgrade, update your pipeline.yml files:
steps:
- command: test.sh
plugins:
- docker#v1.3.0:
+ docker#v1.4.0:
image: someimage
workdir: /appv1.3.0 (🍦 Gelato Hands)
What’s changed?
- Adds a
shelloption for disabling and customising the shell used for running commands (#50) @toolmantim
Upgrading
To upgrade, update your pipeline.yml files:
steps:
- command: test.sh
plugins:
- docker#v1.2.2:
+ docker#v1.3.0:
image: someimage
workdir: /app