Skip to content

Commit

Permalink
Merge pull request #59 from jamezp/issue58
Browse files Browse the repository at this point in the history
[58] Migrate to using the wildfly-maven-plugin for provisioning.
  • Loading branch information
jamezp authored Jul 23, 2024
2 parents dd55e28 + 6e31927 commit 668185b
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches-ignore:
- 'dependabot/**'
pull_request:
schedule:
- cron: '0 0 * * *' # Every day at 00:00 UTC

# Only run the latest job
concurrency:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:
- '**/pom.xml'
- 'src/**'
- '!src/test/**'
schedule:
- cron: '0 0 * * *' # Every day at 00:00 UTC

# Only run the latest job
concurrency:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/legacy-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 Plugin Tools Legacy - CI

on:
push:
branches-ignore:
- 'dependabot/**'
schedule:
- cron: '0 0 * * *' # Every day at 00:00 UTC

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:

build:
name: '${{ matrix.os }}-jdk${{ matrix.java }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' , 'windows-latest' ]
java: ['11', '17', '21']

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
cache: 'maven'
distribution: 'temurin'
- name: Build and Test on ${{ matrix.os }} - ${{ matrix.java }} with WildFly 32.0.0.Final
# 32.0.0.Final was the first version which deployed channels
run: mvn clean install '-Dorg.jboss.logmanager.nocolor=true' '-Dversion.org.wildfly=32.0.0.Final'
- name: Upload surefire logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/surefire-reports/'
- name: Upload failsafe logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: failsafe-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/failsafe-reports/'
- name: Upload logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-${{ matrix.os }}-${{ matrix.java }}
path: '**/*.log'
52 changes: 38 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,25 @@
<version.org.wildfly.common.wildfly-common>1.7.0.Final</version.org.wildfly.common.wildfly-common>
<!-- This version property is also retrieved by plugin at runtime to resolve CLI artifact -->
<version.org.wildfly.core>25.0.0.Final</version.org.wildfly.core>
<version.org.wildfly>31.0.0.Final</version.org.wildfly>
<!-- Used to override the provisioned version of WildFly. Defaults to empty which is the latest from the channel. -->
<version.org.wildfly/>

<!-- Test dependencies -->
<version.org.junit>5.10.3</version.org.junit>
<version.org.jboss.shrinkwrap.shrinkwrap>1.2.6</version.org.jboss.shrinkwrap.shrinkwrap>

<!-- galleon properties -->
<!-- Plugin versions -->
<version.org.jboss.galleon>6.0.2.Final</version.org.jboss.galleon>
<plugin.fork.embedded>true</plugin.fork.embedded>
<version.wildfly-maven-plugin>5.0.0.Final</version.wildfly-maven-plugin>

<!-- Provisioning properties -->
<galleon.fork.embedded>true</galleon.fork.embedded>
<server.test.feature.pack.groupId>org.wildfly</server.test.feature.pack.groupId>
<server.test.feature.pack.artifactId>wildfly-ee-galleon-pack</server.test.feature.pack.artifactId>

<wildfly.channel.manifest.groupId>org.wildfly.channels</wildfly.channel.manifest.groupId>
<wildfly.channel.manifest.artifactId>wildfly-ee</wildfly.channel.manifest.artifactId>
<wildfly.channel.manifest.version>${version.org.wildfly}</wildfly.channel.manifest.version>

<!-- checkstyle configuration -->
<linkXRef>false</linkXRef>
Expand Down Expand Up @@ -175,27 +185,41 @@
<artifactId>impsort-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jboss.galleon</groupId>
<artifactId>galleon-maven-plugin</artifactId>
<version>${version.org.jboss.galleon}</version>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly-maven-plugin}</version>
<executions>
<execution>
<id>provision-wildfly</id>
<phase>pre-integration-test</phase>
<id>server-provisioning</id>
<phase>generate-test-resources</phase>
<goals>
<goal>provision</goal>
</goals>
<configuration>
<provisioning-dir>${jboss.home}</provisioning-dir>
<feature-packs>
<feature-pack>
<location>wildfly@maven(org.jboss.universe:community-universe)#${version.org.wildfly}</location>
<groupId>${server.test.feature.pack.groupId}</groupId>
<artifactId>${server.test.feature.pack.artifactId}</artifactId>
<version>${version.org.wildfly}</version>
</feature-pack>
</feature-packs>
<record-state>false</record-state>
<install-dir>${project.build.directory}/wildfly</install-dir>
<plugin-options>
<jboss-fork-embedded>${plugin.fork.embedded}</jboss-fork-embedded>
</plugin-options>
<channels>
<!-- If the server.version is blank the newest version of WildFly will be used.
Otherwise, be explicit.
-->
<channel>
<manifest>
<groupId>${wildfly.channel.manifest.groupId}</groupId>
<artifactId>${wildfly.channel.manifest.artifactId}</artifactId>
<version>${wildfly.channel.manifest.version}</version>
</manifest>
</channel>
</channels>
<galleon-options>
<jboss-maven-dist/>
<jboss-fork-embedded>${galleon.fork.embedded}</jboss-fork-embedded>
</galleon-options>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 668185b

Please sign in to comment.