Skip to content

Commit 2ebd2d5

Browse files
authored
Add ability to set HOST_JOB_SELECTION from instance metadata. (#4663)
This allows spinning up instances dedicated to a subset of jobs without creating dedicated docker images. Chrome would like to experiment with spending more compute on a relatively small number of fuzzers.
1 parent e890d3c commit 2ebd2d5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/base/setup_clusterfuzz.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ if [ -z "$DEPLOYMENT_BUCKET" ]; then
1818
export DEPLOYMENT_BUCKET=$(curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/project/attributes/deployment-bucket)
1919
fi
2020

21+
if [ -z "$HOST_JOB_SELECTION" ]; then
22+
# Get list of jobs to focus on from instance metadata, if any.
23+
export HOST_JOB_SELECTION=$(curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/host-job-selection || true)
24+
fi
25+
2126
CLUSTERFUZZ_FILE=clusterfuzz_package.zip
2227
# When $LOCAL_SRC is set, use source zip on mounted volume for local testing.
2328
if [[ -z "$LOCAL_SRC" ]]; then

0 commit comments

Comments
 (0)