Skip to content

Commit

Permalink
Merge pull request #644 from dlorenc/mvn
Browse files Browse the repository at this point in the history
Add a maven/configure-mirror pipeline to redirect to GCP.
  • Loading branch information
dlorenc authored Sep 1, 2023
2 parents ec726bf + 68faa72 commit 87cade4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkg/build/pipelines/maven/configure-mirror.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Configure GCP Maven Central mirror for faster downloads
needs:
packages:
- busybox
pipeline:
runs: |
# Maven checks $USER/.m2, we set $HOME to /home/build but it hardcodes $USER somehow
mkdir -p /root/.m2
cat > /root/.m2/settings.xml <<EOF
<settings>
<mirrors>
<mirror>
<id>google-maven-central</id>
<name>GCS Maven Central mirror</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>
EOF

0 comments on commit 87cade4

Please sign in to comment.