From c965dd4033ab5b4e698f508eeda044d19ea40047 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 15 Nov 2020 20:22:48 -0800 Subject: [PATCH] Add Jenkinsfile and supporting Dockerfile --- Dockerfile | 5 +++++ Jenkinsfile | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile create mode 100644 Jenkinsfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6b17df3 --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..21d4f11 --- /dev/null +++ b/Jenkinsfile @@ -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 + } + } + } +}