Fix "Run Build Again" to send the tags to which we should push.
This commit is contained in:
parent
76165b5d2b
commit
ee0d483efd
2 changed files with 13 additions and 2 deletions
|
@ -108,6 +108,15 @@ class RepositoryBuildList(RepositoryParamResource):
|
||||||
'pull_robot': {
|
'pull_robot': {
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
'description': 'Username of a Quay robot account to use as pull credentials',
|
'description': 'Username of a Quay robot account to use as pull credentials',
|
||||||
|
},
|
||||||
|
'docker_tags': {
|
||||||
|
'type': 'array',
|
||||||
|
'description': 'The tags to which the built images will be pushed',
|
||||||
|
'items': {
|
||||||
|
'type': 'string'
|
||||||
|
},
|
||||||
|
'minItems': 1,
|
||||||
|
'uniqueItems': True
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -137,6 +146,7 @@ class RepositoryBuildList(RepositoryParamResource):
|
||||||
|
|
||||||
dockerfile_id = request_json['file_id']
|
dockerfile_id = request_json['file_id']
|
||||||
subdir = request_json['subdirectory'] if 'subdirectory' in request_json else ''
|
subdir = request_json['subdirectory'] if 'subdirectory' in request_json else ''
|
||||||
|
tags = request_json.get('docker_tags', ['latest'])
|
||||||
pull_robot_name = request_json.get('pull_robot', None)
|
pull_robot_name = request_json.get('pull_robot', None)
|
||||||
|
|
||||||
# Verify the security behind the pull robot.
|
# Verify the security behind the pull robot.
|
||||||
|
@ -167,7 +177,7 @@ class RepositoryBuildList(RepositoryParamResource):
|
||||||
repo = model.get_repository(namespace, repository)
|
repo = model.get_repository(namespace, repository)
|
||||||
display_name = user_files.get_file_checksum(dockerfile_id)
|
display_name = user_files.get_file_checksum(dockerfile_id)
|
||||||
|
|
||||||
build_request = start_build(repo, dockerfile_id, ['latest'], display_name, subdir, True,
|
build_request = start_build(repo, dockerfile_id, tags, display_name, subdir, True,
|
||||||
pull_robot_name=pull_robot_name)
|
pull_robot_name=pull_robot_name)
|
||||||
|
|
||||||
resp = build_status_view(build_request, True)
|
resp = build_status_view(build_request, True)
|
||||||
|
|
|
@ -973,6 +973,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
||||||
var data = {
|
var data = {
|
||||||
'file_id': build['resource_key'],
|
'file_id': build['resource_key'],
|
||||||
'subdirectory': subdirectory,
|
'subdirectory': subdirectory,
|
||||||
|
'docker_tags': build['job_config']['docker_tags']
|
||||||
};
|
};
|
||||||
|
|
||||||
if (build['pull_robot']) {
|
if (build['pull_robot']) {
|
||||||
|
|
Reference in a new issue