Skip to content

Commit

Permalink
fix: gradle image build should use the Quarkus generator for Quarkus …
Browse files Browse the repository at this point in the history
…projects eclipse-jkube#1047

Signed-off-by: Sun Seng David TAN <sutan@redhat.com>
  • Loading branch information
sunix committed Dec 6, 2021
1 parent c5a570c commit e30a7d1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ public static String resolveQuarkusLivenessPath(JavaProject javaProject) {

public static boolean hasQuarkusPlugin(JavaProject javaProject) {
return JKubeProjectUtil.hasPlugin(javaProject, QUARKUS_GROUP_ID, "quarkus-maven-plugin") ||
JKubeProjectUtil.hasPlugin(javaProject, QUARKUS_PLATFORM_GROUP_ID, "quarkus-maven-plugin");
JKubeProjectUtil.hasPlugin(javaProject, QUARKUS_PLATFORM_GROUP_ID, "quarkus-maven-plugin") ||
JKubeProjectUtil.hasPlugin(javaProject, QUARKUS_GROUP_ID, "io.quarkus.gradle.plugin");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,23 @@ public void isApplicable_withQuarkusPlatformGroupIdPlugin_shouldReturnTrue() {
assertThat(result).isTrue();
}

@Test
public void isApplicable_withQuarkusGradlePlugin_shouldReturnTrue() {
// Given
// @formatter:off
new Expectations() {{
project.getPlugins(); result = Collections.singletonList(Plugin.builder()
.groupId("io.quarkus")
.artifactId("io.quarkus.gradle.plugin")
.build());
}};
// @formatter:on
// When
final boolean result = new QuarkusGenerator(ctx).isApplicable(new ArrayList<>());
// Then
assertThat(result).isTrue();
}

@Test
public void customize_inOpenShift_shouldReturnS2iFrom() {
// Given
Expand Down

0 comments on commit e30a7d1

Please sign in to comment.