Skip to content

Add setup-docker action - #232

Merged
donat merged 2 commits into
mainfrom
donat/add-docker-support
Oct 5, 2026
Merged

donat merged 2 commits into
mainfrom
donat/add-docker-support

Conversation

@donat

@donat donat commented Oct 1, 2026

Copy link
Copy Markdown
Member

Publishes a Build Scan for every container image built in a job, by running the Develocity Docker build agent alongside the build. The agent subscribes to BuildKit's build history stream, so nothing about the build itself changes: no Dockerfile edit, no wrapper script, no change to the command that builds the image.

A consumer adds one step before their build. The agent is stopped and the scans it published are reported when the job ends. The access key goes through the shared auth helper, so Docker scans get short-lived tokens like the Maven and npm actions do.

The agent needs a JDK 21, and the action deliberately avoids actions/setup-java, which exports JAVA_HOME and prepends PATH for the whole job and so changes the JDK the build under test compiles with. It probes the runner instead and only downloads a JDK when it finds none.

@donat
donat force-pushed the donat/add-docker-support branch from 8f7cef6 to 83c15db Compare October 1, 2026 09:01
@donat
donat marked this pull request as ready for review October 1, 2026 09:14
Publishes a Build Scan for every container image built in a job, by running the
Develocity Docker build agent alongside the build. The agent subscribes to
BuildKit's build history stream, so nothing about the build itself changes: no
Dockerfile edit, no wrapper script, no change to the command that builds the
image.

A consumer adds one step before their build. The agent is stopped and the scans
it published are reported when the job ends. The access key goes through the
shared auth helper, so Docker scans get short-lived tokens like the Maven and
npm actions do.

The agent needs a JDK 21, and the action deliberately avoids actions/setup-java,
which exports JAVA_HOME and prepends PATH for the whole job and so changes the
JDK the build under test compiles with. It probes the runner instead and only
downloads a JDK when it finds none.
@donat
donat force-pushed the donat/add-docker-support branch from 83c15db to 0db40ef Compare October 1, 2026 11:30
@donat donat changed the title Add a setup-docker action Add setup-docker action Oct 2, 2026

@jprinet jprinet 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.

Three items to fix before merge, see inline comments.

Comment thread setup-docker/src/main.ts Outdated
Comment thread setup-docker/src/agent.ts Outdated
Comment thread README.md
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor
Job Requested goals Build Tool Version Build Outcome Build Scan®
test-capture clean 3.9.16 ✅ Build Scan NOT_PUBLISHED
test-capture initialize 3.9.16 ✅ Build Scan NOT_PUBLISHED
Generated by gradle/develocity-actions

@jprinet jprinet 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.

LGTM, thanks Donat!

@donat
donat merged commit 825b1a6 into main Oct 5, 2026
8 checks passed
@donat
donat deleted the donat/add-docker-support branch October 5, 2026 07:09
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.

2 participants