Skip to content

Commit

Permalink
Merge pull request quarkusio#38559 from gsmet/fix-openshift-case-2
Browse files Browse the repository at this point in the history
Be a bit more consistent with OpenShift case
  • Loading branch information
gastaldi authored Feb 2, 2024
2 parents e38ba15 + 2cc6cd7 commit 1013b2a
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions devtools/cli/src/main/java/io/quarkus/cli/deploy/Kind.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import io.quarkus.cli.BuildToolContext;
import picocli.CommandLine;

@CommandLine.Command(name = "kind", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Perform the deploy action on kind.", description = "%n"
+ "The command will deploy the application on kind.", footer = "%n"
@CommandLine.Command(name = "kind", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Perform the deploy action on Kind.", description = "%n"
+ "The command will deploy the application on Kind.", footer = "%n"
+ "For example (using default values), it will create a Deployment named '<project.artifactId>' using the image with REPOSITORY='${user.name}/<project.artifactId>' and TAG='<project.version>' and will deploy it to the target cluster.", headerHeading = "%n", commandListHeading = "%nCommands:%n", synopsisHeading = "%nUsage: ", parameterListHeading = "%n", optionListHeading = "Options:%n")
public class Kind extends BaseKubernetesDeployCommand {

Expand Down
4 changes: 2 additions & 2 deletions devtools/cli/src/main/java/io/quarkus/cli/deploy/Knative.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import io.quarkus.cli.BuildToolContext;
import picocli.CommandLine;

@CommandLine.Command(name = "knative", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Perform the deploy action on knative.", description = "%n"
+ "The command will deploy the application on knative.", footer = "%n"
@CommandLine.Command(name = "knative", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Perform the deploy action on Knative.", description = "%n"
+ "The command will deploy the application on Knative.", footer = "%n"
+ "For example (using default values), it will create a Deployment named '<project.artifactId>' using the image with REPOSITORY='${user.name}/<project.artifactId>' and TAG='<project.version>' and will deploy it to the target cluster.", headerHeading = "%n", commandListHeading = "%nCommands:%n", synopsisHeading = "%nUsage: ", parameterListHeading = "%n", optionListHeading = "Options:%n")
public class Knative extends BaseKubernetesDeployCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import io.quarkus.cli.BuildToolContext;
import picocli.CommandLine;

@CommandLine.Command(name = "kubernetes", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Perform the deploy action on kubernetes.", description = "%n"
+ "The command will deploy the application on kubernetes.", footer = "%n"
@CommandLine.Command(name = "kubernetes", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Perform the deploy action on Kubernetes.", description = "%n"
+ "The command will deploy the application on Kubernetes.", footer = "%n"
+ "For example (using default values), it will create a Deployment named '<project.artifactId>' using the image with REPOSITORY='${user.name}/<project.artifactId>' and TAG='<project.version>' and will deploy it to the target cluster.", headerHeading = "%n", commandListHeading = "%nCommands:%n", synopsisHeading = "%nUsage: ", parameterListHeading = "%n", optionListHeading = "Options:%n")
public class Kubernetes extends BaseKubernetesDeployCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import io.quarkus.cli.BuildToolContext;
import picocli.CommandLine;

@CommandLine.Command(name = "openshift", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Perform the deploy action on openshift.", description = "%n"
+ "The command will deploy the application on openshift.", footer = "%n"
@CommandLine.Command(name = "openshift", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Perform the deploy action on OpenShift.", description = "%n"
+ "The command will deploy the application on OpenShift.", footer = "%n"
+ "For example (using default values), it will create a Deployment named '<project.artifactId>' using the image with REPOSITORY='${user.name}/<project.artifactId>' and TAG='<project.version>' and will deploy it to the target cluster.", headerHeading = "%n", commandListHeading = "%nCommands:%n", synopsisHeading = "%nUsage: ", parameterListHeading = "%n", optionListHeading = "Options:%n")
public class Openshift extends BaseKubernetesDeployCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import io.quarkus.cli.BuildToolContext;
import picocli.CommandLine;

@CommandLine.Command(name = "openshift", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Build a container image using Openshift.", description = "%n"
@CommandLine.Command(name = "openshift", sortOptions = false, showDefaultValues = true, mixinStandardHelpOptions = false, header = "Build a container image using OpenShift.", description = "%n"
+ "This command will build or push a container image for the project, using Openshift.", footer = "%n"
+ "For example (using default values), it will create a container image in Openshift using the docker build strategy with REPOSITORY='${user.name}/<project.artifactId>' and TAG='<project.version>'.", headerHeading = "%n", commandListHeading = "%nCommands:%n", synopsisHeading = "%nUsage: ", parameterListHeading = "%n", optionListHeading = "Options:%n")
+ "For example (using default values), it will create a container image in OpenShift using the docker build strategy with REPOSITORY='${user.name}/<project.artifactId>' and TAG='<project.version>'.", headerHeading = "%n", commandListHeading = "%nCommands:%n", synopsisHeading = "%nUsage: ", parameterListHeading = "%n", optionListHeading = "Options:%n")
public class Openshift extends BaseImageSubCommand implements Callable<Integer> {

private static final String OPENSHIFT = "openshift";
Expand Down
10 changes: 5 additions & 5 deletions docs/src/main/asciidoc/cli-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,13 @@ Commands:
docker Build a container image using Docker.
buildpack Build a container image using Buildpack.
jib Build a container image using Jib.
openshift Build a container image using Openshift.
openshift Build a container image using OpenShift.
push Push a container image.
deploy Deploy application.
kubernetes Perform the deploy action on kubernetes.
openshift Perform the deploy action on openshift.
knative Perform the deploy action on knative.
kind Perform the deploy action on minikube.
kubernetes Perform the deploy action on Kubernetes.
openshift Perform the deploy action on OpenShift.
knative Perform the deploy action on Knative.
kind Perform the deploy action on Kind.
minikube Perform the deploy action on minikube.
registry Configure Quarkus registry client
list List enabled Quarkus registries
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/deploying-to-kubernetes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ The provided replicas <1>, labels <2> and environment variables <3> were retain

=== Using common resources

When generating the manifests for multiple deployment targets like Kubernetes, OpenShift or Knative, we can place the common resources in `src/main/kubernetes/common.yml`, so these resources will be integrated into the generated `kubernetes.json`/`kubernetes.yml`, and `openshift.json`/`openshift.yml` files (if you configure the Kubernetes and Openshift extensions at the same time).
When generating the manifests for multiple deployment targets like Kubernetes, OpenShift or Knative, we can place the common resources in `src/main/kubernetes/common.yml`, so these resources will be integrated into the generated `kubernetes.json`/`kubernetes.yml`, and `openshift.json`/`openshift.yml` files (if you configure the Kubernetes and OpenShift extensions at the same time).

For example, we can write a ConfigMap resource only once in the file `src/main/kubernetes/common.yml`:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/flyway.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ To change the `wait-for` image which by default is `groundnuty/k8s-wait-for:no-r
quarkus.kubernetes.init-task-defaults.wait-for-container.image=my/wait-for-image:1.0
----

or on Openshift:
or on OpenShift:


[source,properties]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/init-tasks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The default behavior can change by setting the following property to `false`:
quarkus.kubernetes.init-task-defaults.enabled=false
----

or on Openshift:
or on OpenShift:

[source,properties]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/liquibase-mongodb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ To change the `wait-for` image which by default is `groundnuty/k8s-wait-for:no-r
quarkus.kubernetes.init-task-defaults.wait-for-container.image=my/wait-for-image:1.0
----

or on Openshift:
or on OpenShift:


[source,properties]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/liquibase.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ To change the `wait-for` image which by default is `groundnuty/k8s-wait-for:no-r
quarkus.kubernetes.init-task-defaults.wait-for-container.image=my/wait-for-image:1.0
----

or on Openshift:
or on OpenShift:


[source,properties]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public void openshiftBuildFromJar(ContainerImageOpenshiftConfig openshiftConfig,

if (openshiftYml.isEmpty()) {
LOG.warn(
"No Openshift manifests were generated so no openshift build process will be taking place");
"No OpenShift manifests were generated so no OpenShift build process will be taking place");
return;
}

Expand Down Expand Up @@ -351,7 +351,7 @@ public void openshiftBuildFromNative(ContainerImageOpenshiftConfig openshiftConf

if (openshiftYml.isEmpty()) {
LOG.warn(
"No Openshift manifests were generated so no openshift build process will be taking place");
"No OpenShift manifests were generated so no OpenShift build process will be taking place");
return;
}
//The contextRoot is where inside the tarball we will add the jars. A null value means everything will be added under '/' while "target" means everything will be added under '/target'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public static <T> void printMessages(String usage, String platform, Property<T>
return;
}

String platformCapitalized = platform.substring(0, 1).toUpperCase() + platform.substring(1);
String platformCapitalized = platform.replace("openshift", "OpenShift");
platformCapitalized = platformCapitalized.substring(0, 1).toUpperCase() + platformCapitalized.substring(1);
T kubernetesValue = kubernetesProperty.getValue().orElse(null);
if (kubernetesValue == null) {
// If no kubernetes property is provided, this will be used instead.
Expand Down

0 comments on commit 1013b2a

Please sign in to comment.