Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
edeb9fe
build: add secret-free Docker image for chpl-api
tmy1313 Jul 22, 2026
7dbfa2a
ci: publish chpl-api Docker image to GHCR
tmy1313 Jul 22, 2026
1cf2ee3
test: temporarily trigger docker-publish on pull_request
tmy1313 Jul 22, 2026
eafd1a8
ci: tag chpl-api image with build number, sha, and branch pointer
tmy1313 Jul 22, 2026
f11e1e5
docs: document required env vars for the chpl-api Docker image
tmy1313 Jul 22, 2026
5816d90
ci: disable provenance/sbom attestations for chpl-api image push
tmy1313 Jul 22, 2026
42578db
Revert "test: temporarily trigger docker-publish on pull_request"
tmy1313 Jul 22, 2026
419ec7d
ci: build chpl-api image on merge to environment branches
tmy1313 Jul 22, 2026
f9fad67
chore(docker): remove unused JWK_KEY signing-key mechanism
tmy1313 Jul 23, 2026
636e109
ci: add .dockerignore to shrink chpl-api image build context
tmy1313 Jul 23, 2026
7d1ede2
chore: remove orphaned .gitattributes rule for deleted entrypoint.sh
tmy1313 Jul 23, 2026
59e779b
ci: cancel in-flight docker-publish runs for the same branch
tmy1313 Jul 23, 2026
ea9b5d4
ci: run unit tests before building docker image
tmy1313 Jul 23, 2026
26a13a1
ci: fail fast on compile errors before building docker image
tmy1313 Jul 23, 2026
cfb9ae6
test: temporarily break a unit test to verify CI gate
tmy1313 Jul 23, 2026
70ab194
Revert "test: temporarily break a unit test to verify CI gate"
tmy1313 Jul 23, 2026
1d610f9
test: temporarily break compilation to verify CI gate
tmy1313 Jul 23, 2026
6892a31
Revert "test: temporarily break compilation to verify CI gate"
tmy1313 Jul 23, 2026
e5b5ae3
feat(docker): add tomcat-users.xml with ff4j admin user
tmy1313 Jul 24, 2026
7120177
revert: remove unused ff4j tomcat-users.xml and credential handler
tmy1313 Jul 24, 2026
e22ff1c
fix(docker): add user-triggers.xml required by Quartz job initializer
tmy1313 Jul 24, 2026
be92bb6
chore(docker): bump Tomcat base image to 11.0.24
tmy1313 Jul 27, 2026
0ecd53c
ci: queue docker-publish runs instead of cancelling in-progress builds
tmy1313 Jul 27, 2026
f2517ef
fix(docker): switch Tomcat connector back to port 8080
tmy1313 Jul 28, 2026
3ec9817
fix: add empty errors-override.properties to stop MessageSource spam
tmy1313 Jul 28, 2026
8b4471e
fix: make deployed log4j2 config the default so job logs reach Datadog
tmy1313 Jul 28, 2026
f0fcd92
test: add temporary marker to verify docker-publish.yml push trigger
tmy1313 Jul 29, 2026
002967f
test: revert marker and add intentionally failing unit test
tmy1313 Jul 29, 2026
93bf01e
test: remove intentionally failing unit test
tmy1313 Jul 29, 2026
50468af
revert: remove unused Quartz user-triggers.xml from Docker image
tmy1313 Aug 10, 2026
01a2dd2
fix: activate per-environment log4j2 profile in GHCR image builds
tmy1313 Aug 13, 2026
d502b79
fix: restore user-triggers.xml, now required again by -Denv=dev/qa/st…
tmy1313 Aug 13, 2026
43cb669
fix: move user-triggers.xml to Tomcat's lib/, not conf/
tmy1313 Aug 13, 2026
9d74439
chore: bump Tomcat base image to 11.0.25-jdk21
tmy1313 Aug 19, 2026
24aebe1
ci: cache Maven dependencies across workflow runs
tmy1313 Aug 19, 2026
1dc64d6
ci: build the WAR once and reuse it in the Docker image
tmy1313 Aug 25, 2026
715ed68
fix(docker): set explicit Tomcat JDBC pool factory on jdbc/openchpl
tmy1313 Sep 9, 2026
f10ff48
revert: restore -local xincludes in chpl-api's log4j2.xml
tmy1313 Sep 9, 2026
6bf6cce
refactor: make errors-override bundle optional instead of shipping a …
tmy1313 Sep 9, 2026
940b8ed
refactor: drop the dormant Quartz user-triggers.xml mechanism
tmy1313 Sep 9, 2026
3057207
fix(docker): build the jdbc/openchpl pool lazily via DBCP2
tmy1313 Sep 15, 2026
3642c4b
diag: log the MessageSource the running context actually injects
tmy1313 Sep 15, 2026
432e91c
chore(docker): bump Tomcat to 11.0.26 across the image and pom pins
tmy1313 Sep 18, 2026
8c1b338
revert: drop the temporary MessageSource startup diagnostic
tmy1313 Sep 18, 2026
0050432
test: resolve error codes against the real errors.properties bundle
tmy1313 Sep 18, 2026
71cc569
Merge remote-tracking branch 'upstream/staging' into OCD-5395
tmy1313 Sep 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
**/target/
node_modules
.vscode
.claude
158 changes: 158 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: Publish Docker Image

