-
Notifications
You must be signed in to change notification settings - Fork 33
78 lines (75 loc) · 2.65 KB
/
convention-develocity-maven-extension-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
name: Verify Convention Develocity Maven Extension
on:
push:
branches: [ main ]
paths: [ 'convention-develocity-maven-extension/**', '.github/workflows/**' ]
pull_request:
branches: [ main ]
paths: [ 'convention-develocity-maven-extension/**', '.github/workflows/**' ]
workflow_dispatch:
jobs:
build:
name: Build Convention Develocity Maven Extension
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'
cache: maven
- name: Build with Maven
working-directory: convention-develocity-maven-extension/extension
run: ./mvnw clean install
- name: Upload extension
uses: actions/upload-artifact@v4
with:
name: convention-develocity-maven-extension
path: ~/.m2/repository/com/myorg
verification:
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-maven-extension
path: ~/.m2/repository/com/myorg
- name: Set Maven version
if: ${{ matrix.versions.version != '(Current)' }}
working-directory: convention-develocity-maven-extension/examples/maven_${{ matrix.versions.sample }}
run: ./mvnw wrapper:wrapper -Dmaven=${{ matrix.versions.version }} -Ddevelocity.scan.disabled
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Verify example build
id: build
working-directory: convention-develocity-maven-extension/examples/maven_${{ matrix.versions.sample }}
run: ./mvnw clean verify -Ddevelocity.url=https://ge.solutions-team.gradle.com
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