-
-
Notifications
You must be signed in to change notification settings - Fork 108
/
artifact-caching-proxy.yaml.erb
58 lines (58 loc) · 2.8 KB
/
artifact-caching-proxy.yaml.erb
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
<%- if @jcasc['artifact_caching_proxy'] && @jcasc['artifact_caching_proxy']['disabled'].to_s != "true" -%>
unclassified:
globalConfigFiles:
configs:
<%- @jcasc['artifact_caching_proxy']['providers'].each do |providerId, provider| -%>
- mavenSettings:
comment: "Artifact caching proxy settings for the <%= provider['name'] %> provider"
content: |
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id><%= providerId %>-proxy</id>
<url>https://repo.<%= providerId %>.jenkins.io/public/</url>
<mirrorOf>external:*,!central,!incrementals,!chimera-releases,!chimera-snapshots,!atlassian-public,!org.zowe.sdk,!jitpack.io,!space-maven</mirrorOf>
</mirror>
<mirror>
<id><%= providerId %>-proxy-incrementals</id>
<url>https://repo.<%= providerId %>.jenkins.io/incrementals/</url>
<mirrorOf>incrementals</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>jenkins-infra-plugin-repositories</id>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>incrementals</id>
<url>https://repo.jenkins-ci.org/incrementals/</url>
</pluginRepository>
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>jenkins-infra-plugin-repositories</activeProfile>
</activeProfiles>
</settings>
id: "artifact-caching-proxy-<%= providerId %>"
isReplaceAll: true
name: "<%= provider['name'] %> Artifact Caching Proxy"
providerId: "org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig"
serverCredentialMappings:
- credentialsId: "<%= @jcasc['artifact_caching_proxy']['credentialsId'] %>"
serverId: "<%= providerId %>-proxy"
- credentialsId: "<%= @jcasc['artifact_caching_proxy']['credentialsId'] %>"
serverId: "<%= providerId %>-proxy-incrementals"
<%- end -%>
<%- end -%>