Skip to content

Commit

Permalink
Merge pull request #283 from jfdenise/main
Browse files Browse the repository at this point in the history
Fix for WFGP-271 and Fix for WFGP-268
  • Loading branch information
jfdenise authored Mar 15, 2024
2 parents a8db00d + 7fcc06e commit 8ccb403
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 79 deletions.
84 changes: 5 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,83 +11,9 @@ on:
types: [opened, synchronize, reopened, ready_for_review]


jobs:
galleon-plugins-build:
name: galleon-plugins-${{ matrix.os }}-jdk${{ matrix.java }}
runs-on: ${{ matrix.os }}
outputs:
galleon-plugins-version: ${{ steps.version.outputs.galleon-plugins-version }}
galleon-version: ${{ steps.version.outputs.galleon-version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: ['11', '17']
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Build and Test Galleon plugins on ${{ matrix.java }}
run: mvn -U -B -ntp clean install
shell: bash
- id: version
run: |
echo "galleon-plugins-version=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)" >> $GITHUB_OUTPUT
echo "galleon-version=$(mvn -B help:evaluate -Dexpression=version.org.jboss.galleon -DforceStdout -q)" >> $GITHUB_OUTPUT
- name: Archive the repository
if: matrix.java == '11'
run: |
cd ~
find ./.m2/repository -type d -name "*SNAPSHOT" -print0 | xargs -0 tar -czf ~/galleon-plugins-maven-repository.tar.gz
- uses: actions/upload-artifact@v3
if: matrix.java == '11'
with:
name: galleon-plugins-maven-repository
path: ~/galleon-plugins-maven-repository.tar.gz
retention-days: 5
- name: Upload Test Reports on Failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/surefire-reports/*.txt'

wildfly-build-and-test:
name: Linux/Windows - JDK11 and JDK17
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
java-versions: "['11', '17']"
os: "['ubuntu-latest', 'windows-latest']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz

needs: galleon-plugins-build

wildfly-build-and-test-galleon-layers:
name: Galleon Linux - JDK11
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
test-arguments: '-Dts.layers -Dts.galleon'
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
os: "['ubuntu-latest']"
java-versions: "['11']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
needs: galleon-plugins-build

wildfly-build-and-test-preview:
name: WildFly Preview - Linux- JDK17
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
jobs:
test-galleon-plugins:
name: Build test Galleon Plugins
uses: wildfly/galleon-plugins/.github/workflows/testing-workflow.yml@main
with:
test-arguments: '-Dts.preview'
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
java-versions: "['17']"
os: "['ubuntu-latest']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
needs: galleon-plugins-build
wildfly-ref: main
15 changes: 15 additions & 0 deletions .github/workflows/nightly-backward-30.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: WildFly galleon plugins - Nightly WildFly 30.0.0.Final backward compatibility

on:
schedule:
- cron: "0 0 * * *"

jobs:
test-galleon-plugins:
name: Build test Galleon Plugins
uses: wildfly/galleon-plugins/.github/workflows/nightly-workflow.yml@main
with:
wildfly-ref: 30.0.0.Final
15 changes: 15 additions & 0 deletions .github/workflows/nightly-backward-31.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: WildFly galleon plugins - Nightly WildFly 31.0.0.Final backward compatibility

on:
schedule:
- cron: "0 0 * * *"

jobs:
test-galleon-plugins:
name: Build test Galleon Plugins
uses: wildfly/galleon-plugins/.github/workflows/nightly-workflow.yml@main
with:
wildfly-ref: 31.0.0.Final
34 changes: 34 additions & 0 deletions .github/workflows/nightly-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: WildFly galleon plugins - Nightly WildFly backward compatibility

on:
workflow_call:
inputs:
wildfly-ref:
description: "WildFly branch/tag"
required: false
default: "main"
type: string
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
test-galleon-plugins:
name: Build test Galleon Plugins
uses: wildfly/galleon-plugins/.github/workflows/testing-workflow.yml@main
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
with:
wildfly-ref: ${{ inputs.wildfly-ref }}
132 changes: 132 additions & 0 deletions .github/workflows/testing-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: WildFly galleon plugins testing

on:
workflow_call:
inputs:
wildfly-ref:
description: "WildFly branch/tag"
required: false
default: "main"
type: string
jobs:
galleon-plugins-build:
name: galleon-plugins-${{ matrix.os }}-jdk${{ matrix.java }}
runs-on: ${{ matrix.os }}
outputs:
galleon-plugins-version: ${{ steps.version.outputs.galleon-plugins-version }}
galleon-version: ${{ steps.version.outputs.galleon-version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: ['11', '17']
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Build and Test Galleon plugins on ${{ matrix.java }}
run: mvn -U -B -ntp clean install
shell: bash
- id: version
run: |
echo "galleon-plugins-version=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)" >> $GITHUB_OUTPUT
echo "galleon-version=$(mvn -B help:evaluate -Dexpression=version.org.jboss.galleon -DforceStdout -q)" >> $GITHUB_OUTPUT
- name: Archive the repository
if: matrix.java == '11'
run: |
cd ~
find ./.m2/repository -type d -name "*SNAPSHOT" -print0 | xargs -0 tar -czf ~/galleon-plugins-maven-repository.tar.gz
- uses: actions/upload-artifact@v3
if: matrix.java == '11'
with:
name: galleon-plugins-maven-repository
path: ~/galleon-plugins-maven-repository.tar.gz
retention-days: 5
- name: Upload Test Reports on Failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/surefire-reports/*.txt'

wildfly-build-and-test:
name: Linux/Windows - JDK11 and JDK17
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
java-versions: "['11', '17']"
os: "['ubuntu-latest', 'windows-latest']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
ref: ${{ inputs.wildfly-ref }}
needs: galleon-plugins-build

wildfly-build-and-test-galleon-layers:
name: Galleon Linux - JDK11
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
test-arguments: '-Dts.layers -Dts.galleon'
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
os: "['ubuntu-latest']"
java-versions: "['11']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
ref: ${{ inputs.wildfly-ref }}
needs: galleon-plugins-build

wildfly-build-and-test-preview:
name: WildFly Preview - Linux- JDK17
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
test-arguments: '-Dts.preview'
build-arguments: '-Dversion.org.wildfly.plugin=5.0.0.Beta2 -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
java-versions: "['17']"
os: "['ubuntu-latest']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
ref: ${{ inputs.wildfly-ref }}
needs: galleon-plugins-build

datasources-build-and-test:
name: WildFly Datasources galleon-pack build and test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: ['17']
steps:
- uses: actions/checkout@v4
with:
repository: wildfly-extras/wildfly-datasources-galleon-pack
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- uses: actions/download-artifact@v3
with:
name: galleon-plugins-maven-repository
path: .
- name: Extract Maven Repo
shell: bash
run: |
tar -xzf galleon-plugins-maven-repository.tar.gz -C ~
- name: Build and Test WildFly Datasources galleon-pack with SNAPSHOT build of galleon-plugins
run: mvn clean install -Dversion.org.wildfly.jar.plugin=11.0.0.Beta1 -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}
shell: bash
- name: Upload Test Reports on Failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/surefire-reports/*.txt'
needs: galleon-plugins-build

0 comments on commit 8ccb403

Please sign in to comment.