add webhook URL to custom trigger dialog

This commit is contained in:
Jimmy Zelinskie 2015-04-16 12:06:48 -04:00
parent 0c3becd204
commit 2236270741
2 changed files with 18 additions and 9 deletions

View file

@ -621,6 +621,7 @@ class CustomBuildTrigger(BuildTrigger):
return dockerfile_id, tags, build_name, trigger.config['subdir'], metadata
def activate(self, trigger_uuid, standard_webhook_url, auth_token, config):
config['webhook_url'] = standard_webhook_url
config['public_key'], private_key = generate_ssh_keypair()
return config, private_key

View file

@ -41,11 +41,9 @@
<div class="alert alert-warning" ng-if="pullInfo.analysis.status == 'warning'">
{{ pullInfo.analysis.message }}
</div>
<div class="alert alert-info" ng-if="pullInfo.analysis.status == 'notimplemented'">
<p>
For {{ TriggerService.getTitle(trigger.service) }} triggers, we are unable to determine dependencies automatically.
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 class="alert alert-warning" ng-if="pullInfo.analysis.status == 'notimplemented'">
<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>
<div class="dockerfile-found" ng-if="pullInfo.analysis.is_public === false">
<div class="dockerfile-found-content">
@ -117,11 +115,21 @@
<div class="trigger-option-section" ng-show="currentView == 'postActivation'" ng-switch on="trigger.service">
<div ng-switch-when="custom">
<div class="alert alert-warning">
The trigger has been successfully created, but the following first requires action:<br>
In order for our builders to clone your repository, you must give the following public key read access to the git repository.
The trigger has been successfully created, but the following first requires action:
<ul>
<li>You must give the following public key read access to the git repository.</li>
<li>You must POST to the following URL as your webhook endpoint.</li>
</ul>
For more information, refer to the <a href="http://docs.quay.io/guides/custom-trigger.html" target="_blank">Custom Git Triggers documentation</a>.
</div>
<p>SSH Public Key:</p>
<p>
SSH Public Key:
<div class="copy-box" value="trigger.config.public_key"></div>
</p>
<p>
Webhook Endpoint URL:
<div class="copy-box" value="trigger.config.webhook_url"></div>
</p>
</div>
<div ng-switch-default>
<div class="alert alert-success">The trigger has been successfully created.</div>