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:
21
21
- name : Checkstyle
22
22
uses : gradle/gradle-build-action@v2
23
23
with :
24
+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
24
25
arguments : checkstyleMain checkstyleTest
25
26
- name : PMD
26
27
uses : gradle/gradle-build-action@v2
27
28
with :
29
+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
28
30
arguments : pmdMain pmdTest
29
31
- name : Test
30
32
uses : gradle/gradle-build-action@v2
31
33
with :
34
+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
32
35
arguments : test
Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ jobs:
23
23
- name : Build sourcesJar and javadocJar
24
24
uses : gradle/gradle-build-action@v2
25
25
with :
26
+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
26
27
arguments : sourcesJar javadocJar
27
28
- name : Publish to MavenCentral
28
29
uses : gradle/gradle-build-action@v2
29
30
with :
31
+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
30
32
arguments : publishMavenPublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
31
33
env :
32
34
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
+
1
21
rootProject. name = ' openapi-validation'
2
22
3
23
include(' openapi-validation-api' )
You can’t perform that action at this time.
0 commit comments