Skip to content

Commit

Permalink
Merge pull request #1603 from jenkins-infra/dduportal-patch-1
Browse files Browse the repository at this point in the history
fix(ubuntu/windows) avoid tragedy of commons goods: use `dlcdn` apache download server for Maven
  • Loading branch information
dduportal authored Dec 17, 2024
2 parents 173079e + 781d782 commit efdd950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion provisioning/ubuntu-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ function install_sops(){
## Ensure that maven is installed and configured (version from environment)
function install_maven() {
curl --fail --silent --location --show-error --output "/tmp/apache-maven-${MAVEN_VERSION}-bin.tar.gz" \
"https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz"
"https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz"

tar --extract --gunzip --file="/tmp/apache-maven-${MAVEN_VERSION}-bin.tar.gz" --directory=/usr/share/
ln -s "/usr/share/apache-maven-${MAVEN_VERSION}/bin/mvn" /usr/bin/mvn
Expand Down
2 changes: 1 addition & 1 deletion provisioning/windows-provision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ $downloads = [ordered]@{
'cleanupLocal' = 'true';
}
'maven' = @{
'url' = 'https://archive.apache.org/dist/maven/maven-3/{0}/binaries/apache-maven-{0}-bin.zip' -f $env:MAVEN_VERSION;
'url' = 'https://dlcdn.apache.org/maven/maven-3/{0}/binaries/apache-maven-{0}-bin.zip' -f $env:MAVEN_VERSION;
'local' = "$baseDir\maven.zip";
'expandTo' = $baseDir;
'path' = '{0}\apache-maven-{1}\bin' -f $baseDir,$env:MAVEN_VERSION;
Expand Down

0 comments on commit efdd950

Please sign in to comment.