-
Notifications
You must be signed in to change notification settings - Fork 34
132 lines (128 loc) · 4.65 KB
/
convention-develocity-shared-verification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Verify Convention Develocity Shared
on:
push:
branches: [ main ]
paths: [ 'convention-develocity-shared/**', '.github/workflows/**' ]
pull_request:
branches: [ main ]
paths: [ 'convention-develocity-shared/**', '.github/workflows/**' ]
workflow_dispatch:
jobs:
build:
name: Build Convention Develocity Shared
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Configure Develocity Solutions instance
working-directory: convention-develocity-shared/convention-develocity-common/src/main/java/com/myorg
run: sed -i 's/develocity-samples.gradle.com/ge.solutions-team.gradle.com/g' DevelocityConventions.java
- name: Build with Gradle
working-directory: convention-develocity-shared
run: ./gradlew build publishToMavenLocal
- name: Upload convention
uses: actions/upload-artifact@v4
with:
name: convention-develocity-shared
path: ~/.m2/repository/com/myorg
verification_gradle:
name: Verify Example Build for Gradle ${{ matrix.versions.version }}
needs: [build]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
versions:
- sample: '5'
version: '5.0'
- sample: '6'
version: '6.0.1'
- sample: '6.9_and_later'
version: '6.9.4'
- sample: '6.9_and_later'
version: '7.0.2'
- sample: '6.9_and_later'
version: '8.0.2'
- sample: '6.9_and_later'
version: '(Current)'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: convention-develocity-shared
path: ~/.m2/repository/com/myorg
- name: Set Gradle version
if: ${{ matrix.versions.version != '(Current)' }}
working-directory: convention-develocity-shared/examples/gradle_${{ matrix.versions.sample }}
run: |
sed -i '/distributionSha256Sum.*/d' gradle/wrapper/gradle-wrapper.properties
./gradlew wrapper --gradle-version=${{ matrix.versions.version }} --no-scan
./gradlew wrapper --gradle-version=${{ matrix.versions.version }} --no-scan
- name: Verify example build
id: build
working-directory: convention-develocity-shared/examples/gradle_${{ matrix.versions.sample }}
run: ./gradlew build
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Verify Build Scan published
if: ${{ !steps.build.outputs.build-scan-url }}
run: echo "::error ::No Build Scan published"; exit 1
verification_maven:
name: Verify Example Build for Maven ${{ matrix.versions.version }}
needs: [build]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
versions:
- sample: '3'
version: '3.6.3'
- sample: '3'
version: '3.8.8'
- sample: '3'
version: '(Current)'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: gradle/develocity-actions/[email protected]
- name: Download extension
uses: actions/download-artifact@v4
with:
name: convention-develocity-shared
path: ~/.m2/repository/com/myorg
- name: Set Maven version
if: ${{ matrix.versions.version != '(Current)' }}
working-directory: convention-develocity-shared/examples/maven_${{ matrix.versions.sample }}
run: ./mvnw wrapper:wrapper -Dmaven=${{ matrix.versions.version }} -Ddevelocity.scan.disabled
- name: Verify example build
id: build
working-directory: convention-develocity-shared/examples/maven_${{ matrix.versions.sample }}
run: ./mvnw clean verify
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Verify Build Scan published
if: ${{ !steps.build.outputs.build-scan-url }}
run: echo "::error ::No Build Scan published"; exit 1