diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40fca369..25844cd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 \ No newline at end of file + wildfly-ref: main \ No newline at end of file diff --git a/.github/workflows/nightly-backward-30.yml b/.github/workflows/nightly-backward-30.yml new file mode 100644 index 00000000..1e295ff9 --- /dev/null +++ b/.github/workflows/nightly-backward-30.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/nightly-backward-31.yml b/.github/workflows/nightly-backward-31.yml new file mode 100644 index 00000000..a8d6750b --- /dev/null +++ b/.github/workflows/nightly-backward-31.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/nightly-workflow.yml b/.github/workflows/nightly-workflow.yml new file mode 100644 index 00000000..d0e0690a --- /dev/null +++ b/.github/workflows/nightly-workflow.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/testing-workflow.yml b/.github/workflows/testing-workflow.yml new file mode 100644 index 00000000..42be208f --- /dev/null +++ b/.github/workflows/testing-workflow.yml @@ -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 \ No newline at end of file