Files
smartpark-app/Jenkinsfile
T
smartpark-ci 68613f38df
smartpark-app-ci/pipeline/pr-main This commit looks good
Add simulated parking capacity and Jenkins CI (refs #9)
2026-10-08 11:24:57 -04:00

35 lines
910 B
Groovy

pipeline {
agent any
options {
skipDefaultCheckout()
disableConcurrentBuilds()
timeout(time: 10, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '10'))
}
stages {
stage('Checkout') {
steps {
checkout scm
sh 'git rev-parse HEAD'
}
}
stage('Compile and lint') {
steps {
sh '''
mkdir -p build/classes
javac -Xlint:all -Werror -d build/classes \
src/main/java/edu/stevens/smartpark/ParkingLot.java \
src/test/java/edu/stevens/smartpark/ParkingLotTest.java
'''
}
}
stage('Unit tests') {
steps {
sh 'java -cp build/classes edu.stevens.smartpark.ParkingLotTest'
}
}
}
}