File tree Expand file tree Collapse file tree 5 files changed +47
-0
lines changed Expand file tree Collapse file tree 5 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,15 @@ jobs:
2121 - name : Checkstyle
2222 uses : gradle/gradle-build-action@v2
2323 with :
24+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2425 arguments : checkstyleMain checkstyleTest
2526 - name : PMD
2627 uses : gradle/gradle-build-action@v2
2728 with :
29+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2830 arguments : pmdMain pmdTest
2931 - name : Test
3032 uses : gradle/gradle-build-action@v2
3133 with :
34+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3235 arguments : test
Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ jobs:
2323 - name : Build sourcesJar and javadocJar
2424 uses : gradle/gradle-build-action@v2
2525 with :
26+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2627 arguments : sourcesJar javadocJar
2728 - name : Publish to MavenCentral
2829 uses : gradle/gradle-build-action@v2
2930 with :
31+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3032 arguments : publishMavenPublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
3133 env :
3234 OSSRH_USERNAME : ${{ secrets.MAVEN_USERNAME }}
Original file line number Diff line number Diff line change 1+ org.gradle.caching =true
2+ org.gradle.parallel =true
Original file line number Diff line number Diff line change 1+ def fetchToken () {
2+ String token = System . getenv(" CODEARTIFACT_AUTH_TOKEN" )
3+ if (token == null || System . getenv(" CI" ) == null ) {
4+ token = """ aws codeartifact get-authorization-token
5+ --profile production/developer
6+ --domain getyourguide
7+ --domain-owner 130607246975
8+ --query authorizationToken
9+ --output text""" . execute(). onExit(). get(). text
10+ }
11+ if (token == null || token. isEmpty()) {
12+ throw new RuntimeException (" Error getting codeartifact token. Please call `gygauth setup` in cli and try again." )
13+ }
14+ println (" Use codeartifact token: " + token. substring(0 , 10 ) + " ..." )
15+ return token
16+ }
17+
18+ ext {
19+ fetchToken = this . &fetchToken
20+ }
Original file line number Diff line number Diff line change 1+ pluginManagement {
2+ apply from : " $rootDir /gradle/token-utils.gradle"
3+ def token = fetchToken()
4+ repositories {
5+ maven {
6+ name " codeartifact"
7+ url " https://getyourguide-130607246975.d.codeartifact.eu-central-1.amazonaws.com/maven/private/"
8+ credentials {
9+ username " aws"
10+ password " $token "
11+ }
12+ }
13+ gradlePluginPortal()
14+ }
15+ }
16+
17+ plugins {
18+ id ' com.getyourguide.libs.gradle.develocity.configuration' version ' 4.9.2'
19+ }
20+
121rootProject. name = ' openapi-validation'
222
323include(' openapi-validation-api' )
You can’t perform that action at this time.
0 commit comments