initial gitlab angular stuff

This commit is contained in:
Jimmy Zelinskie 2015-05-02 13:31:54 -04:00
parent d21fbb1204
commit 7426a540dd
5 changed files with 62 additions and 1 deletions

View file

@ -88,6 +88,42 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
}
},
'gitlab': {
'description': function(config) {
var source = UtilService.textToSafeHtml(config['build_source']);
var desc = '<i class="fa fa-git-square fa-lg" style="margin-left: 2px; margin-right: 2px"></i> Push to GitLab Repository ';
desc += '<a href="https://gitlab.com/' + source + '" target="_blank">' + source + '</a>';
desc += '<br>Dockerfile folder: //' + UtilService.textToSafeHtml(config['subdir']);
return desc;
},
'run_parameters': [
{
'title': 'Branch',
'type': 'option',
'name': 'branch_name'
}
],
'get_redirect_url': function(namespace, repository) {
var redirect_uri = KeyService['gitlabRedirectUri'] + '/trigger/' +
namespace + '/' + repository;
var authorize_url = KeyService['gitlabTriggerAuthorizeUrl'];
var client_id = KeyService['gitlabTriggerClientId'];
return authorize_url + 'client_id=' + client_id + '&redirect_uri=' + redirect_uri;
},
'is_external': false,
'is_enabled': function() {
return Features.GITLAB_BUILD;
},
'icon': 'fa-git-square',
'title': function() { return 'GitLab Repository Push'; },
'supports_full_directory_listing': false,
'templates': {
'credentials': '/static/directives/trigger/githost/credentials.html',
'trigger-description': '/static/directives/trigger/gitlab/trigger-description.html'
}
},
'custom-git': {
'description': function(config) {
var source = UtilService.textToSafeHtml(config['build_source']);