Skip to content

Commit 82ceea0

Browse files
committed
[WFLY-19810] never deploys quickstarts at root web context
1 parent e0672d2 commit 82ceea0

File tree

128 files changed

+194
-1013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+194
-1013
lines changed

.github/workflows/quickstart_ci.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Abstract CI for a specific quickstart
2+
# If you are updating this please note that there are exceptions not using this: ejb-txn-remote-call
3+
14
name: WildFly Quickstart CI
25

36
on:
@@ -37,11 +40,6 @@ on:
3740
required: false
3841
default: '"ubuntu-latest", "windows-latest"'
3942
type: string
40-
SERVER_PROVISIONING_SERVER_HOST:
41-
description: 'the server.host arg to be used when testing server provisioning with the mvn verify command'
42-
required: false
43-
default: 'http://localhost:8080'
44-
type: string
4543
EXTRA_RUN_ARGS:
4644
description: 'optional args to be passed when running the quickstart'
4745
required: false
@@ -122,7 +120,7 @@ jobs:
122120
echo "Starting provisioned server..."
123121
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }}
124122
echo "Testing provisioned server..."
125-
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
123+
mvn -fae verify -Pintegration-testing
126124
echo "Shutting down provisioned server..."
127125
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown
128126
shell: bash
@@ -136,7 +134,7 @@ jobs:
136134
echo "Starting bootable jar..."
137135
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start-jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }}
138136
echo "Testing bootable jar..."
139-
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing
137+
mvn -fae verify -Pintegration-testing
140138
echo "Shutting down bootable jar..."
141139
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown
142140
shell: bash
@@ -145,7 +143,7 @@ jobs:
145143
run: |
146144
cd quickstarts
147145
cd ${{ inputs.QUICKSTART_PATH }}
148-
mvn -fae clean package -Popenshift
146+
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Popenshift
149147
shell: bash
150148
- name: Run after script
151149
env:
@@ -229,7 +227,7 @@ jobs:
229227
echo "Starting provisioned server..."
230228
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 }}
231229
echo "Testing provisioned server..."
232-
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
230+
mvn -fae verify -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
233231
echo "Shutting down provisioned server..."
234232
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
235233
shell: bash
@@ -243,7 +241,7 @@ jobs:
243241
echo "Starting bootable jar..."
244242
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 }}
245243
echo "Testing bootable jar..."
246-
mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
244+
mvn -fae verify -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
247245
echo "Shutting down bootable jar..."
248246
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
249247
shell: bash
@@ -252,7 +250,7 @@ jobs:
252250
run: |
253251
cd quickstarts
254252
cd ${{ inputs.QUICKSTART_PATH }}
255-
mvn -fae clean package -Popenshift -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
253+
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Popenshift -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
256254
shell: bash
257255
- name: Run after script
258256
env:

.github/workflows/quickstart_ejb-txn-remote-call_ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ jobs:
9191
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}}
9292
echo "Testing provisioned server..."
9393
cd ../client
94-
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8080/client -Pintegration-testing
94+
mvn -fae verify -Pintegration-testing
9595
cd ../server
96-
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8180/server -Pintegration-testing
97-
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8280/server -Pintegration-testing
96+
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8180 -Pintegration-testing
97+
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8280 -Pintegration-testing
9898
echo "Shutting down provisioned server..."
9999
cd ../client
100100
mvn wildfly:shutdown
@@ -200,10 +200,10 @@ jobs:
200200
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 }}
201201
echo "Testing provisioned server..."
202202
cd ../client
203-
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8080/client -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
203+
mvn -fae verify -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
204204
cd ../server
205-
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8180/server -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
206-
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8280/server -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
205+
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8180 -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
206+
mvn -fae verify -Dserver.host=${{ env.SERVER_PROVISIONING_SERVER_HOST }}:8280 -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
207207
echo "Shutting down provisioned server..."
208208
cd ../client
209209
mvn wildfly:shutdown -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}

.github/workflows/quickstart_helloworld-mutual-ssl-secured_ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ jobs:
1212
uses: ./.github/workflows/quickstart_ci.yml
1313
with:
1414
QUICKSTART_PATH: helloworld-mutual-ssl-secured
15-
SERVER_PROVISIONING_SERVER_HOST: https://localhost:8443/
1615
TEST_PROVISIONED_SERVER: true
1716
TEST_OPENSHIFT: false

.github/workflows/quickstart_helloworld-mutual-ssl_ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ jobs:
1212
uses: ./.github/workflows/quickstart_ci.yml
1313
with:
1414
QUICKSTART_PATH: helloworld-mutual-ssl
15-
SERVER_PROVISIONING_SERVER_HOST: https://localhost:8443/
1615
TEST_PROVISIONED_SERVER: true
1716
TEST_OPENSHIFT: false

