Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

feature: Add Quarkus generator and health check enricher #1577

Merged
merged 7 commits into from
Mar 25, 2019

Conversation

rhuss
Copy link
Contributor

@rhuss rhuss commented Mar 17, 2019

No description provided.

@rhuss
Copy link
Contributor Author

rhuss commented Mar 18, 2019

These are my changes which I added to make Quarkus run out of the box with 4.1

Actually its a bit more (sorry, there has been some changes slipped in, I'm a bit in a hurry):

  • Includes also feature(resource): Remove runtimeMode from fabric8:resource #1576
  • Switched the order for picking up properties for generators: Now system properties (provided from the outside) override project properties from the pom. Actually I consider the former behaviour a bug as it was not possible to ovveride a property with -D when set in .
    This Quarkus support uses either the java mode or, when "native" config is set, the native GraalVM mode for building the image. Also, if smallrye-healthcheck is added as a dependency, liveness and readiness checks are added.

See also the sample I added.

The generator could be improved: Currently, it detects only works when it detects the appropriate jars in target/ to find out the file names. However, since the generators are also run for enriching, and enriching typically happens before compile/package (so no jars are there already), the generator should get the name of the generated jars from the Maven pom. Just had no time to find out, how Quarkus names these jars and how to get it from the pom.

@codecov
Copy link

codecov bot commented Mar 18, 2019

Codecov Report

Merging #1577 into master will decrease coverage by 0.1%.
The diff coverage is 28.35%.

@@             Coverage Diff              @@
##             master    #1577      +/-   ##
============================================
- Coverage     36.05%   35.94%   -0.11%     
- Complexity     1128     1130       +2     
============================================
  Files           181      181              
  Lines         10021    10067      +46     
  Branches       1630     1631       +1     
============================================
+ Hits           3613     3619       +6     
- Misses         5977     6015      +38     
- Partials        431      433       +2

@rohanKanojia rohanKanojia force-pushed the pr/quarkus-generator branch from 902de68 to 26af044 Compare March 18, 2019 12:01
import io.fabric8.maven.core.util.Configs;
import io.fabric8.maven.enricher.api.MavenEnricherContext;

import static io.fabric8.maven.core.util.Configs.asBoolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import :-)

@@ -22,6 +22,7 @@
import java.util.Map;

import io.fabric8.maven.core.util.Configs;
import io.fabric8.maven.core.util.FileUtil;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

.withParam("-Dquarkus.http.host=0.0.0.0")
.build())
.workdir("/");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice in my opinion if we keep these values in static constants..

labels.put(BuildLabelAnnotations.VCS_URL.value(), gitRemoteUrl);
} else {
log.warn("Could not detect any git remote");
if (repository != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@rohanKanojia rohanKanojia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, Looks awesome 💚

Would really appreciate if you could add a README to your sample on how to try that sample out. I've seen that our samples got outdated with time and most people tend to forget how those samples used to run/what was their purpose.

@rohanKanojia rohanKanojia force-pushed the pr/quarkus-generator branch from 60b52b5 to cab69f6 Compare March 20, 2019 07:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants