Name build with diff ID
This commit is contained in:
parent
82daa321a2
commit
14a75bdf43
1 changed files with 3 additions and 7 deletions
|
@ -23,22 +23,18 @@ def build():
|
||||||
app.logger.info('form: %s', flask.request.form)
|
app.logger.info('form: %s', flask.request.form)
|
||||||
url = urlparse(flask.request.url)
|
url = urlparse(flask.request.url)
|
||||||
params = parse_qs(url.query)
|
params = parse_qs(url.query)
|
||||||
metadata = {}
|
|
||||||
build_env = {}
|
build_env = {}
|
||||||
for k, v in params.items():
|
for k, v in params.items():
|
||||||
if len(v) == 1:
|
if len(v) == 1:
|
||||||
metadata[k] = v[0]
|
|
||||||
build_env['ph_' + k] = v[0]
|
build_env['ph_' + k] = v[0]
|
||||||
else:
|
|
||||||
metadata[k] = v
|
|
||||||
branch = 'master'
|
branch = 'master'
|
||||||
if 'scripts_branch' in metadata:
|
if 'ph_scripts_branch' in build_env:
|
||||||
branch = metadata['scripts_branch']
|
branch = build_env['ph_scripts_branch']
|
||||||
build_request = {
|
build_request = {
|
||||||
'commit': 'HEAD',
|
'commit': 'HEAD',
|
||||||
'branch': branch,
|
'branch': branch,
|
||||||
'meta_data': metadata,
|
|
||||||
'env': build_env,
|
'env': build_env,
|
||||||
|
'message': f'Pre-merge checks for D{build_env["ph_buildable_revision"]}',
|
||||||
}
|
}
|
||||||
app.logger.info('buildkite request: %s', build_request)
|
app.logger.info('buildkite request: %s', build_request)
|
||||||
headers = {'Authorization': f'Bearer {buildkite_api_token}'}
|
headers = {'Authorization': f'Bearer {buildkite_api_token}'}
|
||||||
|
|
Loading…
Reference in a new issue