Commit 3e1f0a87ca43417d248390803973f8e78fb0849d
1 parent
7f13e8f4
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
removing default value for serpro_integration_plugin variable
Showing
2 changed files
with
84 additions
and
80 deletions
Show diff stats
plugins/serpro_integration/lib/ext/community.rb
1 | 1 | require_dependency 'community' |
2 | -require 'gitlab' | |
2 | +#require 'gitlab' | |
3 | 3 | #require 'jenkins_api_client' |
4 | 4 | |
5 | 5 | class Community |
... | ... | @@ -9,7 +9,7 @@ class Community |
9 | 9 | settings_items :allow_jenkins_integration, :type => :boolean, :default => true |
10 | 10 | |
11 | 11 | #FIXME make test for default option |
12 | - settings_items :serpro_integration_plugin, :type => Hash, :default => {} | |
12 | + settings_items :serpro_integration_plugin, :type => Hash | |
13 | 13 | |
14 | 14 | ########################################## |
15 | 15 | # Gitlab stuff # |
... | ... | @@ -22,6 +22,7 @@ class Community |
22 | 22 | end |
23 | 23 | |
24 | 24 | def gitlab |
25 | + self.serpro_integration_plugin ||= {} | |
25 | 26 | self.serpro_integration_plugin[:gitlab] ||= {} |
26 | 27 | self.serpro_integration_plugin[:gitlab] |
27 | 28 | end |
... | ... | @@ -129,84 +130,86 @@ class Community |
129 | 130 | :password => $jenkins_private_token, |
130 | 131 | :username => $jenkins_user) |
131 | 132 | |
132 | - xmlJenkins = " | |
133 | - <maven2-moduleset plugin='maven-plugin@1.509'> | |
134 | - <actions/> | |
135 | - <description>Projeto criado para o repositório #{repositoryPath} do Gitlab - #{webUrl}</description> | |
136 | - <logRotator class='hudson.tasks.LogRotator'> | |
137 | - <daysToKeep>-1</daysToKeep> | |
138 | - <numToKeep>2</numToKeep> | |
139 | - <artifactDaysToKeep>-1</artifactDaysToKeep> | |
140 | - <artifactNumToKeep>-1</artifactNumToKeep> | |
141 | - </logRotator> | |
142 | - <keepDependencies>false</keepDependencies> | |
143 | - <properties/> | |
144 | - <scm class='hudson.plugins.git.GitSCM' plugin='git@2.2.1'> | |
145 | - <configVersion>2</configVersion> | |
146 | - <userRemoteConfigs> | |
147 | - <hudson.plugins.git.UserRemoteConfig> | |
148 | - <url>#{gitUrl}</url> | |
149 | - </hudson.plugins.git.UserRemoteConfig> | |
150 | - </userRemoteConfigs> | |
151 | - <branches> | |
152 | - <hudson.plugins.git.BranchSpec> | |
153 | - <name>*/master</name> | |
154 | - </hudson.plugins.git.BranchSpec> | |
155 | - </branches> | |
156 | - <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> | |
157 | - <submoduleCfg class='list'/> | |
158 | - <extensions/> | |
159 | - </scm> | |
160 | - <canRoam>true</canRoam> | |
161 | - <disabled>false</disabled> | |
162 | - <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> | |
163 | - <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> | |
164 | - <jdk>(Inherit From Job)</jdk> | |
165 | - <triggers class='vector'/> | |
166 | - <concurrentBuild>false</concurrentBuild> | |
167 | - <goals>clean package install deploy</goals> | |
168 | - <aggregatorStyleBuild>true</aggregatorStyleBuild> | |
169 | - <incrementalBuild>false</incrementalBuild> | |
170 | - <perModuleEmail>true</perModuleEmail> | |
171 | - <ignoreUpstremChanges>false</ignoreUpstremChanges> | |
172 | - <archivingDisabled>false</archivingDisabled> | |
173 | - <resolveDependencies>false</resolveDependencies> | |
174 | - <processPlugins>false</processPlugins> | |
175 | - <mavenValidationLevel>-1</mavenValidationLevel> | |
176 | - <runHeadless>false</runHeadless> | |
177 | - <disableTriggerDownstreamProjects>false</disableTriggerDownstreamProjects> | |
178 | - <settings class='jenkins.mvn.DefaultSettingsProvider'/> | |
179 | - <globalSettings class='jenkins.mvn.DefaultGlobalSettingsProvider'/> | |
180 | - <reporters> | |
181 | - <hudson.maven.reporters.MavenMailer> | |
182 | - <recipients/> | |
183 | - <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild> | |
184 | - <sendToIndividuals>true</sendToIndividuals> | |
185 | - <perModuleEmail>true</perModuleEmail> | |
186 | - </hudson.maven.reporters.MavenMailer> | |
187 | - </reporters> | |
188 | - <publishers> | |
189 | - <hudson.plugins.sonar.SonarPublisher plugin='sonar@2.1'> | |
190 | - <jdk>(Inherit From Job)</jdk> | |
191 | - <branch/> | |
192 | - <language/> | |
193 | - <mavenOpts/> | |
194 | - <jobAdditionalProperties/> | |
195 | - <settings class='jenkins.mvn.DefaultSettingsProvider'/> | |
196 | - <globalSettings class='jenkins.mvn.DefaultGlobalSettingsProvider'/> | |
197 | - <usePrivateRepository>false</usePrivateRepository> | |
198 | - </hudson.plugins.sonar.SonarPublisher> | |
199 | - </publishers> | |
200 | - <buildWrappers/> | |
201 | - <prebuilders/> | |
202 | - <postbuilders/> | |
203 | - <runPostStepsIfResult> | |
204 | - <name>FAILURE</name> | |
205 | - <ordinal>2</ordinal> | |
206 | - <color>RED</color> | |
207 | - </runPostStepsIfResult> | |
208 | - </maven2-moduleset> | |
209 | - " | |
133 | + xmlJenkins = "" | |
134 | + | |
135 | +# xmlJenkins = " | |
136 | +# <maven2-moduleset plugin='maven-plugin@1.509'> | |
137 | +# <actions/> | |
138 | +# <description>Projeto criado para o repositório #{repositoryPath} do Gitlab - #{webUrl}</description> | |
139 | +# <logRotator class='hudson.tasks.LogRotator'> | |
140 | +# <daysToKeep>-1</daysToKeep> | |
141 | +# <numToKeep>2</numToKeep> | |
142 | +# <artifactDaysToKeep>-1</artifactDaysToKeep> | |
143 | +# <artifactNumToKeep>-1</artifactNumToKeep> | |
144 | +# </logRotator> | |
145 | +# <keepDependencies>false</keepDependencies> | |
146 | +# <properties/> | |
147 | +# <scm class='hudson.plugins.git.GitSCM' plugin='git@2.2.1'> | |
148 | +# <configVersion>2</configVersion> | |
149 | +# <userRemoteConfigs> | |
150 | +# <hudson.plugins.git.UserRemoteConfig> | |
151 | +# <url>#{gitUrl}</url> | |
152 | +# </hudson.plugins.git.UserRemoteConfig> | |
153 | +# </userRemoteConfigs> | |
154 | +# <branches> | |
155 | +# <hudson.plugins.git.BranchSpec> | |
156 | +# <name>*/master</name> | |
157 | +# </hudson.plugins.git.BranchSpec> | |
158 | +# </branches> | |
159 | +# <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> | |
160 | +# <submoduleCfg class='list'/> | |
161 | +# <extensions/> | |
162 | +# </scm> | |
163 | +# <canRoam>true</canRoam> | |
164 | +# <disabled>false</disabled> | |
165 | +# <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> | |
166 | +# <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> | |
167 | +# <jdk>(Inherit From Job)</jdk> | |
168 | +# <triggers class='vector'/> | |
169 | +# <concurrentBuild>false</concurrentBuild> | |
170 | +# <goals>clean package install deploy</goals> | |
171 | +# <aggregatorStyleBuild>true</aggregatorStyleBuild> | |
172 | +# <incrementalBuild>false</incrementalBuild> | |
173 | +# <perModuleEmail>true</perModuleEmail> | |
174 | +# <ignoreUpstremChanges>false</ignoreUpstremChanges> | |
175 | +# <archivingDisabled>false</archivingDisabled> | |
176 | +# <resolveDependencies>false</resolveDependencies> | |
177 | +# <processPlugins>false</processPlugins> | |
178 | +# <mavenValidationLevel>-1</mavenValidationLevel> | |
179 | +# <runHeadless>false</runHeadless> | |
180 | +# <disableTriggerDownstreamProjects>false</disableTriggerDownstreamProjects> | |
181 | +# <settings class='jenkins.mvn.DefaultSettingsProvider'/> | |
182 | +# <globalSettings class='jenkins.mvn.DefaultGlobalSettingsProvider'/> | |
183 | +# <reporters> | |
184 | +# <hudson.maven.reporters.MavenMailer> | |
185 | +# <recipients/> | |
186 | +# <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild> | |
187 | +# <sendToIndividuals>true</sendToIndividuals> | |
188 | +# <perModuleEmail>true</perModuleEmail> | |
189 | +# </hudson.maven.reporters.MavenMailer> | |
190 | +# </reporters> | |
191 | +# <publishers> | |
192 | +# <hudson.plugins.sonar.SonarPublisher plugin='sonar@2.1'> | |
193 | +# <jdk>(Inherit From Job)</jdk> | |
194 | +# <branch/> | |
195 | +# <language/> | |
196 | +# <mavenOpts/> | |
197 | +# <jobAdditionalProperties/> | |
198 | +# <settings class='jenkins.mvn.DefaultSettingsProvider'/> | |
199 | +# <globalSettings class='jenkins.mvn.DefaultGlobalSettingsProvider'/> | |
200 | +# <usePrivateRepository>false</usePrivateRepository> | |
201 | +# </hudson.plugins.sonar.SonarPublisher> | |
202 | +# </publishers> | |
203 | +# <buildWrappers/> | |
204 | +# <prebuilders/> | |
205 | +# <postbuilders/> | |
206 | +# <runPostStepsIfResult> | |
207 | +# <name>FAILURE</name> | |
208 | +# <ordinal>2</ordinal> | |
209 | +# <color>RED</color> | |
210 | +# </runPostStepsIfResult> | |
211 | +# </maven2-moduleset> | |
212 | +# " | |
210 | 213 | |
211 | 214 | begin |
212 | 215 | @client.job.create(projectName, xmlJenkins) | ... | ... |
plugins/serpro_integration/views/profile-editor-extras.html.erb