Skip to content

Add mount-buildkite-agent patch#2486

Open
zbrydon wants to merge 14 commits into
mainfrom
add-mount-buildkite-agent-patch
Open

Add mount-buildkite-agent patch#2486
zbrydon wants to merge 14 commits into
mainfrom
add-mount-buildkite-agent-patch

Conversation

@zbrydon

@zbrydon zbrydon commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Resolves #1945

@zbrydon
zbrydon requested a review from a team as a code owner June 21, 2026 22:22
@changeset-bot

changeset-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d5e4059

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
skuba Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@72636c 72636c self-assigned this Jun 23, 2026

@72636c 72636c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤩

Comment thread .changeset/moody-melons-wink.md Outdated
'skuba': patch
---

lint: Add patch to migrate Docker Compose Buildkite plugins to `mount-buildkite-agent`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to fix up Docker Buildkite plugin usage too?

https://github.com/SEEK-Jobs/static-site-router/blob/fdd5b7d4800ab9cad081edcd635f7aa1d5a252fa/.buildkite/pipeline.yml#L24-L31

  steps:
    - plugins:
        - *docker-ecr-cache
        - docker#v5.13.0:
-           # Disable SEEK BuildAgency's wrapped agent that requires Bash.
-           mount-buildkite-agent: false
+           mount-buildkite-agent: true
            propagate-environment: true
            volumes:
-             # Mount agent for Buildkite annotations.
-             - /usr/bin/buildkite-agent:/usr/bin/buildkite-agent
-             # Mount cached dependencies.
              - /workdir/node_modules

@KSHITIZ6341 KSHITIZ6341 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One migration edge case that looks worth fixing before merge.

!firstOption ||
!lastOption ||
options.some(
(option) => option.field('key')?.text() === MOUNT_BUILDKITE_AGENT,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may need attention before merge because the Docker Compose path treats any existing mount-buildkite-agent key as done, even when it is explicitly false.

addMountBuildkiteAgentEdits returns no edits as soon as the option exists. If a project currently has both a docker-compose#... plugin with mount-buildkite-agent: false and the old /usr/bin/buildkite-agent:/usr/bin/buildkite-agent bind mount in docker-compose.yml, this migration can remove the bind mount while leaving the plugin opted out. The Docker Compose plugin defaults this option to false, so the agent would remain unavailable inside the container.

Suggested direction:
Mirror the docker plugin handling here: when the existing value is false, flip it to true, and add a test for the Docker Compose plugin false case.

Reference: https://github.com/buildkite-plugins/docker-compose-buildkite-plugin#mount-buildkite-agent-run-only-boolean

@72636c 72636c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patch mount-buildkite-agent

5 participants