Skip to content

Commit 0bafd02

Browse files
committed
Added develocity access key for Gradle build scans
#TI-1997
1 parent e28287c commit 0bafd02

File tree

6 files changed

+20
-10
lines changed

6 files changed

+20
-10
lines changed

.github/workflows/collect-samples-cron.yml

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
11+
env:
12+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
13+
1014
strategy:
1115
matrix:
1216
include:

.github/workflows/docker-image.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010

1111
runs-on: ubuntu-latest
1212

13+
env:
14+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
15+
1316
steps:
1417
- uses: actions/checkout@v3
1518
- name: Build the Docker image

.github/workflows/gradle-wrapper-validation.yml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
permissions:
1414
contents: read
1515

16+
env:
17+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
18+
1619
steps:
1720
- uses: actions/checkout@v3
1821
- uses: gradle/wrapper-validation-action@v1

.github/workflows/gradle.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,19 @@ jobs:
1111

1212
runs-on: ubuntu-latest
1313

14+
env:
15+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
16+
1417
steps:
15-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1619
- name: Set up JDK 17
17-
uses: actions/setup-java@v3
20+
uses: actions/setup-java@v4
1821
with:
1922
java-version: '17'
2023
distribution: 'corretto'
2124
- name: Grant execute permission for gradlew
2225
run: chmod +x gradlew
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v4
2328
- name: Build with Gradle
2429
run: ./gradlew build
25-
- name: Upload artifact
26-
if: failure()
27-
uses: actions/upload-artifact@v4
28-
with:
29-
name: tests
30-
path: ${{ github.workspace }}/build/reports/tests/
31-
retention-days: 10

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
FROM amazoncorretto:17 as build
22

33
ARG KOTLIN_VERSION
4+
ARG DEVELOCITY_ACCESS_KEY
45

56
RUN if [ -z "$KOTLIN_VERSION" ]; then \
67
echo "Error: KOTLIN_VERSION argument is not set. Use docker-image-build.sh to build the image." >&2; \
78
exit 1; \
89
fi
910

11+
ENV DEVELOCITY_ACCESS_KEY=$DEVELOCITY_ACCESS_KEY
1012
ENV KOTLIN_LIB=$KOTLIN_VERSION
1113
ENV KOTLIN_LIB_JS=${KOTLIN_VERSION}-js
1214
ENV KOTLIN_LIB_WASM=${KOTLIN_VERSION}-wasm

docker-image-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ kotlinVersion=$(awk '{ if ($1 == "kotlin") { gsub(/"/, "", $2); print $2; } }' F
44

55
echo "Kotlin Version for the docker: $kotlinVersion"
66

7-
docker build . --file Dockerfile --tag my-image-name:$(date +%s) --build-arg KOTLIN_VERSION=$kotlinVersion
7+
docker build . --file Dockerfile --tag my-image-name:$(date +%s) --build-arg KOTLIN_VERSION=$kotlinVersion --build-arg DEVELOCITY_ACCESS_KEY=$DEVELOCITY_ACCESS_KEY

0 commit comments

Comments
 (0)