Skip to content

Releases: buildkite-plugins/docker-buildkite-plugin

v3.2.0 (🏙 Big City)

30 Apr 12:20
f199bc8
Compare
Choose a tag to compare

What's Changed

Upgrading

To upgrade, update your pipeline.yml files:

steps:
  - command: test.sh
    plugins:
-     docker#v3.1.0:
+     docker#v3.2.0:
        image: someimage
        workdir: /app

v3.1.0

08 Apr 05:53
bacf92c
Compare
Choose a tag to compare

New

  • Allow entrypoint: false to 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: /app

v3.0.1 (☀️Awkward Docs Release)

30 Jan 05:01
@lox lox
579f8eb
Compare
Choose a tag to compare

Fixed

  • Update docs for the changes in v3.0.0 #99 (@lox)

v3.0.0 (☀️Melbourne Heatwave)

30 Jan 04:46
@lox lox
8fd6103
Compare
Choose a tag to compare

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

  • Support retrying image pulls with pull-retries #95 (@timn)
  • Add a mount-checkout option #93 (@lox)
  • Add support for the tmpfs property. #91 (@philwo)
  • Add support for init property, on by default. #92 (@philwo)
  • Add support for mount-ssh-agent option #89 (@jam13)

v2.2.0 (🧠 Shared Memory)

14 Jan 04:02
41c65e1
Compare
Choose a tag to compare

What's Changed?

Upgrading

To upgrade, update your pipeline.yml files:

steps:
  - command: test.sh
    plugins:
-     docker#v2.1.0:
+     docker#v2.2.0:
        image: someimage
        workdir: /app

v2.1.0 (🌽 Spring Gardening)

23 Nov 02:41
@lox lox
d86e4a8
Compare
Choose a tag to compare

What's Changed?

  • Add propagate-environment option 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 privileged option 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: someimage

v2.0.0 (🌧Rainy day)

23 Oct 21:33
@lox lox
5edf992
Compare
Choose a tag to compare

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 mounts to volumes and include .:/workdir if 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 shell as 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: true

This 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: /app

Setting 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-agent defaults to false #76 (@lox)
  • On windows the default shell is CMD.EXE /c #76 (@lox)
  • Rename parameter mounts to volumes to 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)

06 Jul 08:19
e6a11d4
Compare
Choose a tag to compare

What’s changed?

  • Adds -e to 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: /app

v1.3.0 (🍦 Gelato Hands)

19 Jun 09:02
843c9f7
Compare
Choose a tag to compare

What’s changed?

  • Adds a shell option 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

v1.2.2 (✈️ Domestic Flight)

13 Jun 09:12
529aea8
Compare
Choose a tag to compare

What’s changed?

Upgrading

To upgrade, update your pipeline.yml files:

steps:
  - command: test.sh
    plugins:
-       docker#v1.2.1:
+       docker#v1.2.2:
        image: someimage
        workdir: /app