2014-04-03 03:33:58 +00:00
|
|
|
<div class="setup-trigger-directive-element">
|
|
|
|
|
|
|
|
<!-- Modal message dialog -->
|
|
|
|
<div class="modal fade" id="setupTriggerModal">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
<h4 class="modal-title">Setup new build trigger</h4>
|
|
|
|
</div>
|
2014-04-16 21:50:25 +00:00
|
|
|
<div class="modal-body" ng-show="activating">
|
|
|
|
<span class="quay-spinner"></span> Setting up trigger...
|
|
|
|
</div>
|
|
|
|
<div class="modal-body" ng-show="!activating">
|
2014-04-03 03:33:58 +00:00
|
|
|
<!-- Trigger-specific setup -->
|
|
|
|
<div class="trigger-description-element trigger-option-section" ng-switch on="trigger.service">
|
|
|
|
<div ng-switch-when="github">
|
|
|
|
<div class="trigger-setup-github" repository="repository" trigger="trigger"
|
|
|
|
analyze="checkAnalyze(isValid)"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Pull information -->
|
|
|
|
<div class="trigger-option-section" ng-show="showPullRequirements">
|
|
|
|
<div ng-show="!pullRequirements">
|
|
|
|
<span class="quay-spinner"></span> Checking pull credential requirements...
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-show="pullRequirements">
|
|
|
|
<div class="alert alert-danger" ng-if="pullRequirements.status == 'error'">
|
|
|
|
{{ pullRequirements.message }}
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-warning" ng-if="pullRequirements.status == 'warning'">
|
|
|
|
{{ pullRequirements.message }}
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-success" ng-if="pullRequirements.status == 'analyzed' && pullRequirements.is_public === false">
|
|
|
|
The
|
|
|
|
<a href="{{ pullRequirements.dockerfile_url }}" ng-if="pullRequirements.dockerfile_url" target="_blank">Dockerfile found</a>
|
|
|
|
<span ng-if="!pullRequirements.dockerfile_url">Dockerfile found</span>
|
2014-08-08 17:50:04 +00:00
|
|
|
depends on the private <span class="registry-name"></span> repository
|
2014-04-03 03:33:58 +00:00
|
|
|
<a href="/repository/{{ pullRequirements.namespace }}/{{ pullRequirements.name }}" target="_blank">
|
|
|
|
{{ pullRequirements.namespace }}/{{ pullRequirements.name }}
|
|
|
|
</a> which requires
|
|
|
|
a robot account for pull access, because it is marked <strong>private</strong>.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-08-06 20:01:19 +00:00
|
|
|
<div ng-show="pullRequirements">
|
|
|
|
<table style="width: 100%;">
|
|
|
|
<tr>
|
|
|
|
<td style="width: 162px">
|
|
|
|
<span class="context-tooltip" data-title="The credentials given to 'docker pull' in the builder for pulling images"
|
|
|
|
style="margin-bottom: 10px" bs-tooltip>
|
|
|
|
docker pull Credentials:
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div ng-if="!isNamespaceAdmin(repository.namespace)" style="color: #aaa;">
|
|
|
|
In order to set pull credentials for a build trigger, you must be an Administrator of the namespace <strong>{{ repository.namespace }}</strong>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group btn-group-sm" ng-if="isNamespaceAdmin(repository.namespace)">
|
|
|
|
<button type="button" class="btn btn-default"
|
|
|
|
ng-class="publicPull ? 'active btn-info' : ''" ng-click="setPublicPull(true)">None</button>
|
|
|
|
<button type="button" class="btn btn-default"
|
|
|
|
ng-class="publicPull ? '' : 'active btn-info'" ng-click="setPublicPull(false)">
|
|
|
|
<i class="fa fa-wrench"></i>
|
|
|
|
Robot account
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table style="width: 100%;">
|
|
|
|
<tr ng-show="!publicPull">
|
|
|
|
<td>
|
|
|
|
<div class="entity-search" namespace="repository.namespace"
|
|
|
|
placeholder="'Select robot account for pulling...'"
|
|
|
|
current-entity="pullEntity"
|
|
|
|
allowed-entities="['robot']"></div>
|
|
|
|
|
|
|
|
<div class="alert alert-info" ng-if="pullRequirements.status == 'analyzed' && pullRequirements.robots.length"
|
|
|
|
style="margin-top: 20px; margin-bottom: 0px;">
|
|
|
|
Note: We've automatically selected robot account
|
2014-08-08 17:50:04 +00:00
|
|
|
<span class="entity-reference" entity="pullRequirements.robots[0]"></span>, since it has access to the private
|
2014-08-06 20:01:19 +00:00
|
|
|
repository.
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-warning"
|
|
|
|
ng-if="pullRequirements.status == 'analyzed' && !pullRequirements.robots.length && pullRequirements.name"
|
|
|
|
style="margin-top: 20px; margin-bottom: 0px;">
|
2014-08-08 17:50:04 +00:00
|
|
|
Note: No robot account currently has access to the private repository. Please create one and/or assign access in the
|
2014-08-06 20:01:19 +00:00
|
|
|
<a href="/repository/{{ pullRequirements.namespace }}/{{ pullRequirements.name }}/admin" target="_blank">repository's
|
|
|
|
admin panel</a>.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2014-04-03 03:33:58 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-primary"
|
2014-04-16 21:50:25 +00:00
|
|
|
ng-disabled="!trigger.$ready || (!publicPull && !pullEntity) || checkingPullRequirements || activating"
|
|
|
|
ng-click="activate()">Finished</button>
|
2014-04-03 03:33:58 +00:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.modal-content -->
|
|
|
|
</div><!-- /.modal-dialog -->
|
|
|
|
</div><!-- /.modal -->
|
|
|
|
</div>
|