Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

FestPass CI

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

About the project

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.

What I did

  • Configured the Jenkins pipeline job from SCM (git://127.0.0.1:9418/festpass-java, branch */main, script path Jenkinsfile, agent student-laptop).
  • Added triggers { pollSCM('* * * * *') } to the Jenkinsfile so Jenkins builds automatically on each new commit.
  • Entered my issued class and challenge codes in submission.properties.
  • Personalized the help output 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.

Project layout

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

Pipeline stages

  1. Checkout: checks out the commit, prints Git and Java versions
  2. Submission setup: reads submission.properties, prepares evidence
  3. Test: runs the 28 tests and publishes the JUnit report
  4. Build JAR: packages build/festpass.jar
  5. Smoke test JAR: runs the JAR and checks its output
  6. 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.

Build and run locally

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.

Evidence

See submission/EVIDENCE.md.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages