[infra] Work around Container Builder breakage.

This commit is contained in:
Oliver Chang 2017-04-12 22:39:55 -07:00
parent f8c5910e37
commit d269fb780e
2 changed files with 33 additions and 36 deletions

View File

@ -125,26 +125,32 @@ def get_build_steps(project_yaml, dockerfile_path):
ts = datetime.datetime.now().strftime('%Y%m%d%H%M')
build_steps = [
{
'name': 'gcr.io/cloud-builders/docker',
'args': [
'build',
'-t',
image,
'.',
],
'dir': 'projects/' + name,
},
{
'name': image,
'args': [
'bash',
'-c',
'srcmap > /workspace/srcmap.json && cat /workspace/srcmap.json'
],
'env': [ 'OSSFUZZ_REVISION=$REVISION_ID' ],
},
]
{
'args': [
'clone', 'https://github.com/google/oss-fuzz.git',
],
'name': 'gcr.io/cloud-builders/git',
},
{
'name': 'gcr.io/cloud-builders/docker',
'args': [
'build',
'-t',
image,
'.',
],
'dir': 'oss-fuzz/projects/' + name,
},
{
'name': image,
'args': [
'bash',
'-c',
'srcmap > /workspace/srcmap.json && cat /workspace/srcmap.json'
],
'env': [ 'OSSFUZZ_REVISION=$REVISION_ID' ],
},
]
for fuzzing_engine in project_yaml['fuzzing_engines']:
for sanitizer in get_sanitizers(project_yaml):
@ -240,13 +246,6 @@ def main():
options = yaml.safe_load(os.environ["GCB_OPTIONS"])
build_body = {
'source': {
'repoSource': {
'branchName': 'master',
'projectId': 'oss-fuzz',
'repoName': 'oss-fuzz',
},
},
'steps': get_build_steps(project_yaml, dockerfile_path),
'timeout': str(4 * 3600) + 's',
'options': options,

View File

@ -24,7 +24,12 @@ TAG_PREFIX = 'gcr.io/oss-fuzz-base/'
def get_steps():
steps = []
steps = [{
'args': [
'clone', 'https://github.com/google/oss-fuzz.git',
],
'name': 'gcr.io/cloud-builders/git',
}]
for base_image in BASE_IMAGES:
steps.append({
@ -34,7 +39,7 @@ def get_steps():
TAG_PREFIX + base_image,
'.',
],
'dir': 'infra/base-images/' + base_image,
'dir': 'oss-fuzz/infra/base-images/' + base_image,
'name': 'gcr.io/cloud-builders/docker',
})
@ -47,13 +52,6 @@ def main():
options = yaml.safe_load(os.environ["GCB_OPTIONS"])
build_body = {
'source': {
'repoSource': {
'branchName': 'master',
'projectId': 'oss-fuzz-base',
'repoName': 'oss-fuzz',
},
},
'steps': get_steps(),
'timeout': str(4 * 3600) + 's',
'options': options,