Skip to content

Commit

Permalink
[issue 138] - Prepare for EAP 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobrz committed Feb 8, 2024
1 parent 7484391 commit a9d67c4
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 164 deletions.
4 changes: 2 additions & 2 deletions .ci/openshift-ci/build-root/e2e-test-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ mvn clean install -Dmaven.repo.local=./local-repo-prod -DskipTests -Pts.wildfly.
mvn test -Dmaven.repo.local=./local-repo-prod -pl testsuite/integration-tests -Pts.execution-profile.prod,ts.wildfly.target-distribution.eap \
-Dintersmash.deployments.repository.url="https://github.com/${INTERSMASH_PR_AUTHOR}/${REPO_NAME}.git" \
-Dintersmash.deployments.repository.ref="${PULL_HEAD_REF}" \
-Dintersmash.wildfly.image=registry.redhat.io/jboss-eap-8-tech-preview/eap8-openjdk17-builder-openshift-rhel8:1.0.0.Beta \
-Dintersmash.wildfly.runtime.image=registry.redhat.io/jboss-eap-8-tech-preview/eap8-openjdk17-runtime-openshift-rhel8:1.0.0.Beta \
-Dintersmash.wildfly.image=registry.redhat.io/jboss-eap-8/eap8-openjdk17-builder-openshift-rhel8:latest \
-Dintersmash.wildfly.runtime.image=registry.redhat.io/jboss-eap-8/eap8-openjdk17-runtime-openshift-rhel8:latest \
-Dintersmash.wildfly.operators.catalog_source=redhat-operators \
-Dintersmash.wildfly.operators.package_manifest=eap \
-Dintersmash.wildfly.operators.channel=stable \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ default String generateAdditionalMavenArgs() {
+ ((Strings.isNullOrEmpty(this.bomsEeServerVersion()) ? ""
: (" -D" + this.bomsEeServerVersionPropertyName() + "="
+ this.bomsEeServerVersion()))));
// a maven mirror for internal testable artifacts, i.e. which are not released yet, can be provided
result += result.concat(
(Strings.isNullOrEmpty(this.getMavenMirrorUrl()) ? ""
: " -Dmaven-mirror.url=" + this.getMavenMirrorUrl()));
return result;
}
}
63 changes: 6 additions & 57 deletions testsuite/deployments/openshift-jakarta-sample-standalone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@
<!-- WildFly/EAP 8 Maven Plugin coordinates -->
<wildfly-maven-plugin.groupId>org.jboss.eap.plugins</wildfly-maven-plugin.groupId>
<wildfly-maven-plugin.artifactId>eap-maven-plugin</wildfly-maven-plugin.artifactId>
<wildfly-maven-plugin.version>1.0.0.Beta6-redhat-00001</wildfly-maven-plugin.version>
<wildfly-maven-plugin.version>1.0.0.Final-redhat-00014</wildfly-maven-plugin.version>
<!-- Default WildFly/EAP 8 `ee` BOMs version is set here and can be overridden for pulling the right BOM -->
<bom.wildfly-ee.groupId>org.jboss.bom</bom.wildfly-ee.groupId>
<bom.wildfly-ee.artifactId>jboss-eap-ee</bom.wildfly-ee.artifactId>
<bom.wildfly-ee.version>8.0.0.Beta-redhat-00004</bom.wildfly-ee.version>
<bom.wildfly-ee.version>8.0.0.GA-redhat-00009</bom.wildfly-ee.version>
<!--
EAP8 feature packs and channel:
Expand All @@ -219,64 +219,13 @@
Note 1: WF builds have both `wildfly-galleon-pack` and `wildfly-ee-galleon-pack`
Note 2: leave the feature-packs location to non-existing location, this proves parameters are passed correctly to the builder image
-->
<wildfly.feature-pack.location>org.jboss.eap:wildfly-ee-galleon-pack:8.0.0.Beta-redhat-00003</wildfly.feature-pack.location>
<wildfly.ee-feature-pack.location>org.jboss.eap:wildfly-ee-galleon-pack:8.0.0.Beta-redhat-00003</wildfly.ee-feature-pack.location>
<wildfly.cloud-feature-pack.location>org.jboss.eap.cloud:eap-cloud-galleon-pack:1.0.0.Beta2-redhat-00001</wildfly.cloud-feature-pack.location>
<!-- EAP 8 Channel coordinates -->
<wildfly.ee-channel.groupId>org.jboss.eap.channels</wildfly.ee-channel.groupId>
<wildfly.ee-channel.artifactId>eap-8.0-beta</wildfly.ee-channel.artifactId>
<wildfly.ee-channel.version>1.0.0.Beta4-redhat-00002</wildfly.ee-channel.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>${wildfly-maven-plugin.groupId}</groupId>
<artifactId>${wildfly-maven-plugin.artifactId}</artifactId>
<configuration>
<!-- some tests check for the provisioned galleon layers -->
<record-provisioning-state>true</record-provisioning-state>
<channels>
<channel>
<groupId>${wildfly.ee-channel.groupId}</groupId>
<artifactId>${wildfly.ee-channel.artifactId}</artifactId>
<version>${wildfly.ee-channel.version}</version>
</channel>
</channels>
<feature-packs>
<feature-pack>
<location>${wildfly.ee-feature-pack.location}</location>
</feature-pack>
<feature-pack>
<location>${wildfly.cloud-feature-pack.location}</location>
</feature-pack>
</feature-packs>
<layers>
<layer>cloud-default-config</layer>
</layers>
<galleon-options>
<!-- this flag is super necessary: otherwise wildfly-maven-plugin and
wildfly-jar-maven-plugin would collide -->
<jboss-fork-embedded>true</jboss-fork-embedded>
</galleon-options>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>ts.wildfly.target-distribution.eap8</id>
<properties>
<wildfly.feature-pack.location>org.jboss.eap:wildfly-ee-galleon-pack:8.0.0.GA-redhat-00011</wildfly.feature-pack.location>
<wildfly.ee-feature-pack.location>org.jboss.eap:wildfly-ee-galleon-pack:8.0.0.GA-redhat-00011</wildfly.ee-feature-pack.location>
<wildfly.cloud-feature-pack.location>org.jboss.eap.cloud:eap-cloud-galleon-pack:1.0.0.Final-redhat-00008</wildfly.cloud-feature-pack.location>
<!-- EAP 8 Channel coordinates -->
<wildfly.ee-channel.groupId>org.jboss.eap.channels</wildfly.ee-channel.groupId>
<wildfly.ee-channel.artifactId>eap-8.0</wildfly.ee-channel.artifactId>
<wildfly.ee-channel.version>NO_VERSION</wildfly.ee-channel.version>
<wildfly.ee-channel.version>1.0.1.GA-redhat-00003</wildfly.ee-channel.version>
</properties>
<build>
<plugins>
Expand Down
101 changes: 6 additions & 95 deletions testsuite/deployments/wildfly-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@
<!-- WildFly/EAP 8 Maven Plugin coordinates -->
<wildfly-maven-plugin.groupId>org.jboss.eap.plugins</wildfly-maven-plugin.groupId>
<wildfly-maven-plugin.artifactId>eap-maven-plugin</wildfly-maven-plugin.artifactId>
<wildfly-maven-plugin.version>1.0.0.Beta6-redhat-00001</wildfly-maven-plugin.version>
<wildfly-maven-plugin.version>1.0.0.Final-redhat-00014</wildfly-maven-plugin.version>
<!-- Default WildFly/EAP 8 `ee` BOMs version is set here and can be overridden for pulling the right BOM -->
<bom.wildfly-ee.groupId>org.jboss.bom</bom.wildfly-ee.groupId>
<bom.wildfly-ee.artifactId>jboss-eap-ee</bom.wildfly-ee.artifactId>
<bom.wildfly-ee.version>8.0.0.Beta-redhat-00004</bom.wildfly-ee.version>
<bom.wildfly-ee.version>8.0.0.GA-redhat-00009</bom.wildfly-ee.version>
<!--
EAP8 feature packs and channel:
Expand All @@ -165,102 +165,13 @@
Note 1: WF builds have both `wildfly-galleon-pack` and `wildfly-ee-galleon-pack`
Note 2: leave the feature-packs location to non-existing location, this proves parameters are passed correctly to the builder image
-->
<wildfly.feature-pack.location>org.jboss.eap:wildfly-ee-galleon-pack:8.0.0.Beta-redhat-00003</wildfly.feature-pack.location>
<wildfly.ee-feature-pack.location>org.jboss.eap:wildfly-ee-galleon-pack:8.0.0.Beta-redhat-00003</wildfly.ee-feature-pack.location>
<wildfly.cloud-feature-pack.location>org.jboss.eap.cloud:eap-cloud-galleon-pack:1.0.0.Beta2-redhat-00001</wildfly.cloud-feature-pack.location>
<!-- EAP 8 Channel coordinates -->
<wildfly.ee-channel.groupId>org.jboss.eap.channels</wildfly.ee-channel.groupId>
<wildfly.ee-channel.artifactId>eap-8.0-beta</wildfly.ee-channel.artifactId>
<wildfly.ee-channel.version>1.0.0.Beta4-redhat-00002</wildfly.ee-channel.version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>${wildfly-maven-plugin.groupId}</groupId>
<artifactId>${wildfly-maven-plugin.artifactId}</artifactId>
<version>${wildfly-maven-plugin.version}</version>
<configuration>
<channels>
<channel>
<groupId>${wildfly.ee-channel.groupId}</groupId>
<artifactId>${wildfly.ee-channel.artifactId}</artifactId>
<version>${wildfly.ee-channel.version}</version>
</channel>
</channels>
<!-- When testing against EAP (-Peap), wildfly-ee-galeon-pack is needed -->
<feature-packs>
<feature-pack>
<location>${wildfly.ee-feature-pack.location}</location>
</feature-pack>
<feature-pack>
<location>${wildfly.cloud-feature-pack.location}</location>
</feature-pack>
</feature-packs>
<galleon-options>
<!-- this flag is super necessary: otherwise wildfly-maven-plugin and
wildfly-jar-maven-plugin would collide -->
<jboss-fork-embedded>true</jboss-fork-embedded>
</galleon-options>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Disable the Bootable JAR plugin when testing EAP -->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<executions>
<execution>
<id>bootable-openshift</id>
<phase>none</phase>
</execution>
<execution>
<id>bootable-baremetal</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<!-- Don't copy any Bootable JAR since none is built when EAP is being tested-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-bootable-jar-openshift</id>
<phase>none</phase>
<goals>
<goal>install-file</goal>
</goals>
</execution>
<execution>
<id>install-bootable-jar-baremetal</id>
<phase>none</phase>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>ts.wildfly.target-distribution.eap8</id>
<properties>
<wildfly.feature-pack.location>org.jboss.eap:wildfly-ee-galleon-pack:8.0.0.GA-redhat-00011</wildfly.feature-pack.location>
<wildfly.ee-feature-pack.location>org.jboss.eap:wildfly-ee-galleon-pack:8.0.0.GA-redhat-00011</wildfly.ee-feature-pack.location>
<wildfly.cloud-feature-pack.location>org.jboss.eap.cloud:eap-cloud-galleon-pack:1.0.0.Final-redhat-00008</wildfly.cloud-feature-pack.location>
<!-- EAP 8 Channel coordinates -->
<wildfly.ee-channel.groupId>org.jboss.eap.channels</wildfly.ee-channel.groupId>
<wildfly.ee-channel.artifactId>eap-8.0</wildfly.ee-channel.artifactId>
<wildfly.ee-channel.version>NO_VERSION</wildfly.ee-channel.version>
<wildfly.ee-channel.version>1.0.1.GA-redhat-00003</wildfly.ee-channel.version>
</properties>
<build>
<pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
import java.util.List;
import java.util.Map;

