Skip to content

Commit

Permalink
Build agent image in cloud build (#724)
Browse files Browse the repository at this point in the history
Previously, cloud build pulls an agent image that I manually uploaded to
artifact registry.
However, this will fail when we update dependencies (e.g., upgrade
python packages) in PRs.

This PR builds the image with the PR source code so that its agent image
is always up-to-date.
  • Loading branch information
DonggeLiu authored Nov 23, 2024
1 parent d28b9d1 commit c57af13
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion common/cloud_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,16 @@ def _request_cloud_build(self, ofg_repo_url: str, agent_dill_url: str,
'dir': '/workspace',
'args': ['clone', '--depth=1', OF_REPO, 'ofg/oss-fuzz']
},
# Step 3: Run the Python script with the dill files
# Step 3: Run the Python script with the dill files.
{
'name': 'gcr.io/cloud-builders/docker',
'args': [
'build', '.', '-t',
('us-central1-docker.pkg.dev/oss-fuzz/oss-fuzz-gen/'
'agent-image'), '-f', 'Dockerfile.cloudbuild-agent'
],
'dir': '/workspace/ofg/',
},
{
'id':
'agent-step',
Expand Down

0 comments on commit c57af13

Please sign in to comment.