Lines Matching +full:base +full:- +full:repo
7 # http://www.apache.org/licenses/LICENSE-2.0
45 """Repo of base-builder images."""
60 return self.digests[index - 1]
62 logging.error('Failed to find suitable base-builder.')
106 """Replace the base-builder digest in a Dockerfile."""
113 line = 'FROM gcr.io/oss-fuzz-base/base-builder@' + digest + '\n'
124 image_name = 'gcr.io/oss-fuzz/' + project_name
130 '-v',
134 '-r',
135 '-p',
180 # pylint: disable=too-many-locals
186 """Builds a OSS-Fuzz fuzzer at a specific commit SHA.
190 build_repo_manager: The OSS-Fuzz project's repo manager to be built at.
200 # Re-copy /src for a clean checkout every time.
213 logging.info('Running post-checkout step `%s` in %s.', post_checkout_step,
216 '-w',
218 '-v',
220 'gcr.io/oss-fuzz/' + build_data.project_name,
222 '-c',
238 # Retry with an OSS-Fuzz builder container that's closer to the project
245 'log', '--before=' + commit_date.isoformat(), '-n1', '--format=%H',
252 'Could not find first OSS-Fuzz commit prior to upstream commit. '
257 ['log', '--reverse', '--format=%H', projects_dir], check_result=True)
265 logging.info('Build failed. Retrying on earlier OSS-Fuzz commit %s.',
272 # Also use the closest base-builder we can find.
278 logging.info('Using base-builder with digest %s.', base_builder_digest)
281 # Rebuild image and re-copy src dir since things in /src could have changed.
293 """Checks a docker image for the main repo of an OSS-Fuzz project.
295 Note: The default is to use the repo name to detect the main repo.
298 project_name: The name of the oss-fuzz project.
299 repo_name: The name of the main repo in an OSS-Fuzz project.
300 commit: A commit SHA that is associated with the main repo.
303 A tuple containing (the repo's origin, the repo's path).
308 'Error: can not detect main repo without a repo_name or a commit.')
312 'Both repo name and commit specific. Using repo name for detection.')
314 # Change to oss-fuzz main directory so helper.py runs correctly.
319 docker_image_name = 'gcr.io/oss-fuzz/' + project_name
321 'docker', 'run', '--rm', '-t', docker_image_name, 'python3',
325 command_to_run.extend(['--repo_name', repo_name])
327 command_to_run.extend(['--example_commit', commit])
329 match = re.search(r'\bDetected repo: ([^ ]+) ([^ ]+)', out.rstrip())
333 logging.error('Failed to detect repo:\n%s', out)
338 """Get base-image digests."""
348 'list-tags',
349 'gcr.io/oss-fuzz-base/base-builder',
350 '--format=json',
351 '--sort-by=timestamp',
356 repo = BaseBuilderRepo()
360 repo.add_digest(timestamp, image['digest'])
362 return repo
371 parser.add_argument('--project_name',
374 parser.add_argument('--commit',
377 parser.add_argument('--engine',
380 parser.add_argument('--sanitizer',
383 parser.add_argument('--architecture', default='x86_64')
390 raise ValueError('Main git repo can not be determined.')