diff --git a/plugins/serpro_integration/lib/ext/community.rb b/plugins/serpro_integration/lib/ext/community.rb index 208aed4..977f3dd 100644 --- a/plugins/serpro_integration/lib/ext/community.rb +++ b/plugins/serpro_integration/lib/ext/community.rb @@ -1,5 +1,5 @@ require_dependency 'community' -require 'gitlab' +#require 'gitlab' #require 'jenkins_api_client' class Community @@ -9,7 +9,7 @@ class Community settings_items :allow_jenkins_integration, :type => :boolean, :default => true #FIXME make test for default option - settings_items :serpro_integration_plugin, :type => Hash, :default => {} + settings_items :serpro_integration_plugin, :type => Hash ########################################## # Gitlab stuff # @@ -22,6 +22,7 @@ class Community end def gitlab + self.serpro_integration_plugin ||= {} self.serpro_integration_plugin[:gitlab] ||= {} self.serpro_integration_plugin[:gitlab] end @@ -129,84 +130,86 @@ class Community :password => $jenkins_private_token, :username => $jenkins_user) - xmlJenkins = " - - - Projeto criado para o repositório #{repositoryPath} do Gitlab - #{webUrl} - - -1 - 2 - -1 - -1 - - false - - - 2 - - - #{gitUrl} - - - - - */master - - - false - - - - true - false - false - false - (Inherit From Job) - - false - clean package install deploy - true - false - true - false - false - false - false - -1 - false - false - - - - - - false - true - true - - - - - (Inherit From Job) - - - - - - - false - - - - - - - FAILURE - 2 - RED - - - " + xmlJenkins = "" + +# xmlJenkins = " +# +# +# Projeto criado para o repositório #{repositoryPath} do Gitlab - #{webUrl} +# +# -1 +# 2 +# -1 +# -1 +# +# false +# +# +# 2 +# +# +# #{gitUrl} +# +# +# +# +# */master +# +# +# false +# +# +# +# true +# false +# false +# false +# (Inherit From Job) +# +# false +# clean package install deploy +# true +# false +# true +# false +# false +# false +# false +# -1 +# false +# false +# +# +# +# +# +# false +# true +# true +# +# +# +# +# (Inherit From Job) +# +# +# +# +# +# +# false +# +# +# +# +# +# +# FAILURE +# 2 +# RED +# +# +# " begin @client.job.create(projectName, xmlJenkins) diff --git a/plugins/serpro_integration/views/profile-editor-extras.html.erb b/plugins/serpro_integration/views/profile-editor-extras.html.erb index 24f9a7f..336ccfd 100644 --- a/plugins/serpro_integration/views/profile-editor-extras.html.erb +++ b/plugins/serpro_integration/views/profile-editor-extras.html.erb @@ -4,6 +4,7 @@ <%= render :partial => 'gitlab' %> +
<%= labelled_check_box(_('Uses sonar integration'), 'profile_data[allow_sonar_integration]', true, profile.allow_sonar_integration) %>
-- libgit2 0.21.2