Add simulated parking capacity and Jenkins CI (refs #9)
smartpark-app-ci/pipeline/pr-main This commit looks good
smartpark-app-ci/pipeline/pr-main This commit looks good
This commit is contained in:
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user