From 93998a308130811ce9d592907db5f2e944c74208 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 27 Sep 2023 22:11:06 +0200 Subject: [PATCH 1/2] doc: use case for CFL_EXTRA env variables --- docs/build_integration.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/build_integration.md b/docs/build_integration.md index d95fb59..2257a27 100644 --- a/docs/build_integration.md +++ b/docs/build_integration.md @@ -194,6 +194,11 @@ See the [Provided Environment Variables](https://github.com/google/oss-fuzz/blob page in OSS-Fuzz's `base-builder` image documentation for more details on environment variables that are available to `build.sh`. +If some environment variables needs to be passed from your CI to the build, +(such as `GOPROXY` for instance), any environment prefixed by `CFL_EXTRA_` can be used. +The first step is `export CFL_EXTRA_MYENV=$MYENV` in the CI script. +The second step is `export MYENV=$CFL_EXTRA_MYENV` in build.sh + ## Fuzzer execution environment You should not make any assumptions on the availability of dependent packages From e2f5699593865cc95de5ca50ea1be65857123614 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 27 Sep 2023 22:13:25 +0200 Subject: [PATCH 2/2] gitlab: fix the container id as for all other cases --- docs/running-clusterfuzzlite/gitlab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/running-clusterfuzzlite/gitlab.md b/docs/running-clusterfuzzlite/gitlab.md index 7cc8c26..b804070 100644 --- a/docs/running-clusterfuzzlite/gitlab.md +++ b/docs/running-clusterfuzzlite/gitlab.md @@ -189,7 +189,7 @@ clusterfuzzlite-coverage: rules: - if: $MODE == "coverage" before_script: - - export CFL_CONTAINER_ID=`cut -c9- < /proc/1/cpuset` + - export CFL_CONTAINER_ID=`docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=$CI_JOB_ID" -f "label=com.gitlab.gitlab-runner.type=build"` script: - python3 "/opt/oss-fuzz/infra/cifuzz/cifuzz_combined_entrypoint.py" artifacts: