Skip to content

Commit

Permalink
[INFRA-1176] Using repo.azure.jenkins.io as a mirror for CI builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed May 18, 2017
1 parent a8994d4 commit 82db76d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def runTests = true
def failFast = false

// Only keep the 10 most recent builds.
properties([[$class: 'jenkins.model.BuildDiscarderProperty', strategy: [$class: 'LogRotator',
numToKeepStr: '50',
artifactNumToKeepStr: '20']]])
properties([buildDiscarder(logRotator(numToKeepStr: '50', artifactNumToKeepStr: '20'))])

// see https://github.com/jenkins-infra/documentation/blob/master/ci.adoc for information on what node types are available
def buildTypes = ['Linux', 'Windows']
Expand All @@ -42,7 +40,7 @@ for(i = 0; i < buildTypes.size(); i++) {
"MAVEN_OPTS=-Xmx1536m -Xms512m"]) {
// Actually run Maven!
// -Dmaven.repo.local=… tells Maven to create a subdir in the temporary directory for the local Maven repository
def mvnCmd = "mvn -Pdebug -U clean install javadoc:javadoc ${runTests ? '-Dmaven.test.failure.ignore=true' : '-DskipTests'} -V -B -Dmaven.repo.local=${pwd tmp: true}/m2repo"
def mvnCmd = "mvn -Pdebug -U clean install javadoc:javadoc ${runTests ? '-Dmaven.test.failure.ignore' : '-DskipTests'} -V -B -Dmaven.repo.local=${pwd tmp: true}/m2repo -s settings-azure.xml"
if(isUnix()) {
sh mvnCmd
sh 'test `git status --short | tee /dev/stderr | wc --bytes` -eq 0'
Expand Down
9 changes: 9 additions & 0 deletions settings-azure.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<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>azure</id>
<url>https://repo.azure.jenkins.io/public/</url> <!-- INFRA-1176 -->
<mirrorOf>repo.jenkins-ci.org</mirrorOf>
</mirror>
</mirrors>
</settings>

0 comments on commit 82db76d

Please sign in to comment.