A Jenkins CI pipeline for FestPass, a small command-line campus event registration app written in Java.
| Author | ParthMehta2004 |
| Class code | 001 |
| Challenge code | 00070 |
| Job | festpass-ci on agent student-laptop |
FestPass lets you create events with a seat capacity, book and cancel seats for students, and view rosters and summaries. Data is stored in a plain tab-separated file. The focus of this work is the pipeline: a Jenkins job that checks out the code, runs the 28 unit tests, builds a JAR, smoke-tests it, archives the artifacts, and records build evidence for every run.
- Configured the Jenkins pipeline job from SCM (
git://127.0.0.1:9418/festpass-java, branch*/main, script pathJenkinsfile, agentstudent-laptop). - Added
triggers { pollSCM('* * * * *') }to theJenkinsfileso Jenkins builds automatically on each new commit. - Entered my issued class and challenge codes in
submission.properties. - Personalized the
helpoutput with my alias. - Diagnosed the failing tests and fixed the cancellation bug in
BookingService.java:cancel()checked that a booking existed but never removed it, so the seat stayed taken.
Jenkinsfile Pipeline definition
submission.properties Class code and challenge code
src/main/java/ App: FestPass (CLI), BookingService, BookingStore
src/test/java/ 28 supplied unit tests (unchanged)
ci/ Build, smoke test and build evidence helpers (unchanged)
submission/ Red/green evidence CSVs, final JAR, EVIDENCE.md
ASSIGNMENT.md Assignment brief
- Checkout: checks out the commit, prints Git and Java versions
- Submission setup: reads
submission.properties, prepares evidence - Test: runs the 28 tests and publishes the JUnit report
- Build JAR: packages
build/festpass.jar - Smoke test JAR: runs the JAR and checks its output
- Save artifact: archives the JAR, build info and smoke test output
A failed Test stage skips the later stages, so a red build publishes no JAR. The evidence CSV is always archived, even on failure.
Requires JDK 21.
java ci/Build.java verify
java ci/SmokeTest.java
java -jar build/festpass.jar help
| Command | Description |
|---|---|
add-event ID "TITLE" CAPACITY |
Create an event |
list |
List events with booked/capacity |
book EVENT_ID STUDENT_ID |
Book a seat |
cancel EVENT_ID STUDENT_ID |
Cancel a booking |
roster EVENT_ID |
Show students booked on an event |
summary |
Totals across all events |
Exit codes: 0 success, 2 invalid request, 3 storage failure.