Console-based Java application to simulate coffee orders, developed to explore and practice DevOps principles — including CI/CD pipelines implemented with Jenkins and optional containerization using Docker.
- Object-oriented design with base class
Coffeeand subclasses:Espresso,Latte,Cappuccino - Console menu for placing orders, viewing current order, and accessing order history
- Receipts saved to
current_order.txt - Order history (last 10 orders) saved to
history.txt(password-protected:1234) - Fully functional unit tests
- Build lifecycle managed with Maven
- Git branching strategy with
feature/,fix/,ci/, anddocs/prefixes, plusdevelopandmainas base branches - Jenkins pipeline configured for continuous delivery: automatic build, test, and package on push to
main - Optional Docker integration for running the application inside a container
mvn compile
mvn exec:javamvn testmvn package- This generates a
.jarfile under target/. Run it with:
java -jar target/coffee-order-simulator-1.0-SNAPSHOT.jarA Jenkins pipeline was configured to automate the following steps:
- Clone the GitHub repository
- Compile the project using Maven
- Run unit tests
- Package the application into a
.jarfile - Optionally build a Docker image (if a
Dockerfileis found)
The pipeline uses Windows batch commands (bat) to support Windows environments.
If you have Docker installed, you can run the application inside a container instead of using Maven. This is optional, and intended as a lightweight and portable way to run the app.
docker build -t coffee-machine-simulator-app .This command creates a local image called
coffee-machine-simulator-appusing the included Dockerfile.
docker run -it coffee-machine-simulator-appThe
-itflag lets you interact with the console menu of the app.
This project follows a Git Flow-like branching strategy with:
main— production-readydevelop— integration- Feature branches:
feature/* - Bug fix branches:
fix/* - Documentation and CI branches:
docs/*,ci/*
Victor Daniel Valencia Rios
This project is intended as a learning exercise and to demonstrate DevOps skills with Java, Maven, Jenkins, and Docker.