github-workflows-dojo360-java-ci
Build, test, and scan Java apps using the recommended UHG reusable CI workflows (Maven/Gradle), with Artifactory integration and optional container builds
Java CI Workflow Skill
Overview
This skill covers Java CI patterns for unit tests/build/scans and optional artifact uploads.
The Dojo360 workflow (java-ci.yml) exists, but for new implementations the recommended approach is to use the UHG CI Workflows reusable workflows from uhg-pipelines/ci-workflows (Maven/Gradle variants).
Workflow Reference
Recommended (Use This)
Repository: uhg-pipelines/ci-workflows
Workflows:
.github/workflows/java-maven-ci.yml@v2.github/workflows/java-gradle-ci.yml@v2
Legacy (Dojo360)
Repository: dojo360/pipelines-workflows
Workflow: .github/workflows/java-ci.yml
Docs: https://github.com/dojo360/pipelines-workflows/tree/main/web/java-ci/index.md
Key Features
- Runs Java unit tests and quality scans
- Supports Maven or Gradle based projects
- Artifactory integration via
jfrog-project-key - Optional artifact upload (e.g.,
target/or Gradle build outputs) - Optional Docker build/publish if you pass Docker inputs
Prerequisites
- Java project (Maven:
pom.xmlor Gradle:build.gradle/build.gradle.kts) - Artifactory project/repositories provisioned
- If building containers:
- Dockerfile must use Optum golden images (no public base images)
- Runner must have Docker available
Common Inputs (UHG reusable workflows)
| Input | Type | Description |
|---|---|---|
jfrog-project-key | string | JFrog project key (routes to the correct SaaS Artifactory repos) |
working-directory | string | Where your Java project lives (default: .) |
java-version | string | Java version (e.g., 17) |
java-distribution | string | Java distribution (e.g., temurin) |
docker-tags | string | Image tag(s) to publish when doing Docker builds |
docker-context | string | Docker build context |
docker-dockerfile | string | Dockerfile path |
upload-artifacts-path | string | Paths to upload (commonly target/ for Maven) |
Secrets
UHG reusable workflows generally handle Artifactory auth via OIDC + EPL actions, but you may still need:
- Repo/org secrets required by your org’s scanning configuration
- If you enable scanners that require tokens (e.g., Sonar), ensure those secrets exist
Templates
See ready-to-copy examples in .github/skills/github-workflows-dojo360-java-ci/templates/:
basic-java-maven-ci.ymlbasic-java-gradle-ci.ymljava-maven-ci-with-docker-build.yml
Notes / Gotchas
- If you build container images, ensure your Dockerfile uses Optum golden images (see
.github/instructions/docker.instructions.md). - If your repo is multi-module, set
working-directoryto the module root.
Related Assets
github-workflows-dojo360-azure-infrastructure
Deploy Azure infrastructure using Terraform with PCAM vaulted access and native Azure authentication through Dojo360 Azure Infrastructure workflow
Owner: pcorazao
github-workflows-dojo360-container-cd
Deploy containerized applications to AWS ECS/Azure ACS using Dojo360 Container CD workflow with blue-green and rolling update strategies
Owner: pcorazao
github-workflows-dojo360-container-promotion
Multi-environment container deployment promotion through prescribed deployment paths with automated approval gates and E2E testing
Owner: pcorazao
github-workflows-dojo360-database
Automate database schema updates using Liquibase via the Dojo360 database workflow (with rollback and validation patterns)
Owner: pcorazao
github-workflows-dojo360-database-promotion
Promote Liquibase database changes across environments (dev→qa→cert→prod) with deployment-path validation and approval gates
Owner: pcorazao
github-workflows-dojo360-dockerfile-ci
Build and scan container images from a Dockerfile using Optum golden images and the recommended UHG reusable workflow
Owner: pcorazao

