Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmetzman committed Dec 11, 2024
1 parent dba879a commit 7237995
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions infra/build/functions/build_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,11 @@ def get_project_image_steps( # pylint: disable=too-many-arguments
steps.extend(get_pull_test_images_steps(config.test_image_suffix))
src_root = 'oss-fuzz' if not experiment else '.'

docker_build_step = get_docker_build_step([image],
os.path.join('projects', name),
src_root=src_root,
cache_image=cache_image)
docker_build_step = get_docker_build_step(
[image, get_unsafe_name(name)],
os.path.join('projects', name),
src_root=src_root,
cache_image=cache_image)
steps.append(docker_build_step)
if srcmap:
srcmap_step_id = get_srcmap_step_id()
Expand All @@ -476,7 +477,7 @@ def get_project_image_steps( # pylint: disable=too-many-arguments
],
'env': [
'OSSFUZZ_REVISION=$REVISION_ID',
'FUZZING_LANGUAGE=%s' % language,
f'FUZZING_LANGUAGE={language}',
],
'id': srcmap_step_id
}])
Expand All @@ -497,26 +498,30 @@ def get_project_image_steps( # pylint: disable=too-many-arguments
'args': ['buildx', 'use', builder_name]
},
])
docker_build_arm_step = get_docker_build_step([image],
os.path.join(
'projects', name),
architecture=_ARM64)
docker_build_arm_step = get_docker_build_step(
[image, get_unsafe_name(name)],
os.path.join('projects', name),
architecture=_ARM64)
steps.append(docker_build_arm_step)

if language in ('c', 'c++'):
# Push so that historical bugs are reproducible.
push_step = {
'name': 'gcr.io/cloud-builders/docker',
'args': ['push', f'us-central1-docker.pkg.dev/oss-fuzz/archive/{name}'],
'id': 'push-image',
'waitFor': [docker_build_step['id']],
'allowFailure': True
'name': 'gcr.io/cloud-builders/docker',
'args': ['push', _get_unsafe_name(name)],
'id': 'push-image',
'waitFor': [docker_build_step['id']],
'allowFailure': True
}
steps.append(push_step)

return steps


def get_unsafe_name(name):
return f'us-central1-docker.pkg.dev/oss-fuzz/unsafe/{name}'


def get_logs_url(build_id):
"""Returns url that displays the build logs."""
return (
Expand Down

0 comments on commit 7237995

Please sign in to comment.