From eb4f4d58c58363c09342009077f4ddcfad90507d Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Mon, 1 Aug 2016 14:21:46 -0700 Subject: [PATCH] [infra] changing docker context dir --- infra/libfuzzer-pipeline.groovy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/infra/libfuzzer-pipeline.groovy b/infra/libfuzzer-pipeline.groovy index e5c0deafc..19f53103e 100644 --- a/infra/libfuzzer-pipeline.groovy +++ b/infra/libfuzzer-pipeline.groovy @@ -31,6 +31,7 @@ def call(body) { def projectName = config["name"] ?: env.JOB_BASE_NAME def sanitizers = config["sanitizers"] ?: ["address", "memory"] def checkoutDir = config["checkoutDir"] ?: projectName + def dockerContextDir = config["dockerContextDir"] def date = java.time.format.DateTimeFormatter.ofPattern("yyyyMMddHHmm").format(java.time.LocalDateTime.now()) @@ -58,7 +59,11 @@ def call(body) { git url: gitUrl } - sh "docker build -t $dockerTag -f $dockerfile ." + if (dockerContextDir == null) { + dockerContextDir = new File($dockerfile).getAbsoluteFile().getParent().getName(); + } + + sh "docker build -t $dockerTag -f $dockerfile $dockerContextDir" sh "rm -rf $out" def zipFile= "$projectName-$sanitizer-${date}.zip"