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>
|
2015-04-30 19:33:19 +00:00
|
|
|
<div class="modal-body loading" ng-show="currentView == 'activating'">
|
|
|
|
<span class="cor-loader-inline"></span> Setting up trigger...
|
2014-04-16 21:50:25 +00:00
|
|
|
</div>
|
2014-11-24 21:07:38 +00:00
|
|
|
<div class="modal-body" ng-show="currentView != '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">
|
2015-05-03 17:38:11 +00:00
|
|
|
<div ng-switch-when="custom-git">
|
|
|
|
<div class="trigger-setup-custom" repository="repository" trigger="trigger"
|
2014-11-24 21:07:38 +00:00
|
|
|
next-step-counter="nextStepCounter" current-step-valid="state.stepValid"
|
2015-05-03 16:58:48 +00:00
|
|
|
analyze="checkAnalyze(isValid)"></div>
|
|
|
|
</div>
|
2015-05-03 17:38:11 +00:00
|
|
|
<div ng-switch-default>
|
2015-05-03 16:58:48 +00:00
|
|
|
<div class="trigger-setup-githost" repository="repository" trigger="trigger"
|
2015-05-03 17:38:11 +00:00
|
|
|
kind="{{ trigger.service }}"
|
2015-03-31 21:12:40 +00:00
|
|
|
next-step-counter="nextStepCounter" current-step-valid="state.stepValid"
|
2015-03-27 21:07:06 +00:00
|
|
|
analyze="checkAnalyze(isValid)"></div>
|
|
|
|
</div>
|
2014-04-03 03:33:58 +00:00
|
|
|
</div>
|
|
|
|
|
2014-10-14 19:46:35 +00:00
|
|
|
<!-- Loading pull information -->
|
2015-04-30 19:33:19 +00:00
|
|
|
<div ng-show="currentView == 'analyzing'" class="loading">
|
|
|
|
<span class="cor-loader-inline"></span> Checking pull credential requirements...
|
2014-10-14 19:46:35 +00:00
|
|
|
</div>
|
|
|
|
|
2014-04-03 03:33:58 +00:00
|
|
|
<!-- Pull information -->
|
2014-10-14 19:46:35 +00:00
|
|
|
<div class="trigger-option-section" ng-show="currentView == 'analyzed'">
|
|
|
|
|
|
|
|
<!-- Messaging -->
|
2015-04-22 21:22:29 +00:00
|
|
|
<div ng-switch on="pullInfo.analysis.status">
|
|
|
|
<div ng-switch-when="error" class="alert alert-danger">{{ pullInfo.analysis.message }}</div>
|
|
|
|
<div ng-switch-when="warning" class="alert alert-warning">{{ pullInfo.analysis.message }}</div>
|
|
|
|
<div ng-switch-when="notimplemented" class="alert alert-warning">
|
|
|
|
<p>For {{ TriggerService.getTitle(trigger.service) }} triggers, we are unable to determine dependencies automatically.</p>
|
|
|
|
<p>If the git repository being built depends on a private base image, you must manually select a robot account with the proper permissions.</p>
|
|
|
|
</div>
|
2014-04-03 03:33:58 +00:00
|
|
|
</div>
|
2014-10-14 19:46:35 +00:00
|
|
|
<div class="dockerfile-found" ng-if="pullInfo.analysis.is_public === false">
|
|
|
|
<div class="dockerfile-found-content">
|
2015-05-03 17:38:11 +00:00
|
|
|
A robot account is <strong>required</strong> for this build trigger because the
|
|
|
|
Dockerfile found
|
2014-10-14 19:46:35 +00:00
|
|
|
pulls from the private <span class="registry-name"></span> repository
|
|
|
|
|
|
|
|
<a href="/repository/{{ pullInfo.analysis.namespace }}/{{ pullInfo.analysis.name }}" target="_blank">
|
|
|
|
{{ pullInfo.analysis.namespace }}/{{ pullInfo.analysis.name }}
|
|
|
|
</a>
|
2014-04-03 03:33:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-03-31 21:12:40 +00:00
|
|
|
<div style="margin-bottom: 12px">
|
|
|
|
Please select the credentials to use when pulling the base image:
|
|
|
|
</div>
|
2014-10-14 19:46:35 +00:00
|
|
|
<div ng-if="!isNamespaceAdmin(repository.namespace)" style="color: #aaa;">
|
2014-11-24 21:07:38 +00:00
|
|
|
<strong>Note:</strong> In order to set pull credentials for a build trigger, you must be an
|
2014-10-14 19:46:35 +00:00
|
|
|
Administrator of the namespace <strong>{{ repository.namespace }}</strong>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Namespace admin -->
|
|
|
|
<div ng-show="isNamespaceAdmin(repository.namespace)">
|
|
|
|
<!-- Select credentials -->
|
|
|
|
<div class="btn-group btn-group-sm">
|
|
|
|
<button type="button" class="btn btn-default"
|
|
|
|
ng-class="pullInfo.is_public ? 'active btn-info' : ''"
|
|
|
|
ng-click="pullInfo.is_public = true">
|
|
|
|
None
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-default"
|
|
|
|
ng-class="pullInfo.is_public ? '' : 'active btn-info'"
|
|
|
|
ng-click="pullInfo.is_public = false">
|
2015-04-23 20:41:47 +00:00
|
|
|
<i class="fa ci-robot"></i>
|
2014-10-14 19:46:35 +00:00
|
|
|
Robot account
|
|
|
|
</button>
|
|
|
|
</div>
|
2014-08-06 20:01:19 +00:00
|
|
|
|
2014-10-14 19:46:35 +00:00
|
|
|
<!-- Robot Select -->
|
|
|
|
<div ng-show="!pullInfo.is_public" style="margin-top: 10px">
|
2014-11-24 21:07:38 +00:00
|
|
|
<div class="entity-search" namespace="repository.namespace"
|
|
|
|
placeholder="'Select robot account for pulling...'"
|
2014-10-14 19:46:35 +00:00
|
|
|
current-entity="pullInfo.pull_entity"
|
|
|
|
allowed-entities="['robot']"></div>
|
2014-08-06 20:01:19 +00:00
|
|
|
|
2014-10-14 19:46:35 +00:00
|
|
|
<div ng-if="pullInfo.analysis.robots.length" style="margin-top: 20px; margin-bottom: 0px;">
|
|
|
|
<strong>Note</strong>: We've automatically selected robot account
|
2014-11-24 21:07:38 +00:00
|
|
|
<span class="entity-reference" entity="pullInfo.analysis.robots[0]"></span>,
|
2014-10-14 19:46:35 +00:00
|
|
|
since it has access to the private repository.
|
|
|
|
</div>
|
|
|
|
<div ng-if="!pullInfo.analysis.robots.length && pullInfo.analysis.name"
|
|
|
|
style="margin-top: 20px; margin-bottom: 0px;">
|
|
|
|
<strong>Note</strong>: No robot account currently has access to the private repository. Please create one and/or assign access in the
|
|
|
|
<a href="/repository/{{ pullInfo.analysis.namespace }}/{{ pullInfo.analysis.name }}/admin" target="_blank">
|
|
|
|
repository's admin panel.
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-08-06 20:01:19 +00:00
|
|
|
</div>
|
2014-04-03 03:33:58 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2015-04-22 21:07:16 +00:00
|
|
|
<div class="trigger-option-section" ng-show="currentView == 'postActivation'">
|
|
|
|
<div ng-if="trigger.config.credentials" class="credentials" trigger="trigger"></div>
|
|
|
|
<div ng-if="!trigger.config.credentials">
|
2015-04-13 17:45:34 +00:00
|
|
|
<div class="alert alert-success">The trigger has been successfully created.</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-04-03 03:33:58 +00:00
|
|
|
</div>
|
2015-04-30 19:33:19 +00:00
|
|
|
<div class="modal-footer" ng-show="currentView != 'activating'">
|
2014-10-14 19:46:35 +00:00
|
|
|
<button type="button" class="btn btn-primary" ng-disabled="!state.stepValid"
|
|
|
|
ng-click="nextStepCounter = nextStepCounter + 1"
|
|
|
|
ng-show="currentView == 'config'">Next</button>
|
|
|
|
|
2014-04-03 03:33:58 +00:00
|
|
|
<button type="button" class="btn btn-primary"
|
2014-10-14 19:46:35 +00:00
|
|
|
ng-disabled="!trigger.$ready || (!pullInfo['is_public'] && !pullInfo['pull_entity'])"
|
|
|
|
ng-click="activate()"
|
|
|
|
ng-show="currentView == 'analyzed'">Create Trigger</button>
|
|
|
|
|
2015-04-13 17:45:34 +00:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ currentView == 'postActivation' ? 'Done' : 'Cancel' }}</button>
|
2014-04-03 03:33:58 +00:00
|
|
|
</div>
|
|
|
|
</div><!-- /.modal-content -->
|
|
|
|
</div><!-- /.modal-dialog -->
|
|
|
|
</div><!-- /.modal -->
|
|
|
|
</div>
|