import org.assertj.core.util.Strings;
import org.jboss.intersmash.IntersmashConfig;
import org.jboss.intersmash.application.openshift.helm.HelmChartRelease;
import org.jboss.intersmash.application.openshift.helm.WildflyHelmChartOpenShiftApplication;
import org.jboss.intersmash.model.helm.charts.values.eap8.HelmEap8Release;
import org.jboss.intersmash.model.helm.charts.values.wildfly.HelmWildflyRelease;
import org.jboss.intersmash.provision.helm.HelmChartReleaseAdapter;
import org.jboss.intersmash.provision.helm.wildfly.WildFlyHelmChartReleaseAdapter;
import org.jboss.intersmash.provision.helm.wildfly.WildflyHelmChartRelease;
import org.jboss.intersmash.provision.helm.wildfly.eap8.Eap8HelmChartReleaseAdapter;
import org.jboss.intersmash.test.deployments.TestDeploymentProperties;
import org.jboss.intersmash.test.deployments.WildflyDeploymentApplicationConfiguration;
import org.jboss.intersmash.testsuite.IntersmashTestsuiteProperties;

Expand Down Expand Up @@ -55,20 +58,32 @@ public Map<String, String> getSetOverrides() {
}

private HelmChartRelease loadRelease() {
WildflyHelmChartRelease wildflyHelmChartRelease;
if (IntersmashTestsuiteProperties.isCommunityTestExecutionProfileEnabled()) {
HelmWildflyRelease helmRelease = HelmChartReleaseAdapter.<HelmWildflyRelease> fromValuesFile(
this.getClass().getResource("wildfly-helm-values.yaml"), HelmWildflyRelease.class);
return new WildFlyHelmChartReleaseAdapter(helmRelease)
wildflyHelmChartRelease = new WildFlyHelmChartReleaseAdapter(helmRelease)
.withJdk17BuilderImage(IntersmashConfig.wildflyImageURL())
.withJdk17RuntimeImage(IntersmashConfig.wildflyRuntimeImageURL());
} else if (IntersmashTestsuiteProperties.isProductizedTestExecutionProfileEnabled()) {
HelmEap8Release helmRelease = HelmChartReleaseAdapter.<HelmEap8Release> fromValuesFile(
this.getClass().getResource("eap8-helm-values.yaml"), HelmEap8Release.class);
return new Eap8HelmChartReleaseAdapter(helmRelease)
wildflyHelmChartRelease = new Eap8HelmChartReleaseAdapter(helmRelease)
.withJdk17BuilderImage(IntersmashConfig.wildflyImageURL())
.withJdk17RuntimeImage(IntersmashConfig.wildflyRuntimeImageURL());
} else
throw new IllegalStateException("Not a valid testing profile!");
// let's compute some additional maven args for our s2i build to happen on a Pod
String mavenAdditionalArgs = "-Denforcer.skip=true";
// let's add configurable deployment additional args:
mavenAdditionalArgs = mavenAdditionalArgs.concat(generateAdditionalMavenArgs());
// let's pass the profile for building the deployment too...
mavenAdditionalArgs = mavenAdditionalArgs.concat(
(Strings.isNullOrEmpty(TestDeploymentProperties.getWildflyDeploymentsBuildProfile()) ? ""
: " -Pts.wildfly.target-distribution."
+ TestDeploymentProperties.getWildflyDeploymentsBuildProfile()));
wildflyHelmChartRelease.setBuildEnvironmentVariables(Map.of("MAVEN_ARGS_APPEND", mavenAdditionalArgs));
return wildflyHelmChartRelease;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ build:
mode: "s2i"
# uri and ref will be specified via Helm --set arguments
contextDir: "testsuite/deployments/openshift-jakarta-sample-standalone"
env:
- name: "MAVEN_ARGS_APPEND"
value: "-Denforcer.skip=true -Pts.wildfly.target-distribution.eap"
s2i:
kind: "DockerImage"
buildApplicationImage: true
# builderImage and runtimeImage will be specified via Helm --set arguments
# builderImage and runtimeImage will be specified via the WildFly Helm Chart application descriptor APIs
deploy:
enabled: true
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ build:
mode: "s2i"
# uri and ref will be specified via Helm --set arguments
contextDir: "testsuite/deployments/openshift-jakarta-sample-standalone"
env:
- name: "MAVEN_ARGS_APPEND"
value: "-Denforcer.skip=true"
s2i:
kind: "DockerImage"
buildApplicationImage: true
# builderImage and runtimeImage will be specified via Helm --set arguments
# builderImage and runtimeImage will be specified via the WildFly Helm Chart application descriptor APIs
deploy:
enabled: true
replicas: 1
Expand Down

0 comments on commit a9d67c4

Please sign in to comment.