2020-07-20 06:30:48 +00:00
[
{
"args" : [
"clone" ,
2021-08-25 18:44:52 +00:00
"https://github.com/google/oss-fuzz.git" ,
"--depth" ,
"1"
2020-07-20 06:30:48 +00:00
] ,
"name" : "gcr.io/cloud-builders/git"
} ,
{
"name" : "gcr.io/cloud-builders/docker" ,
"args" : [
"build" ,
2022-04-04 21:47:21 +00:00
"--tag" ,
2020-07-20 06:30:48 +00:00
"gcr.io/oss-fuzz/test-project" ,
"."
] ,
"dir" : "oss-fuzz/projects/test-project"
} ,
{
"name" : "gcr.io/oss-fuzz/test-project" ,
"args" : [
"bash" ,
"-c" ,
"srcmap > /workspace/srcmap.json && cat /workspace/srcmap.json"
] ,
"env" : [
"OSSFUZZ_REVISION=$REVISION_ID" ,
"FUZZING_LANGUAGE=c++"
2021-08-25 18:44:52 +00:00
] ,
"id" : "srcmap"
2020-07-20 06:30:48 +00:00
} ,
{
2022-08-11 20:34:13 +00:00
"name" : "gcr.io/cloud-builders/docker" ,
2020-07-20 06:30:48 +00:00
"env" : [
2021-08-25 18:44:52 +00:00
"ARCHITECTURE=x86_64" ,
2020-07-20 06:30:48 +00:00
"FUZZING_ENGINE=libfuzzer" ,
2021-08-25 18:44:52 +00:00
"FUZZING_LANGUAGE=c++" ,
"HOME=/root" ,
"OUT=/workspace/out/libfuzzer-coverage-x86_64" ,
"SANITIZER=coverage"
2020-07-20 06:30:48 +00:00
] ,
"args" : [
2022-08-11 20:34:13 +00:00
"run" ,
"--platform" ,
"linux/amd64" ,
"-v" ,
"/workspace:/workspace" ,
"-e" ,
"ARCHITECTURE=x86_64" ,
"-e" ,
"FUZZING_ENGINE=libfuzzer" ,
"-e" ,
"FUZZING_LANGUAGE=c++" ,
"-e" ,
"HOME=/root" ,
"-e" ,
"OUT=/workspace/out/libfuzzer-coverage-x86_64" ,
"-e" ,
"SANITIZER=coverage" ,
"-t" ,
"gcr.io/oss-fuzz/test-project" ,
2020-07-20 06:30:48 +00:00
"bash" ,
"-c" ,
2021-08-25 18:44:52 +00:00
"rm -r /out && cd /src && cd /src && mkdir -p /workspace/out/libfuzzer-coverage-x86_64 && compile || (echo \"********************************************************************************\nFailed to build.\nTo reproduce, run:\npython infra/helper.py build_image test-project\npython infra/helper.py build_fuzzers --sanitizer coverage --engine libfuzzer --architecture x86_64 test-project\n********************************************************************************\" && false)"
] ,
"id" : "compile-libfuzzer-coverage-x86_64"
2020-07-20 06:30:48 +00:00
} ,
{
"url" : "test_download"
} ,
{
"name" : "gcr.io/oss-fuzz-base/base-runner" ,
"env" : [
2021-08-25 18:44:52 +00:00
"ARCHITECTURE=x86_64" ,
2020-07-20 06:30:48 +00:00
"FUZZING_ENGINE=libfuzzer" ,
"FUZZING_LANGUAGE=c++" ,
2021-08-25 18:44:52 +00:00
"HOME=/root" ,
"OUT=/workspace/out/libfuzzer-coverage-x86_64" ,
"SANITIZER=coverage" ,
2020-07-20 06:30:48 +00:00
"HTTP_PORT=" ,
"COVERAGE_EXTRA_ARGS="
] ,
"args" : [
"bash" ,
"-c" ,
"for f in /corpus/*.zip; do unzip -q $f -d ${f%%.*} || (echo \"Failed to unpack the corpus for $(basename ${f%%.*}). This usually means that corpus backup for a particular fuzz target does not exist. If a fuzz target was added in the last 24 hours, please wait one more day. Otherwise, something is wrong with the fuzz target or the infrastructure, and corpus pruning task does not finish successfully.\" && exit 1); done && coverage || (echo \"********************************************************************************\nCode coverage report generation failed.\nTo reproduce, run:\npython infra/helper.py build_image test-project\npython infra/helper.py build_fuzzers --sanitizer coverage test-project\npython infra/helper.py coverage test-project\n********************************************************************************\" && false)"
] ,
"volumes" : [
{
"name" : "corpus" ,
"path" : "/corpus"
}
]
} ,
{
"name" : "gcr.io/cloud-builders/gsutil" ,
"entrypoint" : "sh" ,
"args" : [
"-c" ,
"gsutil -m rm -rf gs://oss-fuzz-coverage/test-project/reports/20200101 || exit 0"
]
} ,
{
"name" : "gcr.io/cloud-builders/gsutil" ,
"args" : [
"-m" ,
"cp" ,
"-r" ,
2021-08-25 18:44:52 +00:00
"/workspace/out/libfuzzer-coverage-x86_64/report" ,
2020-07-20 06:30:48 +00:00
"gs://oss-fuzz-coverage/test-project/reports/20200101"
]
} ,
2022-03-21 03:57:55 +00:00
{
2022-08-11 20:34:13 +00:00
"name" : "gcr.io/cloud-builders/gsutil" ,
"entrypoint" : "sh" ,
2022-03-21 03:57:55 +00:00
"args" : [
"-c" ,
"gsutil -m rm -rf gs://oss-fuzz-coverage/test-project/reports-by-target/20200101 || exit 0"
2022-08-11 20:34:13 +00:00
]
2022-03-21 03:57:55 +00:00
} ,
{
2022-08-11 20:34:13 +00:00
"name" : "gcr.io/cloud-builders/gsutil" ,
2022-03-21 03:57:55 +00:00
"args" : [
"-m" ,
"cp" ,
"-r" ,
"/workspace/out/libfuzzer-coverage-x86_64/report_target" ,
"gs://oss-fuzz-coverage/test-project/reports-by-target/20200101"
2022-08-11 20:34:13 +00:00
]
2022-03-21 03:57:55 +00:00
} ,
2020-07-20 06:30:48 +00:00
{
"name" : "gcr.io/cloud-builders/gsutil" ,
"entrypoint" : "sh" ,
"args" : [
"-c" ,
"gsutil -m rm -rf gs://oss-fuzz-coverage/test-project/fuzzer_stats/20200101 || exit 0"
]
} ,
{
"name" : "gcr.io/cloud-builders/gsutil" ,
"args" : [
"-m" ,
"cp" ,
"-r" ,
2021-08-25 18:44:52 +00:00
"/workspace/out/libfuzzer-coverage-x86_64/fuzzer_stats" ,
2020-07-20 06:30:48 +00:00
"gs://oss-fuzz-coverage/test-project/fuzzer_stats/20200101"
]
} ,
2022-01-31 00:56:22 +00:00
{
"name" : "gcr.io/cloud-builders/gsutil" ,
"entrypoint" : "sh" ,
2022-03-21 03:57:55 +00:00
"args" : [
"-c" ,
"gsutil -m rm -rf gs://oss-fuzz-coverage/test-project/textcov_reports/20200101 || exit 0"
]
2022-01-31 00:56:22 +00:00
} ,
{
"name" : "gcr.io/cloud-builders/gsutil" ,
2022-03-21 03:57:55 +00:00
"args" : [
"-m" ,
"cp" ,
"-r" ,
"/workspace/out/libfuzzer-coverage-x86_64/textcov_reports" ,
"gs://oss-fuzz-coverage/test-project/textcov_reports/20200101"
]
2022-01-31 00:56:22 +00:00
} ,
2020-07-20 06:30:48 +00:00
{
"name" : "gcr.io/cloud-builders/gsutil" ,
"entrypoint" : "sh" ,
"args" : [
"-c" ,
"gsutil -m rm -rf gs://oss-fuzz-coverage/test-project/logs/20200101 || exit 0"
]
} ,
{
"name" : "gcr.io/cloud-builders/gsutil" ,
"args" : [
"-m" ,
"cp" ,
"-r" ,
2021-08-25 18:44:52 +00:00
"/workspace/out/libfuzzer-coverage-x86_64/logs" ,
2020-07-20 06:30:48 +00:00
"gs://oss-fuzz-coverage/test-project/logs/20200101"
]
} ,
{
"name" : "gcr.io/cloud-builders/gsutil" ,
"args" : [
"cp" ,
"/workspace/srcmap.json" ,
"gs://oss-fuzz-coverage/test-project/srcmap/20200101.json"
]
} ,
{
"name" : "gcr.io/cloud-builders/curl" ,
"args" : [
"-H" ,
"Content-Type: application/json" ,
"-X" ,
"PUT" ,
"-d" ,
"{\"fuzzer_stats_dir\": \"gs://oss-fuzz-coverage/test-project/fuzzer_stats/20200101\", \"html_report_url\": \"https://storage.googleapis.com/oss-fuzz-coverage/test-project/reports/20200101/linux/index.html\", \"report_date\": \"20200101\", \"report_summary_path\": \"gs://oss-fuzz-coverage/test-project/reports/20200101/linux/summary.json\"}" ,
"test_url"
]
}
2021-08-25 15:36:05 +00:00
]