Add Jenkinsfile and supporting Dockerfile

This commit is contained in:
Tom Willemse 2020-11-15 20:22:48 -08:00
parent b31528d593
commit c965dd4033
2 changed files with 27 additions and 0 deletions

5
Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM ubuntu:latest
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y build-essential cmake default-jdk-headless

22
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,22 @@
pipeline {
agent {
dockerfile {
filename 'Dockerfile.build'
label 'crafting-interpreters-build'
}
}
stages {
stage('Build') {
steps {
cmakeBuild generator: 'Make',
buildDir: 'build',
sourceDir: 'src',
installation: 'InSearchPath'
archiveArtifacts artifacts: 'Lox.jar',
fingerprint: false,
onlyIfSuccessful: true
}
}
}
}