Record phase information and make better error messages on pull failure

This commit is contained in:
Joseph Schorr 2015-06-30 12:59:24 +03:00
parent d9ce8fdf52
commit e06435fee4
3 changed files with 46 additions and 51 deletions

View file

@ -1,22 +1,21 @@
<div bindonce class="build-log-error-element">
<!-- Errors -->
<span class="error-message-container">
<i class="fa fa-exclamation-triangle"></i>
<span class="error-message" bo-text="error.message"></span>
<span ng-if="error.message == 'HTTP code: 403' && getLocalPullInfo().isLocal">
caused by attempting to pull private repository <a href="/repository/{{ getLocalPullInfo().repo }}">{{ getLocalPullInfo().repo }}</a>
<span ng-if="getLocalPullInfo().login">with inaccessible credentials</span>
<span ng-if="!getLocalPullInfo().login">without credentials</span>
<!-- Local Pull issue -->
<span bo-if="isPullError(error) && localPullInfo.isLocal">
<span bo-if="!localPullInfo.username" class="error-message">
Error 403: Could not pull private base image <a href="/repository/{{ localPullInfo.repo }}">{{ localPullInfo.repo }}</a> without robot account credentials. Please see
<a href="http://docs.quay.io/issues/base-pull-issue.html" target="_blank">Setting up build trigger credentials</a> for more information.
</span>
<span bo-if="localPullInfo.username" class="error-message">
Error 403: Could not pull private base image <a href="/repository/{{ localPullInfo.repo }}">{{ localPullInfo.repo }}</a> because robot account <strong>{{ localPullInfo.username}}</strong> does not have access. Please see
<a href="http://docs.quay.io/issues/base-pull-issue.html" target="_blank">Setting up build trigger credentials</a> for more information.
</span>
</span>
</span>
<div class="alert alert-danger" ng-if="error.message == 'HTTP code: 403' && getLocalPullInfo().isLocal">
<div ng-if="getLocalPullInfo().login">
Note: The credentials <b>{{ getLocalPullInfo().login.username }}</b> for registry <b>{{ getLocalPullInfo().login.registry }}</b> cannot
access repository <a href="/repository/{{ getLocalPullInfo().repo }}">{{ getLocalPullInfo().repo }}</a>.
</div>
<div ng-if="!getLocalPullInfo().login">
Note: No robot account is specified for this build. Without such credentials, this pull will always fail. Please setup a new
build trigger with a robot account that has access to <a href="/repository/{{ getLocalPullInfo().repo }}">{{ getLocalPullInfo().repo }}</a> or make that repository public.
</div>
</div>
<!-- Other issue -->
<span bo-if="!isPullError(error) || !localPullInfo.isLocal"
class="error-message" bo-text="error.message"></span>
</span>
</div>