From 199986a3c7ff18bba46753605eb0ee9fe2f52dce Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Mon, 10 Oct 2016 13:36:13 -0700 Subject: [PATCH] [infra] deprecations cleanup --- infra/libfuzzer-pipeline.groovy | 57 +++++++++++++++++---------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/infra/libfuzzer-pipeline.groovy b/infra/libfuzzer-pipeline.groovy index 09489c336..d9d7ebb60 100644 --- a/infra/libfuzzer-pipeline.groovy +++ b/infra/libfuzzer-pipeline.groovy @@ -85,41 +85,44 @@ def call(body) { // Run each of resulting fuzzers. dir ('out') { - stage name: "running fuzzers" - sh "ls -alR" - for (int i = 0; i < sanitizers.size(); i++) { - def sanitizer = sanitizers[i] - dir (sanitizer) { - def d = pwd() - def files = findFiles() - for (int j = 0; j < files.size(); j++) { - def file = files[j] - if (file.directory) { continue } - if (!new File(d, file.name).canExecute()) { - echo "skipping: $file" - continue + stage("running fuzzers") { + sh "ls -alR" + for (int i = 0; i < sanitizers.size(); i++) { + def sanitizer = sanitizers[i] + dir (sanitizer) { + def d = pwd() + def files = findFiles() + for (int j = 0; j < files.size(); j++) { + def file = files[j] + if (file.directory) { continue } + if (!new File(d, file.name).canExecute()) { + echo "skipping: $file" + continue + } + sh "docker run -v $d:/out -t ossfuzz/libfuzzer-runner /out/$file -runs=1" } - sh "docker run -v $d:/out -t ossfuzz/libfuzzer-runner /out/$file -runs=1" } } } - stage name: "uploading" - for (int i = 0; i < sanitizers.size(); i++) { - def sanitizer = sanitizers[i] - dir (sanitizer) { - def zipFile = "$projectName-$sanitizer-${date}.zip" - def revFile = "$projectName-$sanitizer-${date}.rev" - sh "cp $revisionsFile $revFile" - sh "zip -j $zipFile *" - sh "gsutil cp $zipFile gs://clusterfuzz-builds/$projectName/" - sh "gsutil cp $revFile gs://clusterfuzz-builds/$projectName/" + stage("uploading") { + for (int i = 0; i < sanitizers.size(); i++) { + def sanitizer = sanitizers[i] + dir (sanitizer) { + def zipFile = "$projectName-$sanitizer-${date}.zip" + def revFile = "$projectName-$sanitizer-${date}.rev" + sh "cp $revisionsFile $revFile" + sh "zip -j $zipFile *" + sh "gsutil cp $zipFile gs://clusterfuzz-builds/$projectName/" + sh "gsutil cp $revFile gs://clusterfuzz-builds/$projectName/" + } } } - stage name: "pushing image" - docker.withRegistry('', 'docker-login') { - docker.image(dockerTag).push() + stage("pushing image") { + docker.withRegistry('', 'docker-login') { + docker.image(dockerTag).push() + } } } }