/
config.jelly
341 lines (315 loc) · 21.4 KB
/
config.jelly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"
xmlns:r="/lib/jfrog" xmlns:st="jelly:stapler">
<f:section title="${%Artifactory Configuration}">
<j:set var="uniqueId" value="${h.generateId()}"/>
<j:set var="useSpecs" value="${instance.useSpecs ?: true}"/>
<input type="hidden" name="useSpecs" value="${useSpecs}"/>
<f:block>
<lable style="margin: 10px 0px 5px -10px; line-height: 3; font-size: 1.3em; padding: 10px 15px;
font-weight: bold; box-sizing: border-box;">
Upload Details
</lable>
<j:choose>
<j:when test="${useSpecs}">
<r:blockWrapper style="width:100%" id="artifactory-deployer-spec-dd-${uniqueId}">
<f:dropdownList name="specsDeployerDetails" title="${%Artifactory upload server}">
<j:forEach var="s" items="${descriptor.jfrogInstances}" varStatus="loop">
<f:dropdownListBlock value="${s.instanceId}" title="${s.instanceId} ${s.artifactoryUrl}"
selected="${s.instanceId==instance.specsDeployerDetails.artifactoryName}">
<f:nested>
<input type="hidden" name="artifactoryName" value="${s.instanceId}"/>
<input type="hidden" name="artifactoryUrl"
id="artifactoryUrlDeploy${s.artifactoryUrl}"
value="${s.artifactoryUrl}"/>
<input type="hidden" name="stapler-class"
value="org.jfrog.hudson.ServerDetails"/>
</f:nested>
</f:dropdownListBlock>
</j:forEach>
</f:dropdownList>
</r:blockWrapper>
<r:credentials configurationFieldName="deployerCredentialsConfig"
configurationObject="${instance.deployerCredentialsConfig}"
blockTitle="Override default deployer credentials"
elementId="overridingDeployerCredentials-generic-${uniqueId}"/>
<f:block>
<r:blockWrapper style="width:100%; " id="uploadSpecArea-${uniqueId}">
<f:dropdownList name="uploadSpec" title="${%Upload spec source}"
help="/plugin/artifactory/help/common/help-UploadSpec.html">
<!-- Spec should be selected by default, the selected below maintains it -->
<f:dropdownListBlock value="spec" title="${%Job configuration}"
selected="${instance.uploadSpec.filePath == null}">
<tr>
<td>
<r:blockWrapper style="width:100%" id="uploadSpecArea-${uniqueId}">
<f:entry title="Spec" field="spec">
<f:textarea value="${instance.uploadSpec.spec}"/>
</f:entry>
</r:blockWrapper>
</td>
</tr>
</f:dropdownListBlock>
<f:dropdownListBlock value="file" title="${%File}"
selected="${instance.uploadSpec.filePath != null}">
<tr>
<td>
<r:blockWrapper style="width:100%">
<f:entry title="File Path" field="filePath">
<f:textbox value="${instance.uploadSpec.filePath}"/>
</f:entry>
</r:blockWrapper>
</td>
</tr>
</f:dropdownListBlock>
</f:dropdownList>
</r:blockWrapper>
</f:block>
</j:when>
<j:otherwise>
<r:blockWrapper style="width:100%" id="artifactory-deployer-generic-dd-${uniqueId}">
<f:dropdownList name="legacyDeployerDetails"
title="${%Artifactory upload server}">
<j:forEach var="s" items="${descriptor.jfrogInstances}" varStatus="loop">
<f:dropdownListBlock value="${s.instanceId}" title="${s.instanceId} ${s.artifactoryUrl}"
selected="${s.instanceId==instance.legacyDeployerDetails.artifactoryName}">
<f:nested>
<input type="hidden" name="artifactoryName" value="${s.instanceId}"/>
<input type="hidden" name="artifactoryUrl"
id="artifactoryUrlDeploy${s.artifactoryUrl}"
value="${s.artifactoryUrl}"/>
<input type="hidden" name="stapler-class"
value="org.jfrog.hudson.ServerDetails"/>
<r:dynamicRepos id="genericRepositoryKeys-${s.artifactoryUrl}-${uniqueId}"
title="Target Repository"
field="deployReleaseRepository"
repositoryConf="${instance.legacyDeployerDetails.deployReleaseRepository}"
repositories="${instance.releaseRepositoryList}"
helpUrl="/plugin/artifactory/help/common/help-deployRepository.html"/>
<script>
var genericDeployBind =
<st:bind value="${descriptor}"/>
</script>
<r:repos bind="genericDeployBind"
jsFunction="artifactoryGenericConfigurator"
repoUrl="artifactoryUrlDeploy${s.artifactoryUrl}"
credentialsDescriber="overridingDeployerCredentials-generic-${uniqueId}"/>
</f:nested>
</f:dropdownListBlock>
</j:forEach>
</f:dropdownList>
</r:blockWrapper>
<r:credentials configurationFieldName="deployerCredentialsConfig"
configurationObject="${instance.deployerCredentialsConfig}"
blockTitle="Override default deployer credentials"
elementId="overridingDeployerCredentials-generic-${uniqueId}"/>
<f:block>
<r:blockWrapper style="width:100%" id="deployPatternArea-${uniqueId}">
<f:entry title="Published Artifacts" field="deployPattern"
help="/plugin/artifactory/help/common/help-deployPattern.html">
<f:textarea value="${instance.deployPattern}"/>
</f:entry>
<f:entry title="Upload properties" field="deploymentProperties"
help="/plugin/artifactory/help/common/help-deploymentProperties.html">
<f:textbox value="${instance.deploymentProperties}"/>
</f:entry>
</r:blockWrapper>
</f:block>
</j:otherwise>
</j:choose>
</f:block>
<f:block>
<lable style="margin: 10px 0px 5px -10px; line-height: 3; font-size: 1.3em; padding: 10px 15px;
font-weight: bold; box-sizing: border-box;">
Download Details
</lable>
<j:choose>
<j:when test="${useSpecs}">
<f:block>
<r:blockWrapper style="width:100%" id="artifactory-resolver-spec-dd-${uniqueId}">
<f:dropdownList name="specsResolverDetails" title="${%Artifactory download server}">
<j:forEach var="s" items="${descriptor.jfrogInstances}" varStatus="loop">
<f:dropdownListBlock value="${s.instanceId}" title="${s.instanceId} ${s.artifactoryUrl}"
selected="${s.instanceId==instance.specsResolverDetails.artifactoryName}">
<f:nested>
<input type="hidden" name="artifactoryName" value="${s.id}"/>
<input type="hidden" name="artifactoryUrl"
id="artifactoryUrlResolve${s.artifactoryUrl}"
value="${s.artifactoryUrl}"/>
<input type="hidden" name="stapler-class"
value="org.jfrog.hudson.ServerDetails"/>
</f:nested>
</f:dropdownListBlock>
</j:forEach>
</f:dropdownList>
</r:blockWrapper>
</f:block>
<r:credentials configurationFieldName="resolverCredentialsConfig"
configurationObject="${instance.resolverCredentialsConfig}"
blockTitle="Override default download credentials"
elementId="overridingResolverCredentials-generic-${uniqueId}"/>
<f:block>
<r:blockWrapper style="width:100%" id="downloadSpecArea-${uniqueId}">
<f:dropdownList name="downloadSpec" title="${%Download spec source}"
help="/plugin/artifactory/help/common/help-DownloadSpec.html">
<!-- Spec should be selected by default, the selected below maintains it -->
<f:dropdownListBlock value="spec" title="${%Job configuration}"
selected="${instance.downloadSpec.filePath == null}">
<tr>
<td>
<r:blockWrapper style="width:100%" id="downloadSpecArea">
<f:entry title="Spec" field="spec">
<f:textarea value="${instance.downloadSpec.spec}"/>
</f:entry>
</r:blockWrapper>
</td>
</tr>
</f:dropdownListBlock>
<f:dropdownListBlock value="file" title="${%File}"
selected="${instance.downloadSpec.filePath != null}">
<tr>
<td>
<r:blockWrapper style="width:100%" id="DownloadFilePathArea">
<f:entry title="File Path" field="filePath">
<f:textbox value="${instance.downloadSpec.filePath}"/>
</f:entry>
</r:blockWrapper>
</td>
</tr>
</f:dropdownListBlock>
</f:dropdownList>
</r:blockWrapper>
</f:block>
</j:when>
<j:otherwise>
<r:blockWrapper style="width:100%" id="artifactory-resolver-generic-dd-${uniqueId}">
<f:dropdownList name="legacyResolverDetails"
title="${%Artifactory download server}">
<j:forEach var="s" items="${descriptor.jfrogInstances}" varStatus="loop">
<f:dropdownListBlock value="${s.instanceId}" title="${s.instanceId} ${s.artifactoryUrl}"
selected="${s.instanceId==instance.legacyResolverDetails.artifactoryName}">
<f:nested>
<input type="hidden" name="artifactoryName" value="${s.instanceId}"/>
<input type="hidden" name="artifactoryUrl"
id="artifactoryUrlResolve${s.artifactoryUrl}"
value="${s.artifactoryUrl}"/>
<input type="hidden" name="stapler-class"
value="org.jfrog.hudson.ServerDetails"/>
</f:nested>
</f:dropdownListBlock>
</j:forEach>
</f:dropdownList>
</r:blockWrapper>
<r:credentials configurationFieldName="resolverCredentialsConfig"
configurationObject="${instance.resolverCredentialsConfig}"
blockTitle="Override default download credentials"
elementId="overridingResolverCredentials-generic-${uniqueId}"/>
<f:block>
<r:blockWrapper style="width:100%" id="resolvePatternArea-${uniqueId}">
<f:entry title="Download Artifacts" field="resolvePattern"
help="/plugin/artifactory/help/common/help-resolvePattern.html">
<f:textarea value="${instance.resolvePattern}"/>
</f:entry>
</r:blockWrapper>
<st:adjunct includes="lib.jfrog.repos.repos"/>
</f:block>
</j:otherwise>
</j:choose>
</f:block>
<f:section title="More Details">
<f:block>
<r:blockWrapper style="width:100%">
<f:optionalBlock field="overrideBuildName"
help="/plugin/artifactory/help/common/help-overrideBuildName.html"
title="Override build name" inline="true"
checked="${instance.overrideBuildName}">
<f:block>
<f:entry title="Build name" field="customBuildName"
help="/plugin/artifactory/help/common/help-customizedBuildName.html">
<f:textbox value="${instance.customBuildName}"/>
</f:entry>
</f:block>
</f:optionalBlock>
</r:blockWrapper>
</f:block>
<f:block>
<r:blockWrapper style="width:100%">
<f:optionalBlock name="deployBuildInfo" checked="${h.defaultToTrue(instance.deployBuildInfo)}"
title="Capture and publish build info"
help="/plugin/artifactory/help/common/help-deployBuildInfo.html"
inline="true">
<f:optionalBlock name="includeEnvVars" checked="${instance.includeEnvVars}"
title="Include environment variables"
help="/plugin/artifactory/help/common/help-includeEnvVars.html"
inline="true">
<f:block>
<r:blockWrapper style="width:100%">
<j:set var="envVarsPatterns" value="${instance.envVarsPatterns}"/>
<f:section name="envVarsPatterns">
<input type="hidden" name="stapler-class"
value="org.jfrog.hudson.util.IncludesExcludes"/>
<f:entry title="Include Patterns" field="includePatterns"
help="/plugin/artifactory/help/common/help-envVarsIncludePatterns.html">
<f:textbox value="${envVarsPatterns.includePatterns}"/>
</f:entry>
<f:entry title="Exclude Patterns"
field="excludePatterns"
help="/plugin/artifactory/help/common/help-envVarsExcludePatterns.html">
<f:textbox value="${envVarsPatterns.excludePatterns}"
default="*password*,*psw*,*secret*,*key*,*token*"/>
</f:entry>
</f:section>
</r:blockWrapper>
</f:block>
</f:optionalBlock>
<f:optionalBlock name="discardOldBuilds"
checked="${instance.discardOldBuilds}"
title="Discard old builds from Artifactory (requires Artifactory Pro)"
inline="true"
help="/plugin/artifactory/help/common/help-discardBuilds.html">
<f:entry field="discardBuildArtifacts"
help="/plugin/artifactory/help/common/help-discardBuildArtifacts.html">
<f:checkbox default="true" checked="${instance.discardBuildArtifacts}"/>
<label class="attach-previous">${%Discard build artifacts}</label>
</f:entry>
<f:entry field="asyncBuildRetention"
help="/plugin/artifactory/help/common/help-asyncBuildRetention.html">
<f:checkbox default="false" checked="${instance.asyncBuildRetention}"/>
<label class="attach-previous">${%Async}</label>
</f:entry>
</f:optionalBlock>
<f:optionalBlock>
<r:blockWrapper style="width:100%">
<f:entry title="Project" field="project"
help="/plugin/artifactory/help/common/help-project.html">
<f:textbox value="${instance.project}"/>
</f:entry>
</r:blockWrapper>
</f:optionalBlock>
</f:optionalBlock>
</r:blockWrapper>
</f:block>
<f:block>
<j:if test="${descriptor.isMultiConfProject()}">
<f:block>
<r:blockWrapper style="width:100%">
<f:optionalBlock name="multiConfProject"
checked="${instance.multiConfProject == null || instance.multiConfProject}"
title="${%Multi Configuration Upload Matcher}"
inline="true">
<f:entry field="artifactoryCombinationFilter" title="${%Combination Matches}"
description="Groovy expression"
help="/plugin/artifactory/help/common/help-combinationFilter.html">
<f:textbox value="${instance.artifactoryCombinationFilter}"
field="artifactoryCombinationFilter"/>
</f:entry>
</f:optionalBlock>
</r:blockWrapper>
</f:block>
</j:if>
</f:block>
</f:section>
</f:section>
<f:block>
<hr/>
</f:block>
</j:jelly>