Skip to content

Commit 25a2805

Browse files
authored
Revert inline Maven mirror (now in gh-automation#95) (#1104)
* Revert inline mirror — central config lives in gh-automation now The Maven Artifactory mirror configuration that this repo carried inline (s4u/maven-settings-action + REWRITE_GRADLE_MIRROR_* env vars) has been moved to the shared reusable workflows in openrewrite/gh-automation (#95). Restoring the thin-caller form so this repo picks up the central configuration automatically and benefits from any future updates to it. No behavioral change: callers of the reusable workflow continue to route Maven resolution through artifactory.moderne.ninja's moderne-cache-3. * Pass artifactory_* secrets to the reusable workflow These authenticate the Maven mirror at artifactory.moderne.ninja so its virtual-repo iteration can traverse all backing repos. When the secrets aren't set on the repo (or org), this is a no-op — the mirror is consulted anonymously, which is sufficient for any artifact present in the anonymous-readable backing repos. * Apply suggestion from @Jenson3210
1 parent 17c73bd commit 25a2805

2 files changed

Lines changed: 27 additions & 92 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,17 @@ concurrency:
2020

2121
jobs:
2222
build:
23-
runs-on: ubuntu-latest
24-
if: github.event_name != 'schedule' || github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc'
25-
steps:
26-
- uses: openrewrite/gh-automation/.github/actions/setup@main
27-
with:
28-
java_version: |
29-
25
30-
21
31-
develocity_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
32-
33-
# Route Maven resolution through Moderne's Artifactory cache to avoid
34-
# Maven Central rate-limiting (HTTP 429) under parallel test load.
35-
- uses: s4u/maven-settings-action@v4.0.0
36-
with:
37-
mirrors: '[{"id": "moderne-cache", "name": "Moderne Artifactory Cache", "mirrorOf": "*", "url": "https://artifactory.moderne.ninja/artifactory/moderne-cache-3/"}]'
38-
servers: ${{ secrets.ARTIFACTORY_USERNAME != '' && format('[{{"id":"moderne-cache","username":"{0}","password":"{1}"}}]', secrets.ARTIFACTORY_USERNAME, secrets.ARTIFACTORY_PASSWORD) || '[]' }}
39-
40-
- uses: openrewrite/gh-automation/.github/actions/build@main
41-
env:
42-
REWRITE_GRADLE_MIRROR_URL: https://artifactory.moderne.ninja/artifactory/moderne-cache-3/
43-
REWRITE_GRADLE_MIRROR_USERNAME: ${{ secrets.AST_PUBLISH_USERNAME }}
44-
REWRITE_GRADLE_MIRROR_PASSWORD: ${{ secrets.AST_PUBLISH_PASSWORD }}
45-
46-
- if: failure() && github.event_name == 'schedule' && (github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc')
47-
uses: openrewrite/gh-automation/.github/actions/slack-failure@main
48-
with:
49-
webhook: ${{ secrets.OPS_GITHUB_ACTIONS_WEBHOOK }}
50-
51-
- if: >
52-
github.event_name != 'pull_request' &&
53-
github.ref == 'refs/heads/main' &&
54-
(github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc')
55-
uses: openrewrite/gh-automation/.github/actions/publish-snapshots@main
56-
with:
57-
sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
58-
sonatype_token: ${{ secrets.SONATYPE_TOKEN }}
59-
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
60-
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
23+
uses: openrewrite/gh-automation/.github/workflows/ci-gradle.yml@main
24+
with:
25+
java_version: |
26+
25
27+
21
28+
secrets:
29+
gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
30+
sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
31+
sonatype_token: ${{ secrets.SONATYPE_TOKEN}}
32+
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
33+
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
34+
artifactory_username: ${{ secrets.ARTIFACTORY_USERNAME }}
35+
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
36+
OPS_GITHUB_ACTIONS_WEBHOOK: ${{ secrets.OPS_GITHUB_ACTIONS_WEBHOOK }}

.github/workflows/publish.yml

Lines changed: 13 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,59 +11,18 @@ concurrency:
1111
group: publish-${{ github.ref }}
1212
cancel-in-progress: false
1313

14-
env:
15-
GRADLE_SWITCHES: --console=plain --info --stacktrace --warning-mode=all --no-daemon
16-
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
17-
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_TOKEN }}
18-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_SIGNING_KEY }}
19-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
20-
2114
jobs:
2215
release:
23-
runs-on: ubuntu-latest
24-
steps:
25-
- uses: openrewrite/gh-automation/.github/actions/setup@main
26-
with:
27-
java_version: |
28-
25
29-
21
30-
develocity_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
31-
32-
# Route Maven resolution through Moderne's Artifactory cache to avoid
33-
# Maven Central rate-limiting (HTTP 429) under parallel test load.
34-
- uses: s4u/maven-settings-action@v4.0.0
35-
with:
36-
mirrors: '[{"id": "moderne-cache", "name": "Moderne Artifactory Cache", "mirrorOf": "*", "url": "https://artifactory.moderne.ninja/artifactory/moderne-cache-3/"}]'
37-
servers: ${{ secrets.ARTIFACTORY_USERNAME != '' && format('[{{"id":"moderne-cache","username":"{0}","password":"{1}"}}]', secrets.ARTIFACTORY_USERNAME, secrets.ARTIFACTORY_PASSWORD) || '[]' }}
38-
39-
- name: publish-candidate
40-
if: contains(github.ref, '-rc.')
41-
env:
42-
REWRITE_GRADLE_MIRROR_URL: https://artifactory.moderne.ninja/artifactory/moderne-cache-3/
43-
REWRITE_GRADLE_MIRROR_USERNAME: ${{ secrets.AST_PUBLISH_USERNAME }}
44-
REWRITE_GRADLE_MIRROR_PASSWORD: ${{ secrets.AST_PUBLISH_PASSWORD }}
45-
run: |
46-
./gradlew \
47-
${{ env.GRADLE_SWITCHES }} \
48-
-Preleasing \
49-
-Prelease.disableGitChecks=true \
50-
-Prelease.useLastTag=true \
51-
candidate \
52-
publish \
53-
closeAndReleaseSonatypeStagingRepository
54-
55-
- name: publish-release
56-
if: (!contains(github.ref, '-rc.'))
57-
env:
58-
REWRITE_GRADLE_MIRROR_URL: https://artifactory.moderne.ninja/artifactory/moderne-cache-3/
59-
REWRITE_GRADLE_MIRROR_USERNAME: ${{ secrets.AST_PUBLISH_USERNAME }}
60-
REWRITE_GRADLE_MIRROR_PASSWORD: ${{ secrets.AST_PUBLISH_PASSWORD }}
61-
run: |
62-
./gradlew \
63-
${{ env.GRADLE_SWITCHES }} \
64-
-Preleasing \
65-
-Prelease.disableGitChecks=true \
66-
-Prelease.useLastTag=true \
67-
final \
68-
publish \
69-
closeAndReleaseSonatypeStagingRepository
16+
uses: openrewrite/gh-automation/.github/workflows/publish-gradle.yml@main
17+
with:
18+
java_version: |
19+
25
20+
21
21+
secrets:
22+
gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
23+
sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
24+
sonatype_token: ${{ secrets.SONATYPE_TOKEN}}
25+
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
26+
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
27+
artifactory_username: ${{ secrets.ARTIFACTORY_USERNAME }}
28+
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}

0 commit comments

Comments
 (0)