diff --git a/boringssl/Jenkinsfile b/boringssl/Jenkinsfile index bb7325bf193c..8701c0483ee8 100644 --- a/boringssl/Jenkinsfile +++ b/boringssl/Jenkinsfile @@ -20,7 +20,6 @@ def libfuzzerPipeline = fileLoader.fromGit( libfuzzerPipeline { git = "https://boringssl.googlesource.com/boringssl" - dockerfile = "oss-fuzz/boringssl/Dockerfile" } diff --git a/docs/new_library.md b/docs/new_library.md index fe81c793bbfe..f8cc75d7953b 100644 --- a/docs/new_library.md +++ b/docs/new_library.md @@ -29,7 +29,6 @@ def libfuzzerBuild = fileLoader.fromGit('infra/libfuzzer-pipeline.groovy', libfuzzerBuild { git = "git://git.code.sf.net/p/expat/code_git" - dockerfile = "oss-fuzz/expat/Dockerfile" } ``` diff --git a/expat/Jenkinsfile b/expat/Jenkinsfile index 8f2908a5e062..32afa56ec3e3 100644 --- a/expat/Jenkinsfile +++ b/expat/Jenkinsfile @@ -19,5 +19,4 @@ def libfuzzerBuild = fileLoader.fromGit('infra/libfuzzer-pipeline.groovy', libfuzzerBuild { git = "git://git.code.sf.net/p/expat/code_git" - dockerfile = "oss-fuzz/expat/Dockerfile" } diff --git a/freetype2/Jenkinsfile b/freetype2/Jenkinsfile index e26395c59b0e..9267970be1d1 100644 --- a/freetype2/Jenkinsfile +++ b/freetype2/Jenkinsfile @@ -20,6 +20,5 @@ def libfuzzerBuild = fileLoader.fromGit( libfuzzerBuild { git = "git://git.sv.nongnu.org/freetype/freetype2.git" - dockerfile = "oss-fuzz/freetype2/Dockerfile" } diff --git a/infra/libfuzzer-pipeline.groovy b/infra/libfuzzer-pipeline.groovy index 5faba5ae1866..daaf2016020a 100644 --- a/infra/libfuzzer-pipeline.groovy +++ b/infra/libfuzzer-pipeline.groovy @@ -22,13 +22,12 @@ def call(body) { body() // Mandatory configuration - def dockerfile = config["dockerfile"] - assert dockerfile : "dockerfile should be specified" def gitUrl = config["git"] assert gitUrl : "git should be specified" // Optional configuration def projectName = config["name"] ?: env.JOB_BASE_NAME + def dockerfile = config["dockerfile"] ?: "oss-fuzz/$projectName/Dockerfile" def sanitizers = config["sanitizers"] ?: ["address"] def checkoutDir = config["checkoutDir"] ?: projectName def dockerContextDir = config["dockerContextDir"] @@ -38,7 +37,7 @@ def call(body) { def ossFuzzUrl = 'https://github.com/google/oss-fuzz.git' node { - echo "Building project $projectName with Dockerfile=$dockerfile" + echo "Building project $projectName" def wsPwd = pwd() @@ -74,10 +73,14 @@ def call(body) { // Build docker image sh "docker build -t $dockerTag -f $dockerfile $dockerContextDir" - // Run image to produce fuzzers" + // Run image to produce fuzzers sh "rm -rf $out" sh "mkdir -p $out" sh "docker run -v $workspace/$checkoutDir:/src/$checkoutDir -v $workspace/oss-fuzz:/src/oss-fuzz -v $out:/out -e SANITIZER_FLAGS=\"-fsanitize=$sanitizer\" -t $dockerTag" +" + // Copy dict and options files + sh "cp $workspace/oss-fuzz/$projectName/*.dict $out/ || true" + sh "cp $workspace/oss-fuzz/$projectName/*.options $out/ || true" } }