Skip to content

Combined PRs

Combined PRs #142

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