Skip to main content

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.

This guide walks you through cloning the repository, starting all six services with a single script, accessing every tool’s web UI, deploying a sample Java web application to WildFly, and creating your first Jenkins pipeline job. By the end you will have a fully operational CI/CD stack — Jenkins detecting code changes, SonarQube enforcing quality gates, Nexus storing versioned artifacts, and WildFly running your application.
1
Clone the Repository
2
Clone the project and enter its directory:
3
git clone <repository-url>
cd CICD
4
All subsequent commands are run from the CICD root directory. The directory contains docker-compose.yml, setup.sh, a sample Jenkinsfile, build-config.yml, and the jenkins/init.groovy.d/ auto-configuration scripts.
5
Run the Setup Script
6
Execute the setup script to bring the entire stack online:
7
./setup.sh
8
The script performs the following steps in order:
9
  • Stops existing containers — runs docker compose down -v to remove any prior state
  • Starts all six services — pulls images and starts Jenkins, PostgreSQL, SonarQube, Nexus, WildFly, and JBoss in detached mode
  • Waits for readiness — polls each service’s HTTP endpoint in a loop (5-second intervals) until it responds
  • Configures app server admin users — runs add-user.sh admin admin --silent inside both the wildfly and jboss containers
  • Allows full initialization — waits an additional 30 seconds for all background initialization to complete
  • 10
    The first run downloads all Docker images and may take several minutes depending on your internet connection. Subsequent runs are significantly faster because images are cached locally.
    11
    Access the Services
    12
    Once setup.sh completes, every service is available on localhost:
    13
    ServiceURLUsernamePasswordJenkinshttp://localhost:8080adminadminSonarQubehttp://localhost:9000adminadminNexushttp://localhost:8081admin(generated — see below)WildFly (HTTP)http://localhost:8090adminadminWildFly (Admin)http://localhost:9990adminadminJBoss (HTTP)http://localhost:8070adminadminJBoss (Admin)http://localhost:9970adminadmin
    14
    Retrieving the Nexus admin password
    15
    Nexus generates a random password on first startup and writes it to a file inside its container. Retrieve it with:
    16
    docker exec nexus cat /nexus-data/admin.password
    
    17
    The default credentials (admin/admin) are intentional for local development only. Change all credentials before exposing any service to a network.
    18
    Deploy the Sample Application
    19
    The repository includes a sample Jakarta EE web application under examples/webapp-sample/. Build it with Maven and copy the resulting WAR directly into WildFly’s hot-deployment directory:
    20
    cd examples/webapp-sample
    mvn clean package
    docker cp target/*.war wildfly:/opt/jboss/wildfly/standalone/deployments/
    
    21
    WildFly monitors the standalone/deployments/ directory and deploys the WAR automatically. Check the WildFly admin console at http://localhost:9990 to confirm the deployment status, or tail the container log:
    22
    docker compose logs -f wildfly
    
    23
    Create a Jenkins Pipeline Job
    24
    Connect Jenkins to your source repository and trigger your first automated build:
    25
  • Open Jenkins at http://localhost:8080 and log in as admin / admin
  • Click New Item in the left sidebar
  • Enter a name (e.g., my-java-pipeline) and select Pipeline, then click OK
  • Scroll to the Pipeline section
  • Set Definition to Pipeline script from SCM
  • Set SCM to Git and enter your repository URL
  • Set Script Path to Jenkinsfile
  • Click Save
  • Click Build Now in the left sidebar
  • 26
    Jenkins will checkout your code, run mvn clean install, execute tests, submit a SonarQube analysis, wait for the quality gate, and deploy artifacts to Nexus — all driven by the pipeline stages defined in your Jenkinsfile.
    27
    View Build Results
    28
    After the build completes, inspect the results across all three tools:
    29
    Jenkins — Build logs and pipeline stage view:
    30
    http://localhost:8080/job/<your-pipeline-name>/
    
    31
    SonarQube — Code quality dashboard with issue breakdown, security hotspots, and coverage:
    32
    http://localhost:9000/projects
    
    33
    Nexus — Deployed Maven artifacts under the snapshots repository:
    34
    http://localhost:8081/#browse/browse:maven-snapshots
    

    Troubleshooting

    Check whether Docker has enough resources to run all six containers:
    docker stats
    
    Look for containers with very high memory usage or that are being killed. The full stack requires at least 6 GB of available RAM. You can also inspect individual service logs:
    docker compose logs jenkins
    docker compose logs sonarqube
    docker compose logs nexus
    
    If you need to reset everything to a clean state:
    docker compose down -v
    ./setup.sh
    
    Jenkins takes 2–3 minutes to fully boot after the container starts — it must complete plugin loading and run the five Groovy init scripts before the web UI becomes responsive. Wait for the following line to appear in the log before trying the browser:
    docker compose logs -f jenkins
    # Look for: "Jenkins is fully up and running"
    
    If Jenkins never becomes accessible, check that port 8080 is not already bound on your host:
    sudo lsof -i :8080
    
    SonarQube depends on PostgreSQL being fully ready before it can connect. The depends_on directive in docker-compose.yml starts PostgreSQL first, but PostgreSQL itself needs a few seconds to accept connections after the container is running. SonarQube will retry automatically. Wait 2–3 minutes and refresh the browser. You can monitor progress with:
    docker compose logs -f sonarqube
    # Look for: "SonarQube is up"
    
    Nexus Repository Manager is memory-intensive. The docker-compose.yml starts it with -Xms512m -Xmx512m, but Nexus also allocates significant direct memory. Ensure your Docker host has at least 4 GB of RAM available for Nexus alone. Nexus can take 3–5 minutes to become fully responsive on first start while it initializes its internal Orient DB and blob stores. Check the log for startup progress:
    docker compose logs -f nexus
    # Look for: "Started Sonatype Nexus"
    

    Next Steps

    With your environment running and your first pipeline green, explore the rest of the documentation to configure advanced pipeline behaviour:
    • Build Configuration Reference — Learn how to customize build-config.yml to control Java version, Maven version, test execution, SonarQube settings, and Nexus deployment targets.
    • Jenkinsfile Pipeline Guide — Deep-dive into the pipeline stages, multi-environment deployments, ZIP-based builds, and how to add quality gates and notifications.

    Build docs developers (and LLMs) love