Skip to content

Commit

Permalink
[WFLY-19810] never deploys quickstarts at root web context
Browse files Browse the repository at this point in the history
  • Loading branch information
emmartins committed Oct 29, 2024
1 parent e0672d2 commit 42aeafe
Show file tree
Hide file tree
Showing 127 changed files with 192 additions and 1,011 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/quickstart_ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Abstract CI for a specific quickstart
# If you are updating this please note that there are exceptions not using this: ejb-txn-remote-call

name: WildFly Quickstart CI

on:
Expand Down Expand Up @@ -37,11 +40,6 @@ on:
required: false
default: '"ubuntu-latest", "windows-latest"'
type: string
SERVER_PROVISIONING_SERVER_HOST:
description: 'the server.host arg to be used when testing server provisioning with the mvn verify command'
required: false
default: 'http://localhost:8080'
type: string
EXTRA_RUN_ARGS:
description: 'optional args to be passed when running the quickstart'
required: false
Expand Down Expand Up @@ -122,7 +120,7 @@ jobs:
echo "Starting provisioned server..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }}
echo "Testing provisioned server..."
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
mvn -fae verify -Pintegration-testing
echo "Shutting down provisioned server..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown
shell: bash
Expand All @@ -136,7 +134,7 @@ jobs:
echo "Starting bootable jar..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start-jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }}
echo "Testing bootable jar..."
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
mvn -fae verify -Pintegration-testing
echo "Shutting down bootable jar..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown
shell: bash
Expand All @@ -145,7 +143,7 @@ jobs:
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
mvn -fae clean package -Popenshift
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Popenshift
shell: bash
- name: Run after script
env:
Expand Down Expand Up @@ -229,7 +227,7 @@ jobs:
echo "Starting provisioned server..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Testing provisioned server..."
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae verify -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Shutting down provisioned server..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
shell: bash
Expand All @@ -243,7 +241,7 @@ jobs:
echo "Starting bootable jar..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start-jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Testing bootable jar..."
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae verify -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Shutting down bootable jar..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
shell: bash
Expand All @@ -252,7 +250,7 @@ jobs:
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
mvn -fae clean package -Popenshift -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Popenshift -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
shell: bash
- name: Run after script
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/quickstart_ejb-txn-remote-call_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ jobs:
mvn wildfly:start -Pprovisioned-server -Djboss-as.home=target/server3 -Dwildfly.port=10190 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=200 -Djboss.tx.node.id=server3 -Djboss.node.name=server3" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}}
echo "Testing provisioned server..."
cd ../client
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8080/client -Pintegration-testing
mvn -fae verify -Pintegration-testing
cd ../server
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8180/server -Pintegration-testing
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8280/server -Pintegration-testing
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8180 -Pintegration-testing
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8280 -Pintegration-testing
echo "Shutting down provisioned server..."
cd ../client
mvn wildfly:shutdown
Expand Down Expand Up @@ -200,10 +200,10 @@ jobs:
mvn wildfly:start -Pprovisioned-server -Djboss-as.home=target/server3 -Dwildfly.port=10190 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=200 -Djboss.tx.node.id=server3 -Djboss.node.name=server3" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Testing provisioned server..."
cd ../client
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8080/client -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae verify -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
cd ../server
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8180/server -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8280/server -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8180 -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8280 -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Shutting down provisioned server..."
cd ../client
mvn wildfly:shutdown -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: helloworld-mutual-ssl-secured
SERVER_PROVISIONING_SERVER_HOST: https://localhost:8443/
TEST_PROVISIONED_SERVER: true
TEST_OPENSHIFT: false
1 change: 0 additions & 1 deletion .github/workflows/quickstart_helloworld-mutual-ssl_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ jobs:
uses: ./.github/workflows/quickstart_ci.yml
with:
QUICKSTART_PATH: helloworld-mutual-ssl
SERVER_PROVISIONING_SERVER_HOST: https://localhost:8443/
TEST_PROVISIONED_SERVER: true
TEST_OPENSHIFT: false
26 changes: 0 additions & 26 deletions batch-processing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@
<addOn>h2-database:default</addOn>
</addOns>
</discover-provisioning-info>
<!--
Rename the output war to ROOT.war before adding it to the server, so that the
application is deployed in the root web context.
-->
<name>ROOT.war</name>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -240,11 +235,6 @@
<addOn>h2-database:default</addOn>
</addOns>
</discover-provisioning-info>
<!--
The parent POM's 'openshift' profile renames the output archive to ROOT.war so that the
application is deployed in the root web context. Add ROOT.war to the server.
-->
<filename>ROOT.war</filename>
</configuration>
<executions>
<execution>
Expand All @@ -254,22 +244,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<warName>ROOT</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<warName>ROOT</warName>
</configuration>
</plugin>
<!-- do not attach sources to openshift deployments -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public class BasicRuntimeIT {

private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/batch-processing";
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080";

@Test
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
Expand All @@ -45,7 +45,7 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti
serverHost = DEFAULT_SERVER_HOST;
}
final HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(serverHost+"/"))
.uri(new URI(serverHost+"/batch-processing"))
.GET()
.build();
final HttpClient client = HttpClient.newBuilder()
Expand Down
18 changes: 0 additions & 18 deletions bmt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@
<addOn>h2-database:default</addOn>
</addOns>
</discover-provisioning-info>
<!--
Rename the output war to ROOT.war before adding it to the server, so that the
application is deployed in the root web context.
-->
<name>ROOT.war</name>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -183,11 +178,6 @@
<addOn>h2-database:default</addOn>
</addOns>
</discover-provisioning-info>
<!--
The parent POM's 'openshift' profile renames the output archive to ROOT.war so that the
application is deployed in the root web context. Add ROOT.war to the server.
-->
<filename>ROOT.war</filename>
</configuration>
<executions>
<execution>
Expand All @@ -197,14 +187,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<warName>ROOT</warName>
</configuration>
</plugin>
<!-- do not attach sources to openshift deployments -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public class BasicRuntimeIT {

private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/bmt";
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080";

@Test
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
Expand All @@ -45,7 +45,7 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti
serverHost = DEFAULT_SERVER_HOST;
}
final HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(serverHost+"/BMT"))
.uri(new URI(serverHost+"/bmt/BMT"))
.GET()
.build();
final HttpClient client = HttpClient.newBuilder()
Expand Down
18 changes: 0 additions & 18 deletions cmt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,6 @@
<addOn>h2-database:default</addOn>
</addOns>
</discover-provisioning-info>
<!--
Rename the output war to ROOT.war before adding it to the server, so that the
application is deployed in the root web context.
-->
<name>ROOT.war</name>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -187,11 +182,6 @@
<addOn>h2-database:default</addOn>
</addOns>
</discover-provisioning-info>
<!--
The parent POM's 'openshift' profile renames the output archive to ROOT.war so that the
application is deployed in the root web context. Add ROOT.war to the server.
-->
<filename>ROOT.war</filename>
</configuration>
<executions>
<execution>
Expand All @@ -201,14 +191,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<warName>ROOT</warName>
</configuration>
</plugin>
<!-- do not attach sources to openshift deployments -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ public class CustomerIT {
protected URI getHTTPEndpoint(String path) {
String host = getServerHost();
if (host == null) {
host = "http://localhost:8080/cmt";
host = "http://localhost:8080";
}
host += "/cmt";
try {
return new URI(host + path);
} catch (URISyntaxException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public class BasicRuntimeIT {

private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/cmt";
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080";

@Test
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
Expand All @@ -45,7 +45,7 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti
serverHost = DEFAULT_SERVER_HOST;
}
final HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(serverHost+"/"))
.uri(new URI(serverHost+"/cmt"))
.GET()
.build();
final HttpClient client = HttpClient.newBuilder()
Expand Down
18 changes: 0 additions & 18 deletions ee-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@
<discover-provisioning-info>
<version>${version.server}</version>
</discover-provisioning-info>
<!--
Rename the output war to ROOT.war before adding it to the server, so that the
application is deployed in the root web context.
-->
<name>ROOT.war</name>
<packaging-scripts>
<packaging-script>
<scripts>
Expand Down Expand Up @@ -168,11 +163,6 @@
<version>${version.server}</version>
<context>cloud</context>
</discover-provisioning-info>
<!--
The parent POM's 'openshift' profile renames the output archive to ROOT.war so that the
application is deployed in the root web context. Add ROOT.war to the server.
-->
<filename>ROOT.war</filename>
<packaging-scripts>
<packaging-script>
<scripts>
Expand All @@ -191,14 +181,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<warName>ROOT</warName>
</configuration>
</plugin>
<!-- do not attach sources to openshift deployments -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
* @author Emmanuel Hugonnet (c) 2022 Red Hat, Inc.
*/
public class BasicRuntimeIT {
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/ee-security";
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080";

protected URI getHTTPEndpoint() {
String host = getServerHost();
if (host == null) {
host = DEFAULT_SERVER_HOST;
}
try {
return new URI(host + "/secured");
return new URI(host + "/ee-security/secured");
} catch (URISyntaxException ex) {
throw new RuntimeException(ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import static org.junit.Assert.assertEquals;

public class BasicRuntimeIT {
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/ejb-multi-server-app-main-web/";
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080";

@Test
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
Expand All @@ -22,7 +22,7 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti
serverHost = DEFAULT_SERVER_HOST;
}
final HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(serverHost+"/"))
.uri(new URI(serverHost+"/ejb-multi-server-app-main-web"))
.GET()
.build();
final HttpClient client = HttpClient.newBuilder()
Expand Down
Loading

0 comments on commit 42aeafe

Please sign in to comment.