def deploy_build_done(): d = request.json attributes = d['attributes'] target = FQSHA.from_json(json.loads(attributes['target'])) job = Job(batch_client, d['id'], attributes=attributes, _status=d) receive_deploy_job(target, job) return '', 200
def ci_build_done(): d = request.json attributes = d['attributes'] source = FQSHA.from_json(json.loads(attributes['source'])) target = FQSHA.from_json(json.loads(attributes['target'])) job = Job(batch_client, d['id'], attributes=attributes, _status=d) receive_ci_job(source, target, job) return '', 200
def test_missing_parent_is_400(client): try: batch = client.create_batch() fake_job = aioclient.Job.unsubmitted_job(batch._async_builder, 10000) fake_job = Job.from_async_job(fake_job) batch.create_job('alpine:3.8', command=['echo', 'head'], parents=[fake_job]) batch.submit() except ValueError as err: assert re.search('parents with invalid job ids', str(err)) return assert False