on:
workflow_dispatch: {}
# One workflow, shared by every environment branch: a merge into any of
# these triggers a build tagged latest-<that-branch>. No per-branch copies
# or separate workflow files to keep in sync.
push:
branches:
- development
- qa
- staging
- production

# Publishes a floating latest-<branch> tag - without this, two runs for the
# same branch could race and let an older commit's build finish last,
# overwriting latest-<branch> with a stale image. cancel-in-progress is
# false so runs queue and execute one at a time in the order they were
# triggered, instead of a newer push cancelling a build already in
# progress.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

permissions:
contents: read
packages: write

jobs:
# Mirrors the "Run API Unit Tests" job in the Bamboo CHPL Development
# Deployment plan (chpl-build/chpl-build-dev): `mvn clean test` against
# chpl/pom.xml on JDK 21. Gates the image build so a broken build never
# gets published.
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'

- name: Run unit tests
env:
MAVEN_OPTS: -Xms512m -Xmx1024m
run: mvn -B clean test --file chpl/pom.xml

# Mirrors the "Build API" job (CompileApiTask) in the same Bamboo plan, and
# builds the exact WAR docker/Dockerfile packages into the image (see the
# "Upload WAR" step below) - so a compile/packaging failure shows up here,
# fast, instead of partway through the (slower) Docker build.
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'

# Maps this branch to the same -Denv value chpl-build-common's
# BuildEnvironment.getMavenEnvProperty() uses for the build-from-source
# path in each environment. Falls back to "dev" for workflow_dispatch
# runs off any other branch.
- name: Determine Maven environment profile
id: envprofile
run: |
case "${{ github.ref_name }}" in
development) echo "value=dev" >> "$GITHUB_OUTPUT" ;;
qa) echo "value=qa" >> "$GITHUB_OUTPUT" ;;
staging) echo "value=staging" >> "$GITHUB_OUTPUT" ;;
production) echo "value=production" >> "$GITHUB_OUTPUT" ;;
*) echo "value=dev" >> "$GITHUB_OUTPUT" ;;
esac

- name: Compile and package
env:
MAVEN_OPTS: -Xms512m -Xmx1024m
run: mvn -B clean package -DskipTests -Denv=${{ steps.envprofile.outputs.value }} --file chpl/pom.xml

# Handed to build-and-push below, so the Docker image build doesn't
# need to rerun the Maven compile (which just ran here, with the
# setup-java ~/.m2 cache already warm) itself.
- name: Upload WAR
uses: actions/upload-artifact@v4
with:
name: chpl-service-war
path: chpl/chpl-api/target/chpl-service.war
retention-days: 1

build-and-push:
needs: [unit-tests, compile]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Compute image metadata
id: meta
run: |
echo "image=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
echo "branch=$(echo '${{ github.ref_name }}' | tr '/' '-')" >> "$GITHUB_OUTPUT"

# Built by the "compile" job above (already -Denv'd for this branch),
# so this build only has to package it into Tomcat.
- name: Download WAR
uses: actions/download-artifact@v4
with:
name: chpl-service-war
path: docker/build-context/

# This image contains no secrets - see docker/Dockerfile. Every environment
# runs the same image apart from the -Denv value the compile job built
# the WAR with (log4j2 config); secrets are supplied as container
# environment variables at `docker run` time, not baked in here.
#
# Tags:
# build-<run_number> - immutable, sequential build number (github.run_number
# never repeats or goes backwards for this workflow)
# sha-<short-sha> - immutable, traces back to the exact commit
# latest-<branch> - floating pointer to the most recent build from that
# branch (latest-development, latest-qa, latest-staging,
# latest-production once triggered from those branches)
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
push: true
# build-push-action v6 enables these by default, which each push a
# separate untagged provenance/SBOM manifest to GHCR alongside the
# real image - not needed here, so turned off to keep the package
# version list clean.
provenance: false
sbom: false
tags: |
${{ steps.meta.outputs.image }}:build-${{ github.run_number }}
${{ steps.meta.outputs.image }}:sha-${{ steps.meta.outputs.sha_short }}
${{ steps.meta.outputs.image }}:latest-${{ steps.meta.outputs.branch }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ pip-log.txt
.mr.developer.cfg

## CHPL specific ignores
/docker/build-context/
/chpl/chpl-etl/src/main/resources/log.txt
/chpl/chpl-etl/src/main/resources/chpl.csv
/chpl/chpl-etl/src/main/resources/chpl-hash.csv
Expand Down
15 changes: 7 additions & 8 deletions chpl/chpl-api/src/main/java/gov/healthit/chpl/CHPLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.core.env.Environment;
import org.springframework.http.MediaType;
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
Expand Down Expand Up @@ -176,13 +176,12 @@ public void configureMessageConverters(List<HttpMessageConverter<?>> converters)

@Bean
public MessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("errors-override");

ResourceBundleMessageSource parentMessageSource = new ResourceBundleMessageSource();
parentMessageSource.setBasename("errors");

messageSource.setParentMessageSource(parentMessageSource);
//errors-override is optional - ReloadableResourceBundleMessageSource treats a
//missing bundle as simply absent, where ResourceBundleMessageSource would WARN
//on every lookup. Basenames are consulted in order, so errors-override still
//takes precedence over errors.
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setBasenames("classpath:errors-override", "classpath:errors");
messageSource.setDefaultEncoding("UTF-8");
return messageSource;
}
Expand Down
Loading
Loading