Skip to content

Commit

Permalink
Merge pull request #656 from pjgg/feat/swapp_upstream
Browse files Browse the repository at this point in the history
Move to Quarkus 999-SNAPSHOT including daily and PR CI
  • Loading branch information
jsmrcka authored May 25, 2022
2 parents 9d1ef81 + 5454a4f commit d1d6998
Show file tree
Hide file tree
Showing 18 changed files with 179 additions and 118 deletions.
49 changes: 19 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
- name: Build Quarkus 2.7
- name: Build Quarkus main
run: |
git clone https://github.com/quarkusio/quarkus.git && cd quarkus && git checkout 2.7 && ./mvnw -B -s .github/mvn-settings.xml clean install -Dquickly -Prelocations -pl devtools/cli -am
git clone https://github.com/quarkusio/quarkus.git && cd quarkus && ./mvnw -B -s .github/mvn-settings.xml clean install -Dquickly -Prelocations
- name: Tar Maven Repo
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
Expand Down Expand Up @@ -111,17 +111,13 @@ jobs:
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Build Quarkus CLI
- name: Install Quarkus CLI
run: |
git clone https://github.com/quarkusio/quarkus.git && cd quarkus/devtools/cli && git checkout 2.7 && mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly -Prelocations
# TODO https://github.com/quarkus-qe/quarkus-test-suite/issues/632
# - name: Install Quarkus CLI
# run: |
# cat <<EOF > ./quarkus-dev-cli
# #!/bin/bash
# java -jar $PWD/quarkus/devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
# EOF
# chmod +x ./quarkus-dev-cli
cat <<EOF > ./quarkus-dev-cli
#!/bin/bash
java -jar ~/.m2/repository/io/quarkus/quarkus-cli/999-SNAPSHOT/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
EOF
chmod +x ./quarkus-dev-cli
- name: Build with Maven
run: |
MODULES_MAVEN_PARAM=""
Expand All @@ -130,9 +126,7 @@ jobs:
MODULES_MAVEN_PARAM="-pl ${MODULES_ARG}"
fi
mvn -fae -V -B -s .github/mvn-settings.xml clean verify -Dall-modules $MODULES_MAVEN_PARAM
# TODO https://github.com/quarkus-qe/quarkus-test-suite/issues/632
# mvn -fae -V -B -s .github/mvn-settings.xml clean verify -Dall-modules -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" $MODULES_MAVEN_PARAM
mvn -fae -V -B -s .github/mvn-settings.xml clean verify -Dall-modules -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" $MODULES_MAVEN_PARAM -am
- name: Zip Artifacts
if: failure()
run: |
Expand Down Expand Up @@ -171,26 +165,21 @@ jobs:
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo.tgz -C ~
# TODO https://github.com/quarkus-qe/quarkus-test-suite/issues/632
# - name: Build Quarkus CLI
# run: |
# git clone https://github.com/quarkusio/quarkus.git && cd quarkus/devtools/cli && git checkout 2.7 && mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly -Prelocations
# - name: Install Quarkus CLI
# run: |
# cat <<EOF > ./quarkus-dev-cli
# #!/bin/bash
# java -jar $PWD/quarkus/devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
# EOF
# chmod +x ./quarkus-dev-cli
- name: Install Quarkus CLI
run: |
cat <<EOF > ./quarkus-dev-cli
#!/bin/bash
java -jar ~/.m2/repository/io/quarkus/quarkus-cli/999-SNAPSHOT/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
EOF
chmod +x ./quarkus-dev-cli
- name: Build with Maven
run: |
if [[ -n ${MODULES_ARG} ]]; then
echo "Running modules: ${MODULES_ARG}"
mvn -fae -V -B -s .github/mvn-settings.xml -fae -Dall-modules -Dquarkus.container-image.build=false \
-pl $MODULES_ARG clean verify -Dnative
-Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" \
-pl $MODULES_ARG clean verify -Dnative -am
fi
# TODO https://github.com/quarkus-qe/quarkus-test-suite/issues/632
# -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"
- name: Zip Artifacts
if: failure()
run: |
Expand Down Expand Up @@ -235,7 +224,7 @@ jobs:
MODULES_MAVEN_PARAM="-pl ${MODULES_ARG}"
fi
mvn -fae -s .github/mvn-settings.xml clean verify -Dall-modules -Dquarkus.container-image.build=false $MODULES_MAVEN_PARAM
mvn -fae -s .github/mvn-settings.xml clean verify -Dall-modules -Dquarkus.container-image.build=false $MODULES_MAVEN_PARAM -am
- name: Zip Artifacts
shell: bash
if: failure()
Expand Down
49 changes: 19 additions & 30 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
- name: Build Quarkus 2.7
- name: Build Quarkus main
run: |
git clone https://github.com/quarkusio/quarkus.git && cd quarkus && git checkout 2.7 && ./mvnw -B -s .github/mvn-settings.xml clean install -Dquickly -Prelocations
git clone https://github.com/quarkusio/quarkus.git && cd quarkus && ./mvnw -B -s .github/mvn-settings.xml clean install -Dquickly -Prelocations
- name: Tar Maven Repo
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
Expand Down Expand Up @@ -60,22 +60,16 @@ jobs:
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo.tgz -C ~
# TODO https://github.com/quarkus-qe/quarkus-test-suite/issues/632
# - name: Build Quarkus CLI
# run: |
# git clone https://github.com/quarkusio/quarkus.git && cd quarkus/devtools/cli && git checkout 2.7 && mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly -Prelocations
# - name: Install Quarkus CLI
# run: |
# cat <<EOF > ./quarkus-dev-cli
# #!/bin/bash
# java -jar $PWD/quarkus/devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
# EOF
# chmod +x ./quarkus-dev-cli
- name: Install Quarkus CLI
run: |
cat <<EOF > ./quarkus-dev-cli
#!/bin/bash
java -jar ~/.m2/repository/io/quarkus/quarkus-cli/999-SNAPSHOT/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
EOF
chmod +x ./quarkus-dev-cli
- name: Test in JVM mode
run: |
mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -P ${{ matrix.profiles }}
# TODO https://github.com/quarkus-qe/quarkus-test-suite/issues/632
# -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"
mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -P ${{ matrix.profiles }} -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"
- name: Zip Artifacts
if: failure()
run: |
Expand Down Expand Up @@ -118,23 +112,18 @@ jobs:
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo.tgz -C ~
# TODO https://github.com/quarkus-qe/quarkus-test-suite/issues/632
# - name: Build Quarkus CLI
# run: |
# git clone https://github.com/quarkusio/quarkus.git && cd quarkus/devtools/cli && git checkout 2.7 && mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly -Prelocations
# - name: Install Quarkus CLI
# run: |
# cat <<EOF > ./quarkus-dev-cli
# #!/bin/bash
# java -jar $PWD/quarkus/devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
# EOF
# chmod +x ./quarkus-dev-cli
- name: Install Quarkus CLI
run: |
cat <<EOF > ./quarkus-dev-cli
#!/bin/bash
java -jar ~/.m2/repository/io/quarkus/quarkus-cli/999-SNAPSHOT/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
EOF
chmod +x ./quarkus-dev-cli
- name: Test in Native mode
run: |
mvn -fae -V -B -s .github/mvn-settings.xml -P ${{ matrix.profiles }} -fae clean verify -Dnative \
-Dquarkus.native.builder-image=quay.io/quarkus/${{ matrix.image }}
# TODO https://github.com/quarkus-qe/quarkus-test-suite/issues/632
# -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"
-Dquarkus.native.builder-image=quay.io/quarkus/${{ matrix.image }} \
-Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"
- name: Zip Artifacts
if: failure()
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.jboss.resteasy.reactive.MultipartForm;
import org.jboss.resteasy.reactive.RestResponse;