batch-processing/pom.xml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,6 @@
208208
<addOn>h2-database:default</addOn>
209209
</addOns>
210210
</discover-provisioning-info>
211-
<!--
212-
Rename the output war to ROOT.war before adding it to the server, so that the
213-
application is deployed in the root web context.
214-
-->
215-
<name>ROOT.war</name>
216211
</configuration>
217212
<executions>
218213
<execution>
@@ -240,11 +235,6 @@
240235
<addOn>h2-database:default</addOn>
241236
</addOns>
242237
</discover-provisioning-info>
243-
<!--
244-
The parent POM's 'openshift' profile renames the output archive to ROOT.war so that the
245-
application is deployed in the root web context. Add ROOT.war to the server.
246-
-->
247-
<filename>ROOT.war</filename>
248238
</configuration>
249239
<executions>
250240
<execution>
@@ -254,22 +244,6 @@
254244
</execution>
255245
</executions>
256246
</plugin>
257-
<plugin>
258-
<groupId>org.apache.maven.plugins</groupId>
259-
<artifactId>maven-war-plugin</artifactId>
260-
<version>${version.war.plugin}</version>
261-
<configuration>
262-
<warName>ROOT</warName>
263-
</configuration>
264-
</plugin>
265-
<plugin>
266-
<groupId>org.apache.maven.plugins</groupId>
267-
<artifactId>maven-war-plugin</artifactId>
268-
<version>${version.war.plugin}</version>
269-
<configuration>
270-
<warName>ROOT</warName>
271-
</configuration>
272-
</plugin>
273247
<!-- do not attach sources to openshift deployments -->
274248
<plugin>
275249
<groupId>org.apache.maven.plugins</groupId>

batch-processing/src/test/java/org/wildfly/quickstarts/batch/BasicRuntimeIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
public class BasicRuntimeIT {
3535

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

3838
@Test
3939
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
@@ -45,7 +45,7 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti
4545
serverHost = DEFAULT_SERVER_HOST;
4646
}
4747
final HttpRequest request = HttpRequest.newBuilder()
48-
.uri(new URI(serverHost+"/"))
48+
.uri(new URI(serverHost+"/batch-processing"))
4949
.GET()
5050
.build();
5151
final HttpClient client = HttpClient.newBuilder()

bmt/pom.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@
150150
<addOn>h2-database:default</addOn>
151151
</addOns>
152152
</discover-provisioning-info>
153-
<!--
154-
Rename the output war to ROOT.war before adding it to the server, so that the
155-
application is deployed in the root web context.
156-
-->
157-
<name>ROOT.war</name>
158153
</configuration>
159154
<executions>
160155
<execution>
@@ -183,11 +178,6 @@
183178
<addOn>h2-database:default</addOn>
184179
</addOns>
185180
</discover-provisioning-info>
186-
<!--
187-
The parent POM's 'openshift' profile renames the output archive to ROOT.war so that the
188-
application is deployed in the root web context. Add ROOT.war to the server.
189-
-->
190-
<filename>ROOT.war</filename>
191181
</configuration>
192182
<executions>
193183
<execution>
@@ -197,14 +187,6 @@
197187
</execution>
198188
</executions>
199189
</plugin>
200-
<plugin>
201-
<groupId>org.apache.maven.plugins</groupId>
202-
<artifactId>maven-war-plugin</artifactId>
203-
<version>${version.war.plugin}</version>
204-
<configuration>
205-
<warName>ROOT</warName>
206-
</configuration>
207-
</plugin>
208190
<!-- do not attach sources to openshift deployments -->
209191
<plugin>
210192
<groupId>org.apache.maven.plugins</groupId>

bmt/src/test/java/org/wildfly/quickstarts/cmt/BasicRuntimeIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
public class BasicRuntimeIT {
3535

36-
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/bmt";
36+
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080";
3737

3838
@Test
3939
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
@@ -45,7 +45,7 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti
4545
serverHost = DEFAULT_SERVER_HOST;
4646
}
4747
final HttpRequest request = HttpRequest.newBuilder()
48-
.uri(new URI(serverHost+"/BMT"))
48+
.uri(new URI(serverHost+"/bmt/BMT"))
4949
.GET()
5050
.build();
5151
final HttpClient client = HttpClient.newBuilder()

