Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra] some changes #1

Merged
merged 3 commits into from
Aug 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion boringssl/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def libfuzzerPipeline = fileLoader.fromGit(

libfuzzerPipeline {
git = "https://boringssl.googlesource.com/boringssl"
dockerfile = "oss-fuzz/boringssl/Dockerfile"
}


1 change: 0 additions & 1 deletion docs/new_library.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```

Expand Down
1 change: 0 additions & 1 deletion expat/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
1 change: 0 additions & 1 deletion freetype2/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ def libfuzzerBuild = fileLoader.fromGit(

libfuzzerBuild {
git = "git://git.sv.nongnu.org/freetype/freetype2.git"
dockerfile = "oss-fuzz/freetype2/Dockerfile"
}

11 changes: 7 additions & 4 deletions infra/libfuzzer-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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()

Expand Down Expand Up @@ -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"
}
}

Expand Down