Skip to content

Commit 15afb32

Browse files
committed
enable mirroring via artifactory?
1 parent 10c4ba2 commit 15afb32

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

attributes/default.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
default['repos']['private']['pr-snap'] = "https://#{scalaCiHost}/artifactory/scala-pr-validation-snapshots/"
1515
default['repos']['private']['release-temp'] = "https://#{scalaCiHost}/artifactory/scala-release-temp/"
1616

17+
default['repos']['caching-proxy']['mirrorOf'] = "central" # TODO: add ",sonatype.release,sonatype.snapshot"
18+
default['repos']['caching-proxy']['url'] = "https://#{scalaCiHost}/artifactory/jcenter/"
19+
1720
default['s3']['downloads']['host'] = "downloads.typesafe.com.s3.amazonaws.com"
1821

1922
# attributes only needed on jenkins-master

templates/default/m2-settings-public-jobs.xml.erb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
I don't know how to encode a fall back, but I assume it's not needed as this is ~jenkins/.m2/settings.xml
88
-->
99
<localRepository>${WORKSPACE}/m2repo</localRepository>
10+
1011
<servers>
1112
<server>
1213
<id>pr-scala</id>
1314
<username><%= @privateRepoUser %></username>
1415
<password><%= @privateRepoPass %></password>
1516
</server>
1617
</servers>
18+
1719
<profiles>
1820
<profile>
1921
<id>pr-scala</id> <!-- for IDE integration, I think -->
@@ -31,4 +33,14 @@
3133
</repositories>
3234
</profile>
3335
</profiles>
36+
37+
<mirrors>
38+
<mirror>
39+
<id>caching-proxy</id>
40+
<name>Scala CI Artifactory</name>
41+
<url><%=node['repos']['caching-proxy']['url']%></url>
42+
<mirrorOf><%=node['repos']['caching-proxy']['mirrorOf']%></mirrorOf>
43+
</mirror>
44+
</mirrors>
45+
3446
</settings>

templates/default/m2-settings.xml.erb

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
I don't know how to encode a fall back, but I assume it's not needed as this is ~jenkins/.m2/settings.xml
88
-->
99
<localRepository>${WORKSPACE}/m2repo</localRepository>
10+
1011
<servers>
1112
<server>
1213
<id>sonatype-nexus</id>
@@ -24,12 +25,14 @@
2425
<password></password>
2526
</server> -->
2627
</servers>
27-
<!-- <mirrors>
28-
<mirror>
29-
<id>mirror</id>
30-
<mirrorOf>central,sonatype.release,sonatype.snapshot</mirrorOf>
31-
<name>Moxie Mirror of External Public repositories</name>
32-
<url>https://maven-mirror.typesafe.com:8497/nexus/content/groups/everything</url>
33-
</mirror>
34-
</mirrors> -->
28+
29+
<mirrors>
30+
<mirror>
31+
<id>caching-proxy</id>
32+
<name>Scala CI Artifactory</name>
33+
<url><%=node['repos']['caching-proxy']['url']%></url>
34+
<mirrorOf><%=node['repos']['caching-proxy']['mirrorOf']%></mirrorOf>
35+
</mirror>
36+
</mirrors>
37+
3538
</settings>

0 commit comments

Comments
 (0)