cmt/pom.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,6 @@
154154
<addOn>h2-database:default</addOn>
155155
</addOns>
156156
</discover-provisioning-info>
157-
<!--
158-
Rename the output war to ROOT.war before adding it to the server, so that the
159-
application is deployed in the root web context.
160-
-->
161-
<name>ROOT.war</name>
162157
</configuration>
163158
<executions>
164159
<execution>
@@ -187,11 +182,6 @@
187182
<addOn>h2-database:default</addOn>
188183
</addOns>
189184
</discover-provisioning-info>
190-
<!--
191-
The parent POM's 'openshift' profile renames the output archive to ROOT.war so that the
192-
application is deployed in the root web context. Add ROOT.war to the server.
193-
-->
194-
<filename>ROOT.war</filename>
195185
</configuration>
196186
<executions>
197187
<execution>
@@ -201,14 +191,6 @@
201191
</execution>
202192
</executions>
203193
</plugin>
204-
<plugin>
205-
<groupId>org.apache.maven.plugins</groupId>
206-
<artifactId>maven-war-plugin</artifactId>
207-
<version>${version.war.plugin}</version>
208-
<configuration>
209-
<warName>ROOT</warName>
210-
</configuration>
211-
</plugin>
212194
<!-- do not attach sources to openshift deployments -->
213195
<plugin>
214196
<groupId>org.apache.maven.plugins</groupId>

cmt/src/test/java/org/jboss/as/quickstarts/cmt/CustomerIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ public class CustomerIT {
4242
protected URI getHTTPEndpoint(String path) {
4343
String host = getServerHost();
4444
if (host == null) {
45-
host = "http://localhost:8080/cmt";
45+
host = "http://localhost:8080";
4646
}
47+
host += "/cmt";
4748
try {
4849
return new URI(host + path);
4950
} catch (URISyntaxException ex) {

cmt/src/test/java/org/wildfly/quickstarts/cmt/BasicRuntimeIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
public class BasicRuntimeIT {
3535

36-
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/cmt";
36+
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080";
3737

3838
@Test
3939
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
@@ -45,7 +45,7 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti
4545
serverHost = DEFAULT_SERVER_HOST;
4646
}
4747
final HttpRequest request = HttpRequest.newBuilder()
48-
.uri(new URI(serverHost+"/"))
48+
.uri(new URI(serverHost+"/cmt"))
4949
.GET()
5050
.build();
5151
final HttpClient client = HttpClient.newBuilder()

ee-security/pom.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@
130130
<discover-provisioning-info>
131131
<version>${version.server}</version>
132132
</discover-provisioning-info>
133-
<!--
134-
Rename the output war to ROOT.war before adding it to the server, so that the
135-
application is deployed in the root web context.
136-
-->
137-
<name>ROOT.war</name>
138133
<packaging-scripts>
139134
<packaging-script>
140135
<scripts>
@@ -168,11 +163,6 @@
168163
<version>${version.server}</version>
169164
<context>cloud</context>
170165
</discover-provisioning-info>
171-
<!--
172-
The parent POM's 'openshift' profile renames the output archive to ROOT.war so that the
173-
application is deployed in the root web context. Add ROOT.war to the server.
174-
-->
175-
<filename>ROOT.war</filename>
176166
<packaging-scripts>
177167
<packaging-script>
178168
<scripts>
@@ -191,14 +181,6 @@
191181
</execution>
192182
</executions>
193183
</plugin>
194-
<plugin>
195-
<groupId>org.apache.maven.plugins</groupId>
196-
<artifactId>maven-war-plugin</artifactId>
197-
<version>${version.war.plugin}</version>
198-
<configuration>
199-
<warName>ROOT</warName>
200-
</configuration>
201-
</plugin>
202184
<!-- do not attach sources to openshift deployments -->
203185
<plugin>
204186
<groupId>org.apache.maven.plugins</groupId>

ee-security/src/test/java/org/jboss/as/quickstarts/ee_security/BasicRuntimeIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
* @author Emmanuel Hugonnet (c) 2022 Red Hat, Inc.
3737
*/
3838
public class BasicRuntimeIT {
39-
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080/ee-security";
39+
private static final String DEFAULT_SERVER_HOST = "http://localhost:8080";
4040

4141
protected URI getHTTPEndpoint() {
4242
String host = getServerHost();
4343
if (host == null) {
4444
host = DEFAULT_SERVER_HOST;
4545
}
4646
try {
47-
return new URI(host + "/secured");
47+
return new URI(host + "/ee-security/secured");
4848
} catch (URISyntaxException ex) {
4949
throw new RuntimeException(ex);
5050
}

ejb-multi-server/app-web/src/test/java/org/jboss/as/quickstarts/ejb/multi/server/BasicRuntimeIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import static org.junit.Assert.assertEquals;
1414

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

1818
@Test
1919
public void testHTTPEndpointIsAvailable() throws IOException, InterruptedException, URISyntaxException {
@@ -22,7 +22,7 @@ public void testHTTPEndpointIsAvailable() throws IOException, InterruptedExcepti
2222
serverHost = DEFAULT_SERVER_HOST;
2323
}
2424
final HttpRequest request = HttpRequest.newBuilder()
25-
.uri(new URI(serverHost+"/"))
25+
.uri(new URI(serverHost+"/ejb-multi-server-app-main-web"))
2626
.GET()
2727
.build();
2828
final HttpClient client = HttpClient.newBuilder()

0 commit comments

Comments
 (0)