{"id":15083677,"url":"https://github.com/divyanshu-arya/java-maven-jenkins-ci-cd","last_synced_at":"2026-01-26T17:35:40.830Z","repository":{"id":210182818,"uuid":"725782554","full_name":"divyanshu-arya/java-maven-jenkins-ci-cd","owner":"divyanshu-arya","description":"This project demonstrates a Continuous Integration/Continuous Deployment (CI/CD) pipeline for a Java-based web application hosted on an Apache Tomcat server, built using Maven, and managed by Jenkins. The project also includes a MySQL database that runs in a Docker container, managed via Docker Compose.","archived":false,"fork":false,"pushed_at":"2024-08-16T10:05:23.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T02:09:04.064Z","etag":null,"topics":["docker","docker-compose","java","jenkins-pipeline","maven"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divyanshu-arya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-30T21:34:16.000Z","updated_at":"2024-08-16T10:09:04.000Z","dependencies_parsed_at":"2023-12-01T08:38:22.878Z","dependency_job_id":"1a24f372-79e1-45f8-9776-2b6ce16ec628","html_url":"https://github.com/divyanshu-arya/java-maven-jenkins-ci-cd","commit_stats":null,"previous_names":["divyanshu-arya/priya-project","divyanshu-arya/java-maven-jenkins-ci-cd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/divyanshu-arya/java-maven-jenkins-ci-cd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyanshu-arya%2Fjava-maven-jenkins-ci-cd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyanshu-arya%2Fjava-maven-jenkins-ci-cd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyanshu-arya%2Fjava-maven-jenkins-ci-cd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyanshu-arya%2Fjava-maven-jenkins-ci-cd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divyanshu-arya","download_url":"https://codeload.github.com/divyanshu-arya/java-maven-jenkins-ci-cd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyanshu-arya%2Fjava-maven-jenkins-ci-cd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28783028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","java","jenkins-pipeline","maven"],"created_at":"2024-09-25T06:30:54.519Z","updated_at":"2026-01-26T17:35:40.813Z","avatar_url":"https://github.com/divyanshu-arya.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins Maven Tomcat CI/CD Pipeline\n\nThis project demonstrates a Continuous Integration/Continuous Deployment (CI/CD) pipeline for a Java-based web application hosted on an Apache Tomcat server, built using Maven, and managed by Jenkins. The project also includes a MySQL database that runs in a Docker container, managed via Docker Compose.\n\n## Table of Contents\n- [Overview](#overview)\n- [Architecture](#architecture)\n- [Prerequisites](#prerequisites)\n- [Setup](#setup)\n- [Jenkins Pipeline](#jenkins-pipeline)\n- [Running the Application](#running-the-application)\n- [Working of the application](#working-of-the-application)\n\n## Overview\n\nThe main components of this project include:\n- **Java Application**: A sample Java web application.\n- **Apache Tomcat**: The application server where the Java application is deployed.\n- **Maven**: Used for building the Java application.\n- **Jenkins**: Manages the CI/CD pipeline.\n- **MySQL**: A relational database, running in a Docker container.\n- **Docker Compose**: Orchestrates the MySQL container.\n\n## Architecture\n\n![Architecture Diagram](architecture-diagram.png)\n\n1. **Build**: Maven is used to build the Java application.\n2. **Deploy**: The application is deployed to the Tomcat server.\n3. **Database**: MySQL runs as a Docker container, with all necessary configurations handled by Docker Compose.\n4. **CI/CD**: Jenkins manages the build, test, and deployment processes.\n\n## Prerequisites\n\nEnsure that you have the following installed on your local machine:\n- **JDK** (Java Development Kit) 8 or higher\n- **Maven** 3.6.0 or higher\n- **Docker** 20.10.0 or higher\n- **Docker Compose** 1.27.0 or higher\n- **Jenkins** 2.235.1 or higher\n- **Git**\n\n## Jenkins Pipeline\n\nThe Jenkins pipeline defined in the Jenkinsfile consists of the following stages:\n\n**Application Deployment:**\n\n- Agent: The application labeled agent is used for this stage.\n- Steps:\n  1. Removes any existing files in the workspace.\n  2. Clones the latest code from the GitHub repository: java-maven-jenkins-ci-cd.\n  3. Builds a Docker image named tomcat from the Dockerfile in the repository.\n  4. Runs a Docker container named tomcat-server from the tomcat image, exposing port 8080.\n  5. Copies the Mumbai.pem key file to the current workspace.\n  6. Uses scp to securely copy the init-scripts directory and docker-compose.yml file to a remote server at 10.0.140.175 using the Mumbai.pem SSH key.\n\n**Database Deployment:**\n\n- Agent: The database labeled agent is used for this stage.\n- Steps:\n  1. Navigates to the /home/ubuntu/ directory on the remote server.\n  2. Uses Docker Compose to build and start the services defined in the docker-compose.yml file, including the MySQL database.\n\n## Running the Application\n\nAfter deploying, access the application by navigating to: http://localhost:8080/\n\n## Working of the application\nThis project will start two containers - web_1 and database_1\n1. web_1: This is the container which runs applicaiton frontend and backend.\n2. database_1: This is the container which maintains applicaiton database.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivyanshu-arya%2Fjava-maven-jenkins-ci-cd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivyanshu-arya%2Fjava-maven-jenkins-ci-cd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivyanshu-arya%2Fjava-maven-jenkins-ci-cd/lists"}