feat(jira-test-image): self-host the test image and run test suite on multiple jira versions#2423
Draft
adehad wants to merge 2 commits into
Draft
feat(jira-test-image): self-host the test image and run test suite on multiple jira versions#2423adehad wants to merge 2 commits into
adehad wants to merge 2 commits into
Conversation
b449f8f to
ac59ac2
Compare
9a926b9 to
63b8a6a
Compare
63b8a6a to
52eb99d
Compare
52eb99d to
7c8bde2
Compare
Replaces the thin wrapper around `addono/jira-software-standalone`
with a multi-stage Dockerfile whose every Jira-major-specific knob is
a build-arg, lifting the previous "Jira 8 only" limitation. The same
source tree now builds Jira 8 through Jira 11 by flipping ARGs alone,
without depending on the addono base image (which itself is anchored
to the Jira 8.x dependency graph and silently falls back to 8.x for
newer majors).
Defaults pin to Jira 8.17.1 - the version `jira_server_ci.yml` runs
against - so the existing `docker build docker/jira-test-image` step
continues producing the same image without per-major overrides.
What changed:
docker/jira-test-image/Dockerfile
Six ARGs (JAVA_IMAGE, AMPS_VERSION, JIRA_VERSION,
SPRING_SCANNER_VERSION, TESTRUNNER_VERSION, COMPILE_FLOOR) drive
the version pins. Three stages (base / warmer / warmed / unwarmed)
let callers opt into a pre-warmed image (~1-2 min cold-boot in
exchange for ~25 min build time) via `--target warmed`.
docker/jira-test-image/plugin/pom.xml.template (new)
Source pom with `@AMPS_VERSION@`, `@SPRING_SCANNER_VERSION@`,
`@TESTRUNNER_VERSION@`, and `@COMPILE_FLOOR@` placeholders.
Rendered to plugin/pom.xml during the base stage by render-pom.sh
and excluded from git via plugin/.gitignore.
docker/jira-test-image/scripts/ (new)
install-sdk.sh: installs atlassian-plugin-sdk from the
maven-external tarball.
render-pom.sh: substitutes the four `@TOKEN@` values into the
template; fails loudly if any placeholder is left untouched.
warm.sh: builds the warmer stage. Boots atlas-run with stdin
redirected from /dev/zero so the Cargo Maven plugin does not see
EOF and shut Jira down mid-warm during the no-TTY docker build.
smoke.sh: local + CI smoke harness.
.github/workflows/ghcr-publish.yml (new)
workflow_dispatch publish job. Exposes every Dockerfile ARG as an
input. Always builds and pushes both the unwarmed and warmed
variants in a single run; the optional `tag_latest` boolean also
pushes `:<major>-latest` and `:<major>-warm-latest` floating tags.
Pushes to GHCR under the repository owner's namespace as
`ghcr.io/<owner>/jira-test-image`.
docker/jira-test-image/README.md
Removes the "Jira 9+/11+ are not supported here" caveat. Adds
"Targeting a different Jira version", "Known-good build-arg
combinations" (with the validated Jira 8/9/10/11 matrix and AMPS
line gotchas), "Warmed variant", and "Publishing" subsections.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7c8bde2 to
512ded8
Compare
Replaces the per-row `docker build` step with a `docker pull` of the
warmed image published by `.github/workflows/ghcr-publish.yml`. Trades
the ~10-20 min Maven download + atlas-run unpack on every CI run for a
~1-2 min image pull + warmed cold-boot, in exchange for the prerequisite
that each Jira version in the matrix has already been published.
Matrix: 8.17.1 / 8.20.30 / 9.12.34 / 11.3.4. Each must exist as
`ghcr.io/<owner>/jira-test-image:<jira-version>-warm` before this CI
run can proceed; dispatch `ghcr-publish.yml` once per version with
`tag_warm` implicit (the workflow always produces both unwarmed and
warmed) to populate them.
Other changes:
- Adds `permissions: { contents: read, packages: read }` so the
runner's GITHUB_TOKEN can authenticate to GHCR for the pull.
- Adds the `docker/login-action` step.
- Drops the `-e JIRA_VERSION=...` override on `docker run`. Warmed
images carry a baked `target/` directory anchored to the version
used at publish; the runtime entrypoint also runs Maven offline
(`-o`), so a runtime override would force atlas-run to look for
artifacts that are not in the cache.
- Drops the per-row JAVA_IMAGE / AMPS_VERSION / SPRING_SCANNER_VERSION
/ COMPILE_FLOOR build-args from the matrix; those now belong to
the publish workflow's inputs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This proof of concept PR shows the regressions on various different versions of the self hosted Jira, we can therefore use this to test multi-version compatible changes
FYI @studioj