Skip to content

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
mainfrom
dev/multiple-server-tests
Draft

feat(jira-test-image): self-host the test image and run test suite on multiple jira versions#2423
adehad wants to merge 2 commits into
mainfrom
dev/multiple-server-tests

Conversation

@adehad

@adehad adehad commented May 4, 2026

Copy link
Copy Markdown
Contributor

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

@adehad adehad requested review from a team and ssbarnea as code owners May 4, 2026 08:58
@adehad adehad marked this pull request as draft May 4, 2026 08:58
@adehad adehad force-pushed the dev/multiple-server-tests branch from b449f8f to ac59ac2 Compare May 4, 2026 09:06
@adehad adehad force-pushed the dev/multiple-server-tests branch from 9a926b9 to 63b8a6a Compare May 4, 2026 09:20
@adehad adehad force-pushed the dev/multiple-server-tests branch from 63b8a6a to 52eb99d Compare May 4, 2026 09:33
@adehad adehad force-pushed the dev/multiple-server-tests branch from 52eb99d to 7c8bde2 Compare May 4, 2026 10:05
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>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants