Skip to content

Commit

Permalink
add jberet-manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
liweinan committed Dec 8, 2023
1 parent 3e4c2ea commit e736d8f
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/jberet-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ jobs:
with:
distribution: ${{ matrix.jdk-distribution }}
java-version: ${{ matrix.jdk-version }}
cache: 'maven'
- name: Run Tests
run: mvn -ntp -U -B -fae clean verify
- uses: actions/upload-artifact@v3
if: failure()
with:
name: surefire-${{ matrix.jdk-distribution }}-${{ matrix.jdk-version }}-${{ matrix.os }}
path: '**/surefire-reports/*.txt'
# cache: 'maven'
- name: quick build
run: mvn install -DskipTests
- name: full build
run: mvn install
# - uses: actions/upload-artifact@v3
# if: failure()
# with:
# name: surefire-${{ matrix.jdk-distribution }}-${{ matrix.jdk-version }}-${{ matrix.os }}
# path: '**/surefire-reports/*.txt'
91 changes: 91 additions & 0 deletions jberet-manifest/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~
~ Copyright 2023 Red Hat, Inc., and individual contributors
~ as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jberet</groupId>
<artifactId>jberet-parent</artifactId>
<version>2.2.0-SNAPSHOT</version>
</parent>

<artifactId>jberet-channel-manifest</artifactId>

<packaging>pom</packaging>

<build>
<plugins>
<!-- Use the resources plugin to apply expression replacement filtering to the channel.yaml -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-channel-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/target/resources</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>jberet-channel-manifest.yaml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<!-- Attach the manifest.yaml to the build -->
<execution>
<id>attach-manifest</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/resources/jberet-channel-manifest.yaml</file>
<type>yaml</type>
<classifier>manifest</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schemaVersion: "1.0.0"
name: "jberet-manifest"
id: "org.jberet:jberet-channel-manifest"
description: "A JBeret Channel manifest for upgrading components."
streams:
- groupId: "org.jberet"
artifactId: "jberet-core"
version: "${project.version}"
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@
<module>jberet-core</module>
<module>jberet-se</module>
<module>jberet-se-bom</module>
<module>jberet-manifest</module>
<module>test-apps</module>
<module>test-deployment</module>
</modules>

<build>
Expand Down
96 changes: 96 additions & 0 deletions test-deployment/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~
~ Copyright 2023 Red Hat, Inc., and individual contributors
~ as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jberet</groupId>
<artifactId>jberet-parent</artifactId>
<version>2.2.0-SNAPSHOT</version>
</parent>

<artifactId>test-deployment</artifactId>
<properties>
<jboss.home>${project.build.directory}${file.separator}wildfly</jboss.home>
<version.org.wildfly>30.0.1.Final</version.org.wildfly>
<galleon.fork.embedded>true</galleon.fork.embedded>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<executions>
<execution>
<id>server-provisioning</id>
<phase>generate-test-resources</phase>
<goals>
<goal>provision</goal>
</goals>
<configuration>
<provisioning-dir>${jboss.home}</provisioning-dir>
<galleon-options>
<jboss-fork-embedded>${galleon.fork.embedded}</jboss-fork-embedded>
</galleon-options>
<feature-packs>
<feature-pack>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ee-galleon-pack</artifactId>
<version>${version.org.wildfly}</version>
<inherit-configs>false</inherit-configs>
<included-configs>
<config>
<model>standalone</model>
<name>standalone-full.xml</name>
</config>
<config>
<model>standalone</model>
<name>standalone.xml</name>
</config>
</included-configs>
<excluded-packages>
<name>docs.schema</name>
<name>appclient</name>
<name>domain</name>
</excluded-packages>
</feature-pack>
</feature-packs>
<channels>
<channel>
<manifest>
<groupId>org.jberet</groupId>
<artifactId>jberet-channel-manifest</artifactId>
<version>${project.version}</version>
</manifest>
</channel>
</channels>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>

0 comments on commit e736d8f

Please sign in to comment.