[xwiki/xwiki-docker] 2ae7da: XDOCKER-18: Automate updating the stable version
Branch: refs/heads/XDOCKER-18-automate-docker-images-release Home: https://github.com/xwiki/xwiki-docker Commit: 2ae7da2de8e367c24bd670a1f86a9aaae728e9ec https://github.com/xwiki/xwiki-docker/commit/2ae7da2de8e367c24bd670a1f86a9aa... Author: Vincent Massol <[email protected]> Date: 2026-08-24 (Mon, 24 Aug 2026) Changed paths: M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Never downgrade a JDBC driver below the pinned version The JDBC driver version declared in a cycle's own xwiki-platform POM is a floor, not an exact target, so updateJDBC now keeps whatever is pinned in versions.json when the POM declares something older. A pin ahead of the POM is a deliberate bump made after that cycle was released (a security fix, or a Renovate upgrade such as XWIKI-24657 for the MySQL connector), and applying the POM value literally would silently revert it and rebuild the images for nothing. Upgrades still apply, including the ones crossing a driver major, but those now say so in the log since the release manager reviews the diff before committing it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 002d0ba05f23bd441e23d75cb0dfef99f91be8a3 https://github.com/xwiki/xwiki-docker/commit/002d0ba05f23bd441e23d75cb0dfef9... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M build.gradle M gradle/run-instances.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Fix the runAll/stopAll variant selection being shadowed * The 'ext.variants' extra property holding the DB variants collided with the '-Pvariants' project property that 'runAll'/'stopAll' read to narrow their selection down. Since the extra property is set before the script declaring those tasks is applied, 'project.hasProperty("variants")' was always true and 'project.property("variants")' always returned the variant List rather than the command line String. Both tasks thus failed with "No signature of method: java.util.ArrayList.tokenize()" on every invocation, with or without the flag. * Renamed the extra property to 'imageVariants' so that it no longer shares the '-Pvariants' name. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 71cf44ab99b9bb73ca14054d3712d5174735849f https://github.com/xwiki/xwiki-docker/commit/71cf44ab99b9bb73ca14054d3712d51... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M README.md M gradle/run-instances.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Build the image in smokeTest instead of pulling it * The generated docker-compose.yml has no 'build' section, only 'image: xwiki:<version>-<variant>', so 'smokeTest' pulled that tag from DockerHub. At release time that tag does not exist yet, since the official image for a version is only built once the 'submitOfficialImage' pull request has been merged, which happens after 'release' runs. The boot therefore failed with "manifest unknown" in exactly the scenario the task exists for, and when run on an already published version it silently exercised that published image rather than the freshly regenerated Dockerfile. * Build the image locally before booting it, so that the smoke test covers the Dockerfile that was just generated. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: b85244035d73d24aa03705eb8c0631569ccd3779 https://github.com/xwiki/xwiki-docker/commit/b85244035d73d24aa03705eb8c06315... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/helpers.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Fix the captured command output being truncated or empty * 'capture' consumed the process output into two writers and then merely waited for the process, which races with the threads draining its streams: the process can exit while they still have bytes to write, so the captured stdout came back short or altogether empty. Measured on a 4 MB output, 4 runs out of 50 returned an empty String. * Everything 'capture' reads either decides something or ends up in the content submitted upstream, so a silently short read is not an option: 'git status --porcelain' coming back empty passes the dirty tree guard of 'submitOfficialImage', and an empty 'git log' answer emits an empty 'GitCommit' into the official images file. * Use 'waitForProcessOutput', which waits for the process and for both draining threads (and still lets 'exitValue' be read afterwards). Same measurement: 0 mismatches out of 50. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 0e269b4012d535283f83dcb581bfa4e1ddbd9fd2 https://github.com/xwiki/xwiki-docker/commit/0e269b4012d535283f83dcb581bfa4e... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/run-instances.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Build the images in runAll instead of pulling them * 'runAll' rewrote the ports and the container names of the generated docker-compose.yml but left its 'image' line alone, so it pulled 'xwiki:<version>-<variant>' from DockerHub exactly like 'smokeTest' used to. At release time that tag does not exist yet, so the boot failed with "manifest unknown" precisely when the images worth looking at are the ones just regenerated, and on an already published version it silently ran the published image instead of them. * Extract the build step into a 'buildImage' helper shared with 'smokeTest' and build each instance before starting it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: e38fdf226f2a5dddf7ecec4e785a22568a00b739 https://github.com/xwiki/xwiki-docker/commit/e38fdf226f2a5dddf7ecec4e785a225... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/release.gradle M gradle/run-instances.gradle M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Smoke test the cycles changed by any of the update tasks * 'smokeTest' picked the cycles to boot from what 'updateXWiki' reported, so a release bumping only a JDBC driver or the shared LibreOffice version regenerated images and then tested nothing at all, although those are the changes carrying a brand new download URL and sha256, i.e. the ones most likely to break the build. * 'updateJDBC' now reports the cycles whose drivers it changed, and 'updateLibreOffice' reports that all of them changed, since the LibreOffice version is shared by every cycle. The holder they share with 'smokeTest' is renamed to 'versionUpdate' accordingly. * Order 'smokeTest' after the update tasks themselves and not only after the 'generate' they order before, so that it still sees what they changed when it is chained without 'generate' (e.g. './gradlew updateJDBC smokeTest'). * Log the cycles being tested, since which ones they are is now the result of what three tasks found. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: cc25828f36ed4f5af7a53876620d2424caaedea8 https://github.com/xwiki/xwiki-docker/commit/cc25828f36ed4f5af7a53876620d242... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/helpers.gradle M gradle/run-instances.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Report the docker output as it comes instead of swallowing it * The docker commands went through 'capture', which buffers the whole output and returns it, so booting an instance showed nothing at all until it was over. A 'docker build' downloading the XWiki WAR and the LibreOffice archive takes minutes and says what it is doing all along, and none of that was reported; the log was only held in memory to be thrown away, or quoted in an exception once the command had already failed. * Add a 'stream' helper next to 'capture' for the commands whose output is worth watching rather than parsing, and use it for 'docker build' and the 'docker compose' calls of 'smokeTest', 'runAll' and 'stopAll'. It merges stderr into stdout, reports each line as it arrives, and reads the stream to its end before waiting for the process. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 45c3781ae40d584c4cf395fab9dfe2ffe7e34588 https://github.com/xwiki/xwiki-docker/commit/45c3781ae40d584c4cf395fab9dfe2f... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/run-instances.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Build the images with the classic builder like the CI does * 'smokeTest' and 'runAll' built with whatever builder the local Docker defaults to, i.e. BuildKit, while the Docker Official Images infrastructure uses the classic builder and the Docker Build workflow sets DOCKER_BUILDKIT=0 to match it. The two do not accept the same Dockerfiles: the classic builder leaves Docker's automatic platform arguments empty, for one, so a Dockerfile reading TARGETARCH builds fine locally and breaks where the image is really built. * Ask for the classic builder in 'buildImage' too, so that a green boot check says something about the build that will actually be run. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 0d655d239728bcb0bc1cb5baab246b5947a0e62d https://github.com/xwiki/xwiki-docker/commit/0d655d239728bcb0bc1cb5baab246b5... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/official-image.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Require the commits submitted upstream to be on master * 'submitOfficialImage' refused an unpushed HEAD by looking for it in any remote branch at all, so running it from a Pull Request branch passed the check although docker-library fetches the images from the master branch of GitRepo alone. The GitCommit values emitted for such a run point at commits nobody but GitHub can fetch. * Check that HEAD is on the branch docker-library actually fetches, and fetch that remote-tracking branch first since it goes stale as soon as the change is pushed from elsewhere (a merged Pull Request, another clone). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: bec5290ad13e91d35c11bfdfc51da3116207225a https://github.com/xwiki/xwiki-docker/commit/bec5290ad13e91d35c11bfdfc51da31... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M build.gradle M gradle/official-image.gradle M gradle/release.gradle M gradle/run-instances.gradle M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * List the tasks in './gradlew tasks' * None of the tasks declared a group, so they all landed in the ungrouped bucket that './gradlew tasks' only prints with '--all'. The plain listing showed none of the entry points the README documents, and no description of what they do or of the order they are meant to be run in. * Give each of them a group and a description: 'generation' for the two tasks generating the images and the workflow, 'release' for the version updates and the two release entry points, and 'verification' for the ones booting images. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 60066264e30ddd7766c8d8db1c4cf9b882ff9def https://github.com/xwiki/xwiki-docker/commit/60066264e30ddd7766c8d8db1c4cf9b... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/helpers.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Compare the versions without failing on a qualifier * 'compareVersions' parsed every dot-separated component as an int, so a version carrying anything but digits threw a NumberFormatException. Every version it is given is plain numbers today, but it decides whether a driver found in a POM is an upgrade over the pinned one, i.e. it reads values this repository does not control, and aborting a release over the day one of them gains a qualifier is a poor trade. * Compare each component on the number it starts with, falling back to comparing the components as text when those numbers are equal, so that a qualifier orders instead of failing. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 788e851496116571d71d520ca32bb8e861e546dd https://github.com/xwiki/xwiki-docker/commit/788e851496116571d71d520ca32bb8e... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Look the JDBC driver properties up by their exact name * The regex reading a driver version out of a cycle's POM interpolated the property name as it is, so the '.' of 'mysql.version' was left as the regex metacharacter matching any character. Nothing in the POMs happens to match those patterns loosely today, but a property whose name only resembles the one being read would be picked up. * Quote the property name so that it is matched literally. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 0f911f71b8e8120629bbc7cf6438eb8425f5c8e0 https://github.com/xwiki/xwiki-docker/commit/0f911f71b8e8120629bbc7cf6438eb8... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Leave versions.json alone when LibreOffice has not moved * 'updateLibreOffice' rewrote the whole data file on every run, including when it had just resolved the very version and checksums already pinned, unlike the two other update tasks which only write what they changed. * Write only when the version or one of the two checksums differs, and report a checksum changing under an unchanged version for what it is, since that means the archive it was read from was republished. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: f7380e02d12d7a3f282c2444385471a0a3424ed0 https://github.com/xwiki/xwiki-docker/commit/f7380e02d12d7a3f282c2444385471a... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/official-image.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Never close an official images Pull Request still open * 'submitOfficialImage' names its branch after the stable version and deleted that branch on the fork before recreating it. Running it twice for the same version, which happens whenever something has to be corrected, deleted the ref of the branch the pending Pull Request was opened from, and GitHub closes a Pull Request whose head branch is gone. A submission still being reviewed upstream is not ours to close. * Refuse to run when a Pull Request is still open from that branch, naming it so it can be looked at. * Also fail with an explanation rather than a NullPointerException when no cycle declares the 'stable' role, since that is the version the branch and the commit message are named after. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 91f807ab1cd6d3b284647a03cadc133c76155e72 https://github.com/xwiki/xwiki-docker/commit/91f807ab1cd6d3b284647a03cadc133... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M build.gradle M gradle/official-image.gradle M gradle/run-instances.gradle M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Say what binding the model at configuration time really buys * The comments explaining why the applied scripts bind the model and the helpers into local variables claimed that no task action reaches for the project while it runs, which is not what the code does: 'generate' and 'generateWorkflows' call 'copy', and the tasks booting images resolve their paths with 'file'. A comment promising more than the code delivers is worse than no comment, and this one would have the next reader believe the build is configuration cache compatible when it is not. * State what the binding actually avoids, namely reading the project properties from inside the task actions, and say where the build still stands with the configuration cache. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 0f7d6b4912e3884725e4e7d5f2fadb5128cfefbd https://github.com/xwiki/xwiki-docker/commit/0f7d6b4912e3884725e4e7d5f2fadb5... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/release.gradle M gradle/run-instances.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Give each booted instance a compose project of its own * 'smokeTest' ran 'docker compose up -d' and 'down -v' straight in the version/variant directory, so its compose project was the directory basename - 'postgres-tomcat', which every cycle shares and which is also what a developer gets from 'cd 18/postgres-tomcat && docker compose up'. Booting cycle 18 while such an instance was running failed on the container name and the port 8080 already taken, and the teardown in the 'finally' then removed that instance's containers and, with '-v', its data volumes. A release check has no business deleting someone's wiki. * Rename 'runAllCompose' to 'composeInstance', move it above 'smokeTest' and use it there too, so the smoke test gets the port and container renaming plus the '-p' project that 'runAll' already had. Both derive their project name through 'composeProject', which prefixes it with the task so tearing one down never reaches the other. * Publish the smoke test on 18080 rather than 8080, so that a port a developer is already using cannot fail a boot for a reason unrelated to the image being checked. * Depend on 'generate' in 'smokeTest' and 'runAll'. The image is tagged with the model's XWiki version while the compose file names the one in the generated '.env', so './gradlew updateXWiki smokeTest' used to boot the previously published image and then wait ten minutes for a version it could never report. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 9404e700becafd456c9cf31e0c14cb01ce6d948a https://github.com/xwiki/xwiki-docker/commit/9404e700becafd456c9cf31e0c14cb0... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/helpers.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Retry a download that failed rather than abort the release * 'release' streams the XWiki WAR and the LibreOffice archives, hundreds of megabytes from hosts that fail transiently often enough that the generated Dockerfile retries its own downloads for that very reason (CURL_OPTIONS in template/Dockerfile). Here a single blip aborted the run, possibly after 'versions.json' had already been rewritten for the cycles handled before it, leaving the release manager to work out how far it got. * Fold the redirect-following loop that 'httpGetText' and 'sha256OfUrl' each carried into a single 'httpGet' that hands the response stream to a consumer, and give it three attempts with a growing delay. A failure while the consumer is reading counts too, since that is where a large download dies. * Only retry what can get better on its own: an IOException and the 408/429/5xx statuses. A 404 on a version that does not exist still fails at once instead of burning the delays first. * Convert the command to plain Strings in 'stream'. ProcessBuilder only turns its list into an array when the process starts, so a GString slipped into it failed there with an ArrayStoreException rather than where it was written - and 'capture', which the same scripts use interchangeably, takes GStrings in its stride. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 82b1366ba240cdbb3a67dab78a0fc1e0d1e854c4 https://github.com/xwiki/xwiki-docker/commit/82b1366ba240cdbb3a67dab78a0fc1e... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M build.gradle M gradle/official-image.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Reject a cycle role that docker-library would not understand * The 'role' of a cycle is not only ours: it drives the tag aliases and the section comments of the official Docker library file that 'submitOfficialImage' submits to docker-library. A typo in 'versions.json' went through unnoticed, emitting a literal 'null' section header, silently dropping that cycle's stable-*/lts-* aliases and putting '(null)' in the Pull Request body - noticed, if at all, by a reviewer upstream. * Check the roles when build.gradle reads the model, and check that exactly one cycle is the stable one, since the branch and the commit message of that Pull Request are named after its version. * Drop the check 'submitOfficialImage' made for a missing stable cycle, now that it cannot happen, and say where the invariant comes from. * Also drop 'ext.versionsFile', which nothing read: 'writeVersions' closes over it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 1f86dc5806a455a14e298bc94ec8609d57c49f59 https://github.com/xwiki/xwiki-docker/commit/1f86dc5806a455a14e298bc94ec8609... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Hash the WAR at the URL the image downloads it from * 'updateXWiki' resolved the versions and computed the sha256 from nexus.xwiki.org while the generated Dockerfile downloads the WAR from maven.xwiki.org, on the argument that the two serve the same artifacts. They do, but pinning the bytes the image actually fetches is the whole point of the hash, and it costs nothing to read them from the one URL that matters. The JDBC and LibreOffice hashes are already taken from their own download URL. * Read the maven-metadata.xml and the WAR from maven.xwiki.org/releases, sharing the one repository URL, and read the cycle POM of 'updateJDBC' from there as well rather than from a second repository. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: d408259d52aeb3713a945ee14645ae050f790921 https://github.com/xwiki/xwiki-docker/commit/d408259d52aeb3713a945ee14645ae0... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M .github/workflows/gradlew-check.yml Log Message: ----------- XDOCKER-18: Automate updating the stable version * Check the generated files on Pull Requests too * The Gradlew Check workflow is what guarantees that the committed generated files are what the templates and versions.json produce, but it only ran on a push to master - so a Pull Request changing either was merged before anything verified it, and master was where it broke. * Run it on Pull Requests as well. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 234ae9c09d49590d78a72d42499f5d1f73195e0f https://github.com/xwiki/xwiki-docker/commit/234ae9c09d49590d78a72d42499f5d1... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Never downgrade the XWiki version of a cycle * Apply to 'updateXWiki' the floor rule 'updateJDBC' already has. A pinned version ahead of everything the Maven metadata lists means the metadata lost it (a release pulled for being broken, a repository half synced), not that the cycle should be rebuilt and republished backwards. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 4c0864e21bb8b3dadaed18c0f899c88afcb245bf https://github.com/xwiki/xwiki-docker/commit/4c0864e21bb8b3dadaed18c0f899c88... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M README.md M gradle/run-instances.gradle M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Smoke test what a change is about, and say why it failed * Boot, for each cycle, the variant of every database whose JDBC driver 'updateJDBC' moved, on top of the postgres-tomcat baseline. A driver bump is the one DB-specific change there is, and nothing else in the build ever connects XWiki to a database - the Docker Build workflow only checks that the jar landed in WEB-INF/lib - so a MySQL connector crossing a major went out entirely unbooted. 'updateJDBC' now reports which database moved, and '-Pvariants' overrides the selection. * Report the tail of the container logs when an instance never comes up, while the containers still exist: the 'down -v' takes them away, and a bare timeout message is not something a failed release can be diagnosed from. * Match the version reported by the REST API between boundaries instead of as a substring. One version string can be the prefix of another, so an instance answering 17.10.12 satisfied a smoke test expecting 17.10.1, i.e. the release gate went green on the wrong image. * Fail when the docker-compose.yml rewrites that isolate an instance find nothing to replace, instead of silently booting on 8080 in the shared project and tearing down, volumes included, whatever was started there by hand. * Tear down the instance's compose project before starting it too, so that a stale one left by a killed daemon or a reboot is not adopted and reported on in place of the image just built. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: afb2fa2e1e4fe9b5729bdf834a704cbd64360a7b https://github.com/xwiki/xwiki-docker/commit/afb2fa2e1e4fe9b5729bdf834a704cb... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M build.gradle M gradle/helpers.gradle M gradle/official-image.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Keep the official images file honest about what it declares * Stop untracked files blocking 'submitOfficialImage'. What the guard is about is whether the commits it emits are reachable upstream, which a release manager's scratch notes have no bearing on, so it now looks at tracked changes only - and names them, instead of leaving 'git status' to be run by hand. * Define what a cycle 'role' means in a single map, the section comment and the Pull Request label together, and check the model against it there. The labels used to live apart from the check, leaving the Pull Request body free to render an unknown role as 'null' while everything else looked right. * Reject a variant that build.gradle generates but this file does not declare. It would be generated, committed and built by CI, yet never reach the file that publishes it, so the images would simply not exist on DockerHub. * Retry syncing the fork, which GitHub creates asynchronously and which a first-ever run can therefore fail to find. * Drop 'capture's working directory parameter, which no caller passes, and the unused ReplaceTokens import. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: 3e8130cb548cb9af4941ad8e760afc8044bb1897 https://github.com/xwiki/xwiki-docker/commit/3e8130cb548cb9af4941ad8e760afc8... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M gradle/official-image.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Submit the current URL of this repository * Emit 'GitRepo: https://github.com/xwiki/xwiki-docker.git'. The published file still names xwiki-contrib/docker-xwiki, which only resolves through the redirect GitHub kept when this repository moved to the xwiki organisation, and that redirect goes away the day anything else is created under the old name - taking the official image builds with it. This is the one line by which the generated file now differs from the published one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Commit: c5ef69d1da25b539078598265796fe5334ef71d7 https://github.com/xwiki/xwiki-docker/commit/c5ef69d1da25b539078598265796fe5... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M .github/workflows/docker-build.yml M README.md M build.gradle M gradle/helpers.gradle M gradle/official-image.gradle M gradle/run-instances.gradle M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * submitOfficialImage now refuses to submit images the Docker Build workflow has not built successfully: what docker-library rebuilds is the GitCommit(s) emitted in the library file, so that workflow is what says they build at all, and without the check the first thing to notice a broken Dockerfile is the upstream Pull Request. The workflow only triggers on the paths the images are made of, so a HEAD that triggered no run of its own is checked against the latest run of the release branch instead; no run at all is reported but not fatal. '-PskipCiCheck' waives it, since that workflow also goes red on the transient download failures it is prone to. * Add '-PtargetRepo=<you>/official-images' to submitOfficialImage, so that the write path - the one part a dry run cannot exercise - can be rehearsed against a repository of your own rather than run for the first time during a release. A target you own needs no fork (GitHub does not let you fork your own repository), so the branch then lives in it and the Pull Request is opened inside it; a rehearsal waives the guards on what is reachable upstream, that being the point of it. * Drop 'gradle/*.gradle' from the paths triggering the Docker Build workflow: none of those scripts takes part in the generation, so a change to one cannot change an image, and building the whole matrix for it costs 12 jobs for nothing. That they still configure and generate is what Gradlew Check verifies, now on Pull Requests too. * Move the ports runAll publishes off 8080 (18081 and up, '-PbasePort' to move them), which is what smokeTest already does and for the same reason: 8080 is the port a developer's own instance holds, and binding it fails the boot for a reason that has nothing to do with the image. * Parse the '-Pcycles' / '-Pvariants' selections once, through a 'parseList' helper, instead of repeating the same tokenize/trim/filter in four places. * Only tell the release manager to regenerate the images when something actually moved, rather than after every update task run. * Say in the README (and next to buildImage) that smokeTest and runAll overwrite the local image tag they build, the published official image of that version included, and document the new flags. Commit: a821df51adab4ad4f078587d8815752d97999e5b https://github.com/xwiki/xwiki-docker/commit/a821df51adab4ad4f078587d8815752... Author: Vincent Massol <[email protected]> Date: 2026-08-26 (Wed, 26 Aug 2026) Changed paths: M gradle/helpers.gradle M gradle/official-image.gradle M gradle/update-versions.gradle Log Message: ----------- XDOCKER-18: Automate updating the stable version * Establish, rather than assume, that a Docker Build run describes the images being submitted. A commit that triggered no run of its own was taken to have changed no image, but a run GitHub has not created yet looks exactly the same over the API - and pushing then submitting a few seconds later is how a release goes - so the check could go green on images nothing had built. The fallback is now the latest run of the history being submitted, and it is accepted only when it contains the GitCommit of every cycle. * Stop the two 'gh api' guards from failing open. Both allowed the call to fail and read the resulting empty output as "nothing found", so a rate-limited or unauthenticated 'gh' passed them silently - and for the open Pull Request one, passing means deleting the branch, which closes the Pull Request the guard exists to protect. * Refuse to emit an empty GitCommit. A cycle directory that has never been committed has no last-touching commit and 'git log' says so by printing nothing, which submitted a 'GitCommit:' line with nothing on it. Adding a cycle leaves exactly such an untracked directory behind. * Run the captured commands in the project directory instead of wherever the build process happens to sit, since all of them ask git about this repository. * Drop the 'run ./gradlew' line that 'updateJDBC' logged whether or not anything had changed, and which repeated the one just above it when something had. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Compare: https://github.com/xwiki/xwiki-docker/compare/49f6b9b2d1fd...a821df51adab To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-docker/settings/notifications
participants (1)
-
XWiki Notifications