Skip to content

Commit

Permalink
Merge pull request quarkusio#28038 from michalvavrik/feature/openshif…
Browse files Browse the repository at this point in the history
…t-missing-jar-path

OpenShift - Fix missing path to JAR that breaks app start
  • Loading branch information
geoand authored Sep 19, 2022
2 parents 05a55d0 + e064c1c commit 9bc683f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class OpenshiftProcessor {
public static final String OPENSHIFT = "openshift";
private static final String BUILD_CONFIG_NAME = "openshift.io/build-config.name";
private static final String RUNNING = "Running";
private static final String JAVA_APP_JAR = "JAVA_APP_JAR";

private static final int LOG_TAIL_SIZE = 10;
private static final Logger LOG = Logger.getLogger(OpenshiftProcessor.class);
Expand Down Expand Up @@ -160,8 +161,10 @@ public void openshiftRequirementsJvm(OpenshiftConfig openshiftConfig,
cmd.add("java");
cmd.addAll(config.getEffectiveJvmArguments());
cmd.addAll(Arrays.asList("-jar", pathToJar));
envProducer.produce(KubernetesEnvBuildItem.createSimpleVar("JAVA_APP_JAR", pathToJar, null));
envProducer.produce(KubernetesEnvBuildItem.createSimpleVar(JAVA_APP_JAR, pathToJar, null));
commandProducer.produce(KubernetesCommandBuildItem.command(cmd));
} else if (baseImage.isEmpty()) {
envProducer.produce(KubernetesEnvBuildItem.createSimpleVar(JAVA_APP_JAR, pathToJar, null));
}
}
}
Expand Down

0 comments on commit 9bc683f

Please sign in to comment.