Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically detect correct build profile (no more -Pcomplete) #403

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ jobs:
distribution: temurin
java-version: 17
- name: Microservices build with Maven
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml -Pcomplete
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml
- name: Native build with Maven
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml -Pnative -Dquarkus.native.container-build=true -DskipITs
- name: Extension build with Maven
run: mvn -B install -f quarkus-workshop-super-heroes/super-heroes/extension-version/pom.xml
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml -Pnative -Dquarkus.native.container-build=true -DskipITs -pl '!:rest-narration,!:extension-version'
docs:
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zips.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Skeleton build with Maven
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml -Pnative -Dquarkus.native.container-build=true -DskipITs
- name: Microservices build with Maven
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml -Pcomplete
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml
- name: Extension build with Maven
run: mvn -B install -f quarkus-workshop-super-heroes/super-heroes/extension-version/pom.xml
publication:
Expand Down
3 changes: 1 addition & 2 deletions quarkus-workshop-super-heroes/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ $ docker compose rm
To build the entire code, you need to run the following commands from the root project (also see how we activate the `complete` profile):

```bash
$ mvn clean install -f super-heroes/extension-version
$ mvn clean install -Pcomplete
$ mvn clean install
```

== Running the complete system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,26 +134,6 @@ If you are stuck, you can always look at the final code in the {github-url}[GitH

Oh, and be ready to have some fun!


=== The completed workshop

If you want to build the completed workshop, after you've unzipped the {github-raw}/dist/quarkus-super-heroes-workshop-complete.zip[`quarkus-super-heroes-workshop-complete.zip`] file, you would need to run the following command from the root project:

[source, shell]
----
$ ./mvnw clean install -Pcomplete
----

ifdef::use-extension[]
The extension can be built with the following command:

[source, shell]
----
$ ./mvnw clean install -f super-heroes/extension-version
----
endif::use-extension[]


== Software Requirements

First of all, make sure you have a 64-bit computer with admin rights (so you can install all the needed tools) and at least 8Gb of RAM (as some tools need a few resources).
Expand Down
20 changes: 19 additions & 1 deletion quarkus-workshop-super-heroes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
<profiles>
<profile>
<id>complete</id>
<activation>
<file>
<exists>super-heroes/extension-version</exists>
</file>
</activation>
<modules>
<module>super-heroes/extension-version</module>
<module>super-heroes/rest-villains</module>
Expand All @@ -114,15 +119,28 @@
</profile>
<profile>
<id>core</id>
<activation>
<file>
<missing>super-heroes/extension-version</missing>
<exists>super-heroes/rest-villains</exists>
<!-- We do the selection this way around, because if this profile triggers in the complete case, the reactor order ends up wrong when the next profile triggers-->
</file>
</activation>
<modules>
<module>super-heroes/rest-villains</module>
<module>super-heroes/rest-heroes</module>
<module>super-heroes/rest-fights</module>
</modules>
</profile>
<profile>
<id>full</id>
<id>full</id> <!-- Needs to be manually invoked or it will trigger in the CI, #280 should fix -->
<modules>
<module>super-heroes/extension-version</module>
<module>super-heroes/rest-villains</module>
<module>super-heroes/rest-heroes</module>
<module>super-heroes/rest-fights</module>
<module>super-heroes/event-statistics</module>
<module>super-heroes/rest-narration</module>
<module>docs</module>
</modules>
</profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ USER quarkus
WORKDIR /code
COPY --chown=quarkus:quarkus . ${WORKDIR}

RUN ./mvnw -B clean install -DskipTests -Pcomplete -pl :extension-version-parent -amd
RUN ./mvnw -B clean install -DskipTests -pl :extension-version-parent -amd
RUN ./mvnw -B clean package -f super-heroes/rest-villains -DskipTests -Pnative

## Stage 2 : create the docker final image
Expand Down
Loading