diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /taskcluster/scripts/misc/android-gradle-dependencies | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/scripts/misc/android-gradle-dependencies')
3 files changed, 473 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/android-gradle-dependencies/after.sh b/taskcluster/scripts/misc/android-gradle-dependencies/after.sh new file mode 100755 index 0000000000..9943cf2c41 --- /dev/null +++ b/taskcluster/scripts/misc/android-gradle-dependencies/after.sh @@ -0,0 +1,30 @@ +#!/bin/bash -vex + +set -x -e + +echo "running as" $(id) + +: WORKSPACE ${WORKSPACE:=/builds/worker/workspace} + +set -v + +# Package everything up. +pushd $WORKSPACE +mkdir -p android-gradle-dependencies /builds/worker/artifacts + +# NEXUS_WORK is exported by `before.sh`. +cp -R ${NEXUS_WORK}/storage/mozilla android-gradle-dependencies +cp -R ${NEXUS_WORK}/storage/central android-gradle-dependencies +cp -R ${NEXUS_WORK}/storage/google android-gradle-dependencies +cp -R ${NEXUS_WORK}/storage/gradle-plugins android-gradle-dependencies + +# The Gradle wrapper will have downloaded and verified the hash of exactly one +# Gradle distribution. It will be located in $GRADLE_USER_HOME, like +# ~/.gradle/wrapper/dists/gradle-8.5-bin/$PROJECT_HASH/gradle-8.5. We +# want to remove the version from the internal directory for use via tooltool in +# a mozconfig. +cp -a ${GRADLE_USER_HOME}/wrapper/dists/gradle-*-*/*/gradle-*/ android-gradle-dependencies/gradle-dist + +tar cavf /builds/worker/artifacts/android-gradle-dependencies.tar.zst android-gradle-dependencies + +popd diff --git a/taskcluster/scripts/misc/android-gradle-dependencies/before.sh b/taskcluster/scripts/misc/android-gradle-dependencies/before.sh new file mode 100755 index 0000000000..7150731d73 --- /dev/null +++ b/taskcluster/scripts/misc/android-gradle-dependencies/before.sh @@ -0,0 +1,30 @@ +#!/bin/bash -vex + +set -x -e + +echo "running as" $(id) + +: WORKSPACE ${WORKSPACE:=/builds/worker/workspace} + +set -v + +# Export NEXUS_WORK so that `after.sh` can use it. +export NEXUS_WORK=/builds/worker/workspace/sonatype-nexus-work +mkdir -p ${NEXUS_WORK}/conf +cp /builds/worker/workspace/build/src/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml ${NEXUS_WORK}/conf/nexus.xml + +RUN_AS_USER=worker $MOZ_FETCHES_DIR/sonatype-nexus/bin/nexus restart + +# Wait "a while" for Nexus to actually start. Don't fail if this fails. +wget --quiet --retry-connrefused --waitretry=2 --tries=100 \ + http://localhost:8081/nexus/service/local/status || true +rm -rf status + +# It's helpful when debugging to see the "latest state". +curl http://localhost:8081/nexus/service/local/status || true + +# Verify Nexus has actually started. Fail if this fails. +curl --fail --silent --location http://localhost:8081/nexus/service/local/status | grep '<state>STARTED</state>' + +# It's helpful when debugging to see the repository configurations. +curl http://localhost:8081/nexus/service/local/repositories || true diff --git a/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml b/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml new file mode 100644 index 0000000000..e3e37373d8 --- /dev/null +++ b/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml @@ -0,0 +1,413 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<nexusConfiguration> + <version>2.8.0</version> + <nexusVersion>2.12.0-01</nexusVersion> + <globalConnectionSettings> + <connectionTimeout>20000</connectionTimeout> + <retrievalRetryCount>3</retrievalRetryCount> + <queryString></queryString> + </globalConnectionSettings> + <restApi> + <uiTimeout>60000</uiTimeout> + </restApi> + <httpProxy> + <enabled>true</enabled> + <port>8082</port> + <proxyPolicy>strict</proxyPolicy> + </httpProxy> + <routing> + <resolveLinks>true</resolveLinks> + </routing> + <repositories> + <repository> + <id>mozilla</id> + <name>Mozilla Maven</name> + <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheActive>true</notFoundCacheActive> + <notFoundCacheTTL>1440</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>READ_ONLY</writePolicy> + <indexable>true</indexable> + <searchable>true</searchable> + <localStorage> + <provider>file</provider> + </localStorage> + <remoteStorage> + <url>https://maven.mozilla.org/maven2/</url> + </remoteStorage> + <externalConfiguration> + <repositoryPolicy>RELEASE</repositoryPolicy> + <checksumPolicy>STRICT</checksumPolicy> + <fileTypeValidation>true</fileTypeValidation> + <downloadRemoteIndex>false</downloadRemoteIndex> + <artifactMaxAge>-1</artifactMaxAge> + <metadataMaxAge>1440</metadataMaxAge> + <itemMaxAge>1440</itemMaxAge> + <autoBlockActive>true</autoBlockActive> + </externalConfiguration> + </repository> + <repository> + <id>gradle-plugins</id> + <name>Gradle Plugins</name> + <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheActive>true</notFoundCacheActive> + <notFoundCacheTTL>1440</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>READ_ONLY</writePolicy> + <indexable>true</indexable> + <searchable>true</searchable> + <localStorage> + <provider>file</provider> + </localStorage> + <remoteStorage> + <url>https://plugins.gradle.org/m2/</url> + </remoteStorage> + <externalConfiguration> + <repositoryPolicy>RELEASE</repositoryPolicy> + <checksumPolicy>STRICT</checksumPolicy> + <fileTypeValidation>true</fileTypeValidation> + <downloadRemoteIndex>false</downloadRemoteIndex> + <artifactMaxAge>-1</artifactMaxAge> + <metadataMaxAge>1440</metadataMaxAge> + <itemMaxAge>1440</itemMaxAge> + <autoBlockActive>true</autoBlockActive> + </externalConfiguration> + </repository> + <repository> + <id>google</id> + <name>google</name> + <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheActive>true</notFoundCacheActive> + <notFoundCacheTTL>1440</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>READ_ONLY</writePolicy> + <indexable>true</indexable> + <searchable>true</searchable> + <localStorage> + <provider>file</provider> + </localStorage> + <remoteStorage> + <url>https://maven.google.com/</url> + </remoteStorage> + <externalConfiguration> + <repositoryPolicy>RELEASE</repositoryPolicy> + <!-- Google doesn't publish checksums. Why, Google, why? --> + <checksumPolicy>STRICT_IF_EXISTS</checksumPolicy> + <fileTypeValidation>true</fileTypeValidation> + <downloadRemoteIndex>false</downloadRemoteIndex> + <artifactMaxAge>-1</artifactMaxAge> + <metadataMaxAge>1440</metadataMaxAge> + <itemMaxAge>1440</itemMaxAge> + <autoBlockActive>true</autoBlockActive> + </externalConfiguration> + </repository> + <repository> + <id>central</id> + <name>Central</name> + <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheActive>true</notFoundCacheActive> + <notFoundCacheTTL>1440</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>READ_ONLY</writePolicy> + <indexable>true</indexable> + <searchable>true</searchable> + <localStorage> + <provider>file</provider> + </localStorage> + <remoteStorage> + <url>https://repo1.maven.org/maven2/</url> + </remoteStorage> + <externalConfiguration> + <proxyMode>ALLOW</proxyMode> + <artifactMaxAge>-1</artifactMaxAge> + <itemMaxAge>1440</itemMaxAge> + <cleanseRepositoryMetadata>false</cleanseRepositoryMetadata> + <downloadRemoteIndex>false</downloadRemoteIndex> + <checksumPolicy>WARN</checksumPolicy> + <repositoryPolicy>RELEASE</repositoryPolicy> + </externalConfiguration> + </repository> + <repository> + <id>apache-snapshots</id> + <name>Apache Snapshots</name> + <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheActive>true</notFoundCacheActive> + <notFoundCacheTTL>1440</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>READ_ONLY</writePolicy> + <indexable>true</indexable> + <searchable>true</searchable> + <localStorage> + <provider>file</provider> + </localStorage> + <remoteStorage> + <url>https://repository.apache.org/snapshots/</url> + </remoteStorage> + <externalConfiguration> + <proxyMode>ALLOW</proxyMode> + <artifactMaxAge>1440</artifactMaxAge> + <itemMaxAge>1440</itemMaxAge> + <cleanseRepositoryMetadata>false</cleanseRepositoryMetadata> + <downloadRemoteIndex>false</downloadRemoteIndex> + <checksumPolicy>WARN</checksumPolicy> + <repositoryPolicy>SNAPSHOT</repositoryPolicy> + </externalConfiguration> + </repository> + <repository> + <id>releases</id> + <name>Releases</name> + <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheTTL>1440</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>ALLOW_WRITE_ONCE</writePolicy> + <indexable>true</indexable> + <searchable>true</searchable> + <localStorage> + <provider>file</provider> + </localStorage> + <externalConfiguration> + <proxyMode>ALLOW</proxyMode> + <artifactMaxAge>-1</artifactMaxAge> + <itemMaxAge>1440</itemMaxAge> + <cleanseRepositoryMetadata>false</cleanseRepositoryMetadata> + <downloadRemoteIndex>false</downloadRemoteIndex> + <checksumPolicy>WARN</checksumPolicy> + <repositoryPolicy>RELEASE</repositoryPolicy> + </externalConfiguration> + </repository> + <repository> + <id>snapshots</id> + <name>Snapshots</name> + <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheTTL>1440</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>ALLOW_WRITE</writePolicy> + <indexable>true</indexable> + <searchable>true</searchable> + <localStorage> + <provider>file</provider> + </localStorage> + <externalConfiguration> + <proxyMode>ALLOW</proxyMode> + <artifactMaxAge>1440</artifactMaxAge> + <itemMaxAge>1440</itemMaxAge> + <cleanseRepositoryMetadata>false</cleanseRepositoryMetadata> + <downloadRemoteIndex>false</downloadRemoteIndex> + <checksumPolicy>WARN</checksumPolicy> + <repositoryPolicy>SNAPSHOT</repositoryPolicy> + </externalConfiguration> + </repository> + <repository> + <id>thirdparty</id> + <name>3rd party</name> + <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheTTL>1440</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>ALLOW_WRITE_ONCE</writePolicy> + <indexable>true</indexable> + <searchable>true</searchable> + <localStorage> + <provider>file</provider> + </localStorage> + <externalConfiguration> + <proxyMode>ALLOW</proxyMode> + <artifactMaxAge>-1</artifactMaxAge> + <itemMaxAge>1440</itemMaxAge> + <cleanseRepositoryMetadata>false</cleanseRepositoryMetadata> + <downloadRemoteIndex>false</downloadRemoteIndex> + <checksumPolicy>WARN</checksumPolicy> + <repositoryPolicy>RELEASE</repositoryPolicy> + </externalConfiguration> + </repository> + <repository> + <id>central-m1</id> + <name>Central M1 shadow</name> + <providerRole>org.sonatype.nexus.proxy.repository.ShadowRepository</providerRole> + <providerHint>m2-m1-shadow</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheTTL>15</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>READ_ONLY</writePolicy> + <localStorage> + <provider>file</provider> + </localStorage> + <externalConfiguration> + <masterRepositoryId>central</masterRepositoryId> + <syncAtStartup>false</syncAtStartup> + </externalConfiguration> + </repository> + <repository> + <id>public</id> + <name>Public Repositories</name> + <providerRole>org.sonatype.nexus.proxy.repository.GroupRepository</providerRole> + <providerHint>maven2</providerHint> + <localStatus>IN_SERVICE</localStatus> + <notFoundCacheTTL>15</notFoundCacheTTL> + <userManaged>true</userManaged> + <exposed>true</exposed> + <browseable>true</browseable> + <writePolicy>READ_ONLY</writePolicy> + <indexable>true</indexable> + <localStorage> + <provider>file</provider> + </localStorage> + <externalConfiguration> + <mergeMetadata>true</mergeMetadata> + <memberRepositories> + <memberRepository>releases</memberRepository> + <memberRepository>snapshots</memberRepository> + <memberRepository>thirdparty</memberRepository> + <memberRepository>central</memberRepository> + </memberRepositories> + </externalConfiguration> + </repository> + </repositories> + <repositoryGrouping> + <pathMappings> + <pathMapping> + <id>inhouse-stuff</id> + <groupId>*</groupId> + <routeType>inclusive</routeType> + <routePatterns> + <routePattern>^/(com|org)/somecompany/.*</routePattern> + </routePatterns> + <repositories> + <repository>snapshots</repository> + <repository>releases</repository> + </repositories> + </pathMapping> + <pathMapping> + <id>apache-stuff</id> + <groupId>*</groupId> + <routeType>exclusive</routeType> + <routePatterns> + <routePattern>^/org/some-oss/.*</routePattern> + </routePatterns> + <repositories> + <repository>releases</repository> + <repository>snapshots</repository> + </repositories> + </pathMapping> + </pathMappings> + </repositoryGrouping> + <repositoryTargets> + <repositoryTarget> + <id>1</id> + <name>All (Maven2)</name> + <contentClass>maven2</contentClass> + <patterns> + <pattern>.*</pattern> + </patterns> + </repositoryTarget> + <repositoryTarget> + <id>2</id> + <name>All (Maven1)</name> + <contentClass>maven1</contentClass> + <patterns> + <pattern>.*</pattern> + </patterns> + </repositoryTarget> + <repositoryTarget> + <id>3</id> + <name>All but sources (Maven2)</name> + <contentClass>maven2</contentClass> + <patterns> + <pattern>(?!.*-sources.*).*</pattern> + </patterns> + </repositoryTarget> + <repositoryTarget> + <id>4</id> + <name>All Metadata (Maven2)</name> + <contentClass>maven2</contentClass> + <patterns> + <pattern>.*maven-metadata\.xml.*</pattern> + </patterns> + </repositoryTarget> + <repositoryTarget> + <id>any</id> + <name>All (Any Repository)</name> + <contentClass>any</contentClass> + <patterns> + <pattern>.*</pattern> + </patterns> + </repositoryTarget> + <repositoryTarget> + <id>site</id> + <name>All (site)</name> + <contentClass>site</contentClass> + <patterns> + <pattern>.*</pattern> + </patterns> + </repositoryTarget> + <repositoryTarget> + <id>npm</id> + <name>All (npm)</name> + <contentClass>npm</contentClass> + <patterns> + <pattern>.*</pattern> + </patterns> + </repositoryTarget> + <repositoryTarget> + <id>nuget</id> + <name>All (nuget)</name> + <contentClass>nuget</contentClass> + <patterns> + <pattern>.*</pattern> + </patterns> + </repositoryTarget> + <repositoryTarget> + <id>rubygems</id> + <name>All (rubygems)</name> + <contentClass>rubygems</contentClass> + <patterns> + <pattern>.*</pattern> + </patterns> + </repositoryTarget> + </repositoryTargets> + <smtpConfiguration> + <hostname>smtp-host</hostname> + <port>25</port> + <username>smtp-username</username> + <password>{jyU2gDFaNz8HQ4ybBAIdtJ6KL+YB08GXQs7vLPnia3o=}</password> + <systemEmailAddress>system@nexus.org</systemEmailAddress> + </smtpConfiguration> + <notification /> +</nexusConfiguration> |