diff --git a/.github/gradle/central-mirror.init.gradle b/.github/gradle/central-mirror.init.gradle index ae31aebc6fe..ae4d2fd1be7 100644 --- a/.github/gradle/central-mirror.init.gradle +++ b/.github/gradle/central-mirror.init.gradle @@ -18,7 +18,9 @@ // a 404, so plugins that only the portal hosts still resolve. // // The Gradle steps in validation.yml and warm-caches.yml pass it with -// --init-script. The functionalTest task in flow-gradle-plugin/build.gradle +// --init-script. The unit-tests job in validation.yml copies it to +// ~/.gradle/init.d instead, as there exec-maven-plugin starts the +// flow-gradle-plugin build and cannot pass it. The functionalTest task in flow-gradle-plugin/build.gradle // hands this script on to the nested TestKit builds, which run under a Gradle // user home of their own and so would not see a script in ~/.gradle/init.d. // It finds the script among the outer build's init scripts by its file name, diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 07e7d836f4b..3eef2d289b6 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -196,6 +196,15 @@ jobs: ./scripts/computeMatrix.js set-version --version=999.99-SNAPSHOT cmd="mvn install -B -ntp -DskipTests -pl \!flow-plugins/flow-gradle-plugin" eval $cmd -T 2C -q || eval $cmd + - name: Route Gradle through the Central mirror + # The matrix job that includes flow-gradle-plugin builds it through + # exec-maven-plugin, which runs Gradle without --init-script and with + # an empty Gradle home, so the plugin resolution goes to Central via + # the Plugin Portal and fails with 429. A script in ~/.gradle/init.d + # reaches that Gradle run as well. + run: | + mkdir -p ~/.gradle/init.d + cp .github/gradle/central-mirror.init.gradle ~/.gradle/init.d/ - name: Unit Test run: | echo Running TESTS: ${{ strategy.job-index }} ${{matrix.module}} ${{ matrix.args }}