[infra] updated folder mounting

This commit is contained in:
Mike Aizatsky 2016-07-26 14:03:25 -07:00
parent d3df019019
commit 95ed5036bb
1 changed files with 7 additions and 12 deletions

View File

@ -31,7 +31,6 @@ def call(body) {
def projectName = config["name"] ?: env.JOB_BASE_NAME
def sanitizers = config["sanitizers"] ?: ["address", "memory"]
def checkoutDir = config["checkoutDir"] ?: projectName
def needsOssFuzz = config["needsOssFuzz"] ?: false
def date = java.time.format.DateTimeFormatter.ofPattern("yyyyMMddHHmm").format(java.time.LocalDateTime.now())
@ -51,7 +50,6 @@ def call(body) {
def workspace = "$pwd/$sanitizer"
def out = "$pwd/out/$sanitizer"
if (needsOssFuzz) {
dir('oss-fuzz') {
git url: 'https://github.com/google/oss-fuzz.git'
}
@ -59,9 +57,6 @@ def call(body) {
dir(checkoutDir) {
git url: gitUrl
}
} else {
git url: gitUrl
}
sh "docker build -t $dockerTag -f $dockerfile ."
@ -69,7 +64,7 @@ def call(body) {
def zipFile= "$projectName-$sanitizer-${date}.zip"
sh "mkdir -p $out"
sh "docker run -v $workspace:/workspace -v $out:/out -e sanitizer_flags=\"-fsanitize=$sanitizer\" -t $dockerTag"
sh "docker run -v $workspace/$checkoutDir:/workspace -v $workspace/oss-fuzz:/src/oss-fuzz -v $out:/out -e sanitizer_flags=\"-fsanitize=$sanitizer\" -t $dockerTag"
sh "zip -j $zipFile $out/*"
sh "gsutil cp $zipFile gs://clusterfuzz-builds/$projectName/"
}