File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed
Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 77jobs :
88 maintenance_workflow :
99 runs-on : ubuntu-latest
10+ env :
11+ CODEARTIFACT_AUTH_TOKEN : ${{ secrets.CODEARTIFACT_AUTH_TOKEN }}
1012 steps :
1113 - name : Checkout sources
1214 uses : actions/checkout@v4.2.1
1820 - name : Generate and submit dependency graph
1921 uses : gradle/actions/dependency-submission@v4.1.0
2022 with :
23+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2124 gradle-version : wrapper
2225 dependency-graph : generate-and-submit
2326 # Include only relevant configurations
Original file line number Diff line number Diff line change 1+ def fetchCodeArtifactToken () {
2+ String token = providers. environmentVariable(" CODEARTIFACT_AUTH_TOKEN" ). getOrNull()
3+ if (token == null || providers. environmentVariable(" CI" ). getOrNull() == 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+ logger. info(" Use codeartifact token: " + token. substring(0 , 10 ) + " ..." )
15+ return token
16+ }
17+
18+ ext {
19+ fetchCodeArtifactTokenMethod = this . &fetchCodeArtifactToken
20+ }
Original file line number Diff line number Diff line change 1+ pluginManagement {
2+ repositories {
3+ apply (from = " ${rootProject.projectDir} /gradle/utils/token-utils.gradle" )
4+ val fetchToken = (extra[" fetchCodeArtifactTokenMethod" ] as groovy.lang.Closure <* >).call() as String
5+ maven {
6+ name = " codeartifact"
7+ url =
8+ uri(" https://getyourguide-130607246975.d.codeartifact.eu-central-1.amazonaws.com/maven/private/" )
9+ credentials {
10+ username = " aws"
11+ password = fetchToken
12+ }
13+ }
14+ }
15+ }
116
217plugins {
3- id ' com.getyourguide.libs.gradle.develocity.configuration' version ' 4.14.2'
18+ id( " com.getyourguide.libs.gradle.develocity.configuration" ) version " 4.14.2"
419}
520
621rootProject.name = " paparazzi"
You can’t perform that action at this time.
0 commit comments