You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make kpm.yml repository URL configurable for tagged images
tagged/kpm.yml.template gets a nexus block (url: __NEXUSURL__, ssl_verify: true).
docker/dockerTemplate.sh substitutes __NEXUSURL__ from NEXUS_URL, and fails if the template needs it and NEXUS_URL is unset.
docker_ci.yml sets NEXUS_URL=https://repo1.maven.org/maven2 . This is OK because for testing only.
Add cloudsmith Dockerfile template for Kill Bill 0.25+ (docker/templates/killbill/cloudsmith/Dockerfile.template)
Self-contained multi-stage build: builder-base, builder-tomcat, base, shell, final (one final image).
JDK 21 and Tomcat 11, FROM ubuntu:24.04.
The Cloudsmith URL (which contains the token) is passed as the BuildKit secret nexus_url. It is only used inside
one RUN, against a temporary copy of kpm.yml, and removed by a trap. It is never stored in a layer.
The secret is mounted with mode=0444 because that stage runs as the non-root tomcat user. The default
root-only mode fails with Permission denied.
.gitignore ignores the generated cloudsmith/Dockerfile.
Deprecate release.yml and kb_beta_release.yml
Both are now no-ops (still workflow_dispatch only, so nothing else calls them).
maint-for-0-24-x has its own copies of both and is not affected.
If the BuildKit secret artifacts_hook is given, it runs with bash -euo pipefail after Kill Bill and the
default bundles are installed, as the tomcat user. A non-zero exit fails the build.
Meant for callers that need to add things this template knows nothing about, for example extra plugin jars,
registered offline with kpm install_java_plugin <key> --from_source_file=<jar> --version=<v> --destination=$KILLBILL_BUNDLES_DIR.
It is a secret mount, so neither the script nor credentials inside it end up in a layer.
Without the secret the step does nothing, so existing builds are unchanged.
Add a __NEXUSURL__ placeholder and ssl_verify to the tagged kpm.yml template, so the artifact repository is no longer implicit. Without a nexus block, KPM silently skips TLS verification.
dockerTemplate.sh substitutes it from NEXUS_URL and fails fast when the template needs it and NEXUS_URL is unset. docker_ci.yml sets NEXUS_URL to Maven Central.
Kill Bill 0.25.5+ is published only to a private Cloudsmith repository, so it cannot use the Maven Central based beta template. This self-contained multi-stage build (Ubuntu 24.04, JDK 21, Tomcat 11) installs the WAR and default bundles at build time.
The Cloudsmith URL, which embeds an entitlement token, is passed as an optional BuildKit secret (nexus_url) and never stored in a layer. The secret mount uses mode=0444 because the stage runs as a non-root user.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The repository URL is interpolated into a sed replacement without escaping special characters, which can corrupt valid URLs and cause artifact downloads to fail.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The artifacts-hook stage lacks cache invalidation when the optional secret is enabled or changed, allowing BuildKit to silently omit requested plugins or retain stale artifacts.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Secret hook changes can reuse stale cached artifacts
BuildKit does not include secret contents (or whether an optional secret was supplied) in the cache key. After a cached build without artifacts_hook, building the same inputs with the hook supplied can reuse this no-op layer and silently omit the requested plugins; changing an existing hook can likewise retain old artifacts. Add a non-secret hook revision build argument that callers update when enabling/changing the hook, or require callers to disable caching for this stage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tagged/kpm.yml.templategets anexusblock (url: __NEXUSURL__,ssl_verify: true).docker/dockerTemplate.shsubstitutes__NEXUSURL__fromNEXUS_URL, and fails if the template needs it andNEXUS_URLis unset.docker_ci.ymlsetsNEXUS_URL=https://repo1.maven.org/maven2. This is OK because for testing only.docker/templates/killbill/cloudsmith/Dockerfile.template)builder-base,builder-tomcat,base,shell,final(one final image).FROM ubuntu:24.04.nexus_url. It is only used insideone
RUN, against a temporary copy ofkpm.yml, and removed by a trap. It is never stored in a layer.mode=0444because that stage runs as the non-roottomcatuser. The defaultroot-only mode fails with
Permission denied..gitignoreignores the generatedcloudsmith/Dockerfile.workflow_dispatchonly, so nothing else calls them).maint-for-0-24-xhas its own copies of both and is not affected.artifacts_hookbuild secret (same Dockerfile)artifacts_hookis given, it runs withbash -euo pipefailafter Kill Bill and thedefault bundles are installed, as the
tomcatuser. A non-zero exit fails the build.registered offline with
kpm install_java_plugin <key> --from_source_file=<jar> --version=<v> --destination=$KILLBILL_BUNDLES_DIR.KILLBILL_BUNDLES_DIRis exported for the hook.