The CI/CD stack supports four deployment workflows suited to different team setups and project requirements. Choose Git-based for standard CI/CD automation, ZIP-based for applications without direct Git access, manual for rapid local testing, or parameterized for environment-specific deployments that give you full control over where and how your application is deployed.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/infra-neo/CICD/llms.txt
Use this file to discover all available pages before exploring further.
Workflow 1: Standard Git-Based Deployment
The standard Git-based workflow is the recommended path for teams with a shared repository. Jenkins detects commits automatically and runs the full pipeline — from security scanning through to application server deployment — without any manual intervention.Jenkins detects the change
Jenkins picks up the commit via a webhook trigger or SCM polling, and starts a new pipeline build automatically.
Pipeline executes all stages
The pipeline runs the following stages in order:
- Read
build-config.yml— loads Java version, Maven version, build tool, and appserver target - Checkout — clones the latest source from SCM
- Security scan — scans
src/for hardcoded passwords, API keys, and tokens; fails the build if any are found - Build — runs
mvn clean installwith the environment flag and the generatedAPP_VERSION - Test — runs
mvn testand publishes JUnit results - SonarQube analysis — uploads code quality metrics with
sonar:sonar - Quality Gate — waits up to 5 minutes for SonarQube to pass the gate; aborts the pipeline if it fails
- Deploy to Nexus — uploads the WAR artifact to
maven-snapshotsrepository - Deploy to WildFly/JBoss — copies the WAR to the target application server’s deployments directory
Workflow 2: ZIP-Based Deployment
Use the ZIP-based workflow for applications that live outside of Git — legacy codebases, third-party deliverables, or air-gapped environments. Theupload-source.sh script handles everything from extraction to deployment.
Upload and build with the script
Run Full usage:
upload-source.sh with the ZIP file, target environment, and application server:| Argument | Required | Description |
|---|---|---|
path-to-zip | Yes | Path to the ZIP file containing source code |
environment | No | Target environment: dev, staging, or prod (default: dev) |
target-server | No | Application server: wildfly or jboss (default: wildfly) |
What the script does internally
Once invoked,
upload-source.sh performs the following steps in order:- Validates arguments — checks that the ZIP file exists and that the environment and target server values are valid
- Extracts the ZIP — creates a temp directory via
mktemp -dand unpacks the archive into it viaunzip - Locates
pom.xml— searches for the project root usingfind - Loads environment properties — reads
config/environments/<env>/application.propertiesand exports values as environment variables - Creates a local Maven repository — creates
.m2/repository-<env>inside the project directory for environment-isolated dependency caching - Scans for hardcoded passwords — greps
src/for literal password assignments; exits with an error if any are found - Builds with Maven — runs
mvn clean installwith the environment flag and a generated build version - Runs tests — executes
mvn test; stops if tests fail - Deploys the WAR — copies the built WAR file to the running container via
docker cp - Cleans up — removes the temp directory created in step 2
Workflow 3: Manual Maven Build
For local testing or one-off deployments, you can build and deploy without Jenkins. This is the fastest way to verify a change on a running application server.Workflow 4: Jenkins Pipeline with Parameters
The parameterized pipeline gives you full control at build time — choose the environment, target server, and whether to skip tests or SonarQube analysis. This is the standard workflow for deployment to staging and production.Create a parameterized pipeline job
In Jenkins, create a new Pipeline job. Under General, check This project is parameterized.
Configure pipeline parameters
Add the following parameters to match what
Jenkinsfile.enhanced declares:| Parameter | Type | Options / Default | Description |
|---|---|---|---|
ENVIRONMENT | Choice | dev, staging, prod | Target deployment environment |
TARGET_SERVER | Choice | wildfly, jboss | Target application server |
SKIP_TESTS | Boolean | false | Skip running Maven tests |
SKIP_SONAR | Boolean | false | Skip SonarQube analysis and Quality Gate |
FROM_ZIP | Boolean | false | Build from an uploaded ZIP file instead of SCM |
Point the job to Jenkinsfile.enhanced
Under Pipeline → Definition, select Pipeline script from SCM. Set the Script Path to
Jenkinsfile.enhanced (or copy it to Jenkinsfile at the repository root).Environment-Specific Properties
The enhanced pipeline automatically loads configuration from theconfig/environments/ directory based on the ENVIRONMENT parameter. This lets each environment carry its own database URLs, API endpoints, log levels, and other settings without changing any source code.
At the Load Environment Properties stage, the pipeline reads:
dev/application.properties looks like:
For the full enhanced pipeline configuration, including all stage definitions and post-build steps, see Jenkinsfile Enhanced.