import io.quarkus.logging.Log;
import io.smallrye.mutiny.Uni;
Expand Down Expand Up @@ -51,10 +51,10 @@ public Uni<String> uploadMultipart(@MultipartForm FileWrapper body) {
@GET
@Produces(MediaType.MULTIPART_FORM_DATA)
@Path("/download-multipart")
public Response downloadMultipart() {
public RestResponse downloadMultipart() {
FileWrapper wrapper = new FileWrapper();
wrapper.file = FILE;
return Response.ok(wrapper).build();
return RestResponse.ok(wrapper);
}

@GET
Expand Down
2 changes: 1 addition & 1 deletion messaging/kafka-confluent-avro-reactive-messaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!-- with this, you don't have to use avro-maven-plugin -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-avro</artifactId>
<artifactId>quarkus-confluent-registry-avro</artifactId>
</dependency>
<!-- Confluent AVRO libraries -->
<dependency>
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<failsafe-plugin.version>2.22.2</failsafe-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>2.7.5.Final</quarkus.platform.version>
<quarkus.platform.version>999-SNAPSHOT</quarkus.platform.version>
<quarkus.qe.framework.version>1.1.0.Final</quarkus.qe.framework.version>
<quarkus-qpid-jms.version>0.32.0</quarkus-qpid-jms.version>
<quarkus-ide-config.version>2.6.1.Final</quarkus-ide-config.version>
Expand All @@ -31,6 +31,7 @@
<jjwt.version>0.11.5</jjwt.version>
<camel-quarkus-bom.version>2.7.1</camel-quarkus-bom.version>
<quarkiverse.config.version>1.0.2</quarkiverse.config.version>
<smallrye-stork.version>1.1.2</smallrye-stork.version>
<profile.id>jvm</profile.id>
<!-- S2i configuration -->
<ts.global.s2i.quarkus.jvm.builder.image>registry.access.redhat.com/ubi8/openjdk-11:latest</ts.global.s2i.quarkus.jvm.builder.image>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
@DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification")
public class QuarkusCliCreateJvmApplicationIT {

static final String RESTEASY_EXTENSION = "quarkus-resteasy";
static final String RESTEASY_REACTIVE_EXTENSION = "quarkus-resteasy-reactive";
static final String SMALLRYE_HEALTH_EXTENSION = "quarkus-smallrye-health";
static final String SPRING_WEB_EXTENSION = "quarkus-spring-web";
static final String RESTEASY_JACKSON_EXTENSION = "quarkus-resteasy-jackson";
static final String RESTEASY_REACTIVE_JACKSON_EXTENSION = "quarkus-resteasy-reactive-jackson";
static final String ROOT_FOLDER = "";
static final String DOCKER_FOLDER = "/src/main/docker";
static final String JDK_11 = "11";
Expand Down Expand Up @@ -78,7 +78,6 @@ public void shouldCreateApplicationOnJvm() {

@Tag("QUARKUS-1472")
@Test
@Disabled("https://github.com/quarkusio/quarkus/issues/24613")
public void createAppShouldAutoDetectJavaVersion() {
QuarkusCliRestService app = cliClient.createApplication("app", defaultWithFixedStream());
assertExpectedJavaVersion(getFileFromApplication(app, ROOT_FOLDER, "pom.xml"), getSystemJavaVersion());
Expand Down Expand Up @@ -152,23 +151,24 @@ public void shouldCreateApplicationOnJvmFromMultipleBoms() {
final String kogitoExtension = "kogito-quarkus-rules";
final String prettytimeExtension = "quarkus-prettytime";
QuarkusCliRestService app = cliClient.createApplication("app", defaultWithFixedStream().withExtensions(kogitoExtension,
prettytimeExtension, RESTEASY_EXTENSION, RESTEASY_JACKSON_EXTENSION));
prettytimeExtension, RESTEASY_REACTIVE_EXTENSION, RESTEASY_REACTIVE_JACKSON_EXTENSION));

// Should build on Jvm
Result result = app.buildOnJvm();
assertTrue(result.isSuccessful(), "The application didn't build on JVM. Output: " + result.getOutput());
assertInstalledExtensions(app, kogitoExtension, prettytimeExtension, RESTEASY_EXTENSION, RESTEASY_JACKSON_EXTENSION);
assertInstalledExtensions(app, kogitoExtension, prettytimeExtension, RESTEASY_REACTIVE_EXTENSION,
RESTEASY_REACTIVE_JACKSON_EXTENSION);
}

@Tag("QUARKUS-1071")
@Test
public void shouldCreateApplicationWithCodeStarter() {
// Create application with Resteasy Jackson + Spring Web (we need both for the app to run)
QuarkusCliRestService app = cliClient.createApplication("app",
defaultWithFixedStream().withExtensions(RESTEASY_JACKSON_EXTENSION, SPRING_WEB_EXTENSION));
defaultWithFixedStream().withExtensions(RESTEASY_REACTIVE_JACKSON_EXTENSION, SPRING_WEB_EXTENSION));

// Verify By default, it installs only "quarkus-resteasy-jackson" and "quarkus-spring-web"
assertInstalledExtensions(app, RESTEASY_JACKSON_EXTENSION, SPRING_WEB_EXTENSION);
// Verify By default, it installs only "quarkus-resteasy-reactive-jackson" and "quarkus-spring-web"
assertInstalledExtensions(app, RESTEASY_REACTIVE_JACKSON_EXTENSION, SPRING_WEB_EXTENSION);

// Start using DEV mode
app.start();
Expand All @@ -183,14 +183,14 @@ public void shouldAddAndRemoveExtensions() {
QuarkusCliRestService app = cliClient.createApplication("app", defaults().withPlatformBom(gav));

// By default, it installs only "quarkus-resteasy"
assertInstalledExtensions(app, RESTEASY_EXTENSION);
assertInstalledExtensions(app, RESTEASY_REACTIVE_EXTENSION);

// Let's install Quarkus SmallRye Health
Result result = app.installExtension(SMALLRYE_HEALTH_EXTENSION);
assertTrue(result.isSuccessful(), SMALLRYE_HEALTH_EXTENSION + " was not installed. Output: " + result.getOutput());

// Verify both extensions now
assertInstalledExtensions(app, RESTEASY_EXTENSION, SMALLRYE_HEALTH_EXTENSION);
assertInstalledExtensions(app, RESTEASY_REACTIVE_EXTENSION, SMALLRYE_HEALTH_EXTENSION);

// The health endpoint should be now available
app.start();
Expand All @@ -210,7 +210,7 @@ public void shouldAddAndRemoveExtensions() {
@Test
public void shouldCreateJacocoReportsFromApplicationOnJvm() {
QuarkusCliRestService app = cliClient.createApplication("app-with-jacoco",
defaultWithFixedStream().withExtensions("jacoco"));
defaultWithFixedStream().withExtensions("resteasy", "jacoco"));

Result result = app.buildOnJvm();
assertTrue(result.isSuccessful(), "The application didn't build on JVM. Output: " + result.getOutput());
Expand All @@ -226,7 +226,7 @@ public void shouldCreateJacocoReportsFromApplicationOnJvm() {
@Test
public void verifyRestEasyReactiveAndClassicResteasyCollisionUserMsg() {
QuarkusCliRestService app = cliClient.createApplication("dependencyCollision",
defaults().withExtensions("resteasy", "resteasy-reactive"));
defaultWithFixedStream().withExtensions("resteasy", "resteasy-reactive"));

Result buildResult = app.buildOnJvm();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.quarkus.ts.quarkus.cli;

import static io.quarkus.ts.quarkus.cli.QuarkusCliUtils.getCurrentStreamVersion;
import static io.quarkus.ts.quarkus.cli.QuarkusCliUtils.isUpstream;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.util.ArrayList;
Expand Down Expand Up @@ -44,31 +45,39 @@ public class QuarkusCliExtensionsIT {

@Test
public void shouldListExtensionsUsingDefaults() {
whenGetListExtensions("--stream", getCurrentStreamVersion());
whenGetListExtensions(getDefaultAppArgs().toArray(new String[0]));
assertListDefaultOptionOutput();
}

@Test
public void shouldListExtensionsUsingName() {
whenGetListExtensions("--stream", getCurrentStreamVersion(), "--name");
List<String> args = getDefaultAppArgs();
args.add("--name");
whenGetListExtensions(args.toArray(new String[0]));
assertListNameOptionOutput();
}

@Test
public void shouldListExtensionsUsingOrigins() {
whenGetListExtensions("--stream", getCurrentStreamVersion(), "--origins");
List<String> args = getDefaultAppArgs();
args.add("--origins");
whenGetListExtensions(args.toArray(new String[0]));
assertListOriginsOptionOutput();
}

@Test
public void shouldListExtensionsUsingConcise() {
whenGetListExtensions("--stream", getCurrentStreamVersion(), "--concise");
List<String> args = getDefaultAppArgs();
args.add("--concise");
whenGetListExtensions(args.toArray(new String[0]));
assertListConciseOptionOutput();
}

@Test
public void shouldListExtensionsUsingFull() {
whenGetListExtensions("--stream", getCurrentStreamVersion(), "--full");
List<String> args = getDefaultAppArgs();
args.add("--full");
whenGetListExtensions(args.toArray(new String[0]));
assertListFullOptionOutput();
}

Expand Down Expand Up @@ -103,7 +112,9 @@ public void shouldListExtensionsUsingStream() {

@Test
public void shouldListExtensionsUsingInstallable() {
whenGetListExtensions("--stream", getCurrentStreamVersion(), "--installable");
List<String> args = getDefaultAppArgs();
args.add("--installable");
whenGetListExtensions(args.toArray(new String[0]));
assertListDefaultOptionOutput();
}

Expand Down Expand Up @@ -158,4 +169,14 @@ private void assertListFullOptionOutput() {
private void assertResultIsSuccessful() {
assertTrue(result.isSuccessful(), "Extensions list command didn't work. Output: " + result.getOutput());
}
}

private List<String> getDefaultAppArgs() {
String version = getCurrentStreamVersion();
List<String> args = new ArrayList<>();
if (!isUpstream(version)) {
args.addAll(Arrays.asList("--stream", version));
}

return args;
}
}
Loading

0 comments on commit d1d6998

Please sign in to comment.