Make the squashed path smaller and handle failure cases on the curl side
This commit is contained in:
parent
9003670826
commit
e5055763f6
3 changed files with 4 additions and 5 deletions
|
@ -44,7 +44,7 @@ application.register_blueprint(callback, url_prefix='/oauth2')
|
|||
application.register_blueprint(index, url_prefix='/v1')
|
||||
application.register_blueprint(tags, url_prefix='/v1')
|
||||
application.register_blueprint(registry, url_prefix='/v1')
|
||||
application.register_blueprint(verbs, url_prefix='/verbs/v1/repositories')
|
||||
application.register_blueprint(verbs, url_prefix='/c1')
|
||||
application.register_blueprint(api_bp, url_prefix='/api')
|
||||
application.register_blueprint(webhooks, url_prefix='/webhooks')
|
||||
application.register_blueprint(realtime, url_prefix='/realtime')
|
||||
|
|
|
@ -53,7 +53,7 @@ def _write_synthetic_image_to_storage(linked_storage_uuid, linked_locations, que
|
|||
done_uploading.save()
|
||||
|
||||
|
||||
@verbs.route('/<namespace>/<repository>/<tag>/squash', methods=['GET'])
|
||||
@verbs.route('/squash/<namespace>/<repository>/<tag>', methods=['GET'])
|
||||
@process_auth
|
||||
def get_squashed_tag(namespace, repository, tag):
|
||||
permission = ReadRepositoryPermission(namespace, repository)
|
||||
|
|
|
@ -422,9 +422,8 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
});
|
||||
|
||||
if ($scope.currentTag) {
|
||||
var squash = 'curl ' + Config.getHost('ACCOUNTNAME:PASSWORDORTOKEN');
|
||||
squash += '/verbs/v1/repositories/' + namespace + '/' + name + '/';
|
||||
squash += $scope.currentTag.name + '/squash';
|
||||
var squash = 'curl -f ' + Config.getHost('ACCOUNTNAME:PASSWORDORTOKEN');
|
||||
squash += '/c1/squash/' + namespace + '/' + name + '/' + $scope.currentTag.name;
|
||||
squash += ' | docker load';
|
||||
|
||||
$scope.pullCommands.push({
|
||||
|
|
Reference in a new issue