Skip to content

Maven build caching samples are re-enabled #184

Maven build caching samples are re-enabled

Maven build caching samples are re-enabled #184

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
- 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