From 10c0c105488d55eeaba3f911c748da0afea7bd8b Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Thu, 3 Oct 2024 18:39:04 +0200 Subject: [PATCH] chore: updated makefile rules for schema generation Explicit model generation is no longer needed Signed-off-by: Marc Nuri --- Makefile | 57 +++++-------------- .../openapi/schemas/openshift-generated.json | 45 ++++----------- 2 files changed, 25 insertions(+), 77 deletions(-) diff --git a/Makefile b/Makefile index c58b6cb527c..868a55e67b5 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,8 @@ # limitations under the License. # -MAVEN_OPTIONS ?= +.DEFAULT_GOAL := quickly +MAVEN_OPTIONS ?= -T 1C OPENAPI_DIR=$(realpath ./kubernetes-model-generator/openapi) OPENAPI_GENERATOR_DIR=$(OPENAPI_DIR)/generator OPENAPI_GENERATOR_BINARY_NAME=generator @@ -38,47 +39,7 @@ openapi-generate-schema: .PHONY: openapi-generate-java-classes openapi-generate-java-classes: -# TODO: Do for all modules once they've all been migrated -# cd kubernetes-model-generator && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-common && mvn clean install - cd kubernetes-model-generator/openapi/maven-plugin && mvn clean verify - cd kubernetes-model-generator/kubernetes-model-core && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-rbac && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-admissionregistration && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-apiextensions && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-apps && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-autoscaling && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-batch && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-certificates && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-coordination && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-discovery && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-events && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-extensions && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-flowcontrol && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-gatewayapi && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-networking && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-metrics && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-node && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-policy && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-scheduling && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-storageclass && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-resource && mvn -Pgenerate clean install - cd kubernetes-model-generator/kubernetes-model-kustomize && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-config && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-operator && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-miscellaneous && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-operatorhub && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-console && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-autoscaling && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-machine && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-machineconfiguration && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-monitoring && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-tuned && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-whereabouts && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-storageversionmigrator && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-hive && mvn -Pgenerate clean install - cd kubernetes-model-generator/openshift-model-installer && mvn -Pgenerate clean install + cd kubernetes-model-generator && mvn $(MAVEN_OPTIONS) -Pgenerate clean install # Legacy generation of the model: TODO: remove .PHONY: generate-model-legacy @@ -91,3 +52,15 @@ generate-model: openapi-generate-schema openapi-generate-java-classes generate-m .PHONY: sonar sonar: mvn $(MAVEN_OPTIONS) clean install sonar:sonar -Psonar + +.PHONY: format-license +format-license: + mvn $(MAVEN_OPTIONS) -N license:format + +.PHONY: format-java +format-java: + mvn $(MAVEN_OPTIONS) spotless:apply -Pitests + +.PHONY: +quickly: clean + mvn $(MAVEN_OPTIONS) install -DskipTests diff --git a/kubernetes-model-generator/openapi/schemas/openshift-generated.json b/kubernetes-model-generator/openapi/schemas/openshift-generated.json index 6642abed5ba..524802ce1b6 100644 --- a/kubernetes-model-generator/openapi/schemas/openshift-generated.json +++ b/kubernetes-model-generator/openapi/schemas/openshift-generated.json @@ -20653,13 +20653,8 @@ "x-kubernetes-list-type": "atomic" }, "scope": { - "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", - "type": "string", - "enum": [ - "*", - "Cluster", - "Namespaced" - ] + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" } }, "x-fabric8-info": { @@ -20755,13 +20750,8 @@ "x-kubernetes-list-type": "atomic" }, "scope": { - "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", - "type": "string", - "enum": [ - "*", - "Cluster", - "Namespaced" - ] + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" } }, "x-fabric8-info": { @@ -20820,13 +20810,8 @@ "x-kubernetes-list-type": "atomic" }, "scope": { - "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", - "type": "string", - "enum": [ - "*", - "Cluster", - "Namespaced" - ] + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" } }, "x-fabric8-info": { @@ -21633,13 +21618,8 @@ "x-kubernetes-list-type": "atomic" }, "scope": { - "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", - "type": "string", - "enum": [ - "*", - "Cluster", - "Namespaced" - ] + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" } }, "x-fabric8-info": { @@ -22425,13 +22405,8 @@ "x-kubernetes-list-type": "atomic" }, "scope": { - "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.", - "type": "string", - "enum": [ - "*", - "Cluster", - "Namespaced" - ] + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" } }, "x-fabric8-info": {