[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,6 +125,12 @@ def get_build_steps(project_yaml, dockerfile_path):
ts = datetime.datetime.now().strftime('%Y%m%d%H%M') ts = datetime.datetime.now().strftime('%Y%m%d%H%M')
build_steps = [ build_steps = [
{
'args': [
'clone', 'https://github.com/google/oss-fuzz.git',
],
'name': 'gcr.io/cloud-builders/git',
},
{ {
'name': 'gcr.io/cloud-builders/docker', 'name': 'gcr.io/cloud-builders/docker',
'args': [ 'args': [
@ -133,7 +139,7 @@ def get_build_steps(project_yaml, dockerfile_path):
image, image,
'.', '.',
], ],
'dir': 'projects/' + name, 'dir': 'oss-fuzz/projects/' + name,
}, },
{ {
'name': image, 'name': image,
@ -240,13 +246,6 @@ def main():
options = yaml.safe_load(os.environ["GCB_OPTIONS"]) options = yaml.safe_load(os.environ["GCB_OPTIONS"])
build_body = { build_body = {
'source': {
'repoSource': {
'branchName': 'master',
'projectId': 'oss-fuzz',
'repoName': 'oss-fuzz',
},
},
'steps': get_build_steps(project_yaml, dockerfile_path), 'steps': get_build_steps(project_yaml, dockerfile_path),
'timeout': str(4 * 3600) + 's', 'timeout': str(4 * 3600) + 's',
'options': options, 'options': options,

View File

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