This repository contains everything that is specific to the WebLogic Model in Image deployment:
| Directory | Purpose |
|---|---|
image/ |
Dockerfile that layers the WDT artifacts and model onto the chosen WebLogic base image. |
kubernetes/ |
Domain, cluster, ingress, and namespace manifests. |
model/ |
The WDT model (model.yaml) plus the zipped archive generated from your application EAR. |
scripts/ |
Helper scripts to build the WDT archive and apply the manifests to a cluster. |
The application itself (the EAR/WAR sources) lives elsewhere – for example in the sample-java-application repo. This repo only needs the resulting EAR to build a WebLogic image and deploy it.
-
Build your EAR in the application repo (e.g.
mvn -B packageinsample-java-application). -
Create the WDT archive by pointing
scripts/prepare-wdt-artifacts.shat the EAR:scripts/prepare-wdt-artifacts.sh /absolute/path/to/sample-ear.ear
The script copies the EAR into
model/wdt-archive/wlsdeploy/applications/and producesmodel/archive.zip. -
Build and push the model image:
docker build -t ghcr.io/your-org/sample-domain:MYTAG -f image/Dockerfile . docker push ghcr.io/your-org/sample-domain:MYTAG -
Deploy using
scripts/deploy-domain.sh. The script expects the usual WebLogic and registry credentials plus a kubeconfig (provided viaKUBECONFIG_BASE64orKUBECONFIG_PATH):export IMAGE=ghcr.io/your-org/sample-domain:MYTAG export IMAGE_PULL_SECRET_NAME=sample-domain-registry export IMAGE_PULL_SECRET_SERVER=ghcr.io export IMAGE_PULL_SECRET_USERNAME=gh-user export IMAGE_PULL_SECRET_PASSWORD=***** export WEBLOGIC_USERNAME=weblogic export WEBLOGIC_PASSWORD=***** export RUNTIME_ENCRYPTION_PASSWORD=***** export KUBECONFIG_PATH=/path/to/kubeconfig scripts/deploy-domain.sh
.github/workflows/deploy-weblogic.yml reproduces the manual steps on a runner:
- Runs
scripts/prepare-wdt-artifacts.shusing theEAR_PATHsecret (must point to the EAR file on the runner). - Builds the Docker image and pushes it to the configured registry.
- Applies the Kubernetes manifests via
scripts/deploy-domain.sh.
Required secrets mirror the script environment variables:
EAR_PATH– absolute path to the EAR on the runner (typically a shared workspace with the application build).BASE_IMAGE,WDT_VERSION(optional overrides).REGISTRY_URL,REGISTRY_USERNAME,REGISTRY_PASSWORD.IMAGE_PULL_SECRET_NAME(optional override),OCR_*(optional),WEBLOGIC_*,RUNTIME_ENCRYPTION_PASSWORD.KUBECONFIG_BASE64orKUBECONFIG_PATH.
Trigger the workflow either on push/PR (self-hosted runner) or manually via workflow_dispatch to build and deploy a new model image whenever a fresh EAR is available.