From 8bf3e1d7e642fa053d5173ade0d5c6bcc0199293 Mon Sep 17 00:00:00 2001 From: xlight05 Date: Wed, 27 Nov 2024 18:05:43 +0530 Subject: [PATCH 1/2] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 2 +- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index d43956bb..efe12808 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "cloud" -version = "3.1.1" +version = "3.2.0" repository = "https://github.com/ballerina-platform/module-ballerina-c2c" license = ["Apache-2.0"] keywords = ["cloud", "kubernetes", "docker", "k8s", "c2c"] diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index fa98319e..eba094f7 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "code2cloud" class = "io.ballerina.c2c.C2CCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/cloud-compiler-plugin-3.1.1-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/cloud-compiler-plugin-3.2.0-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 49a023cd..bdfbcd57 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20241117-133400-a3054b77" +distribution-version = "2201.11.0-20241121-075100-c4c87cbc" [[package]] org = "ballerina" name = "cloud" -version = "3.1.1" +version = "3.2.0" modules = [ {org = "ballerina", packageName = "cloud", moduleName = "cloud"} ] From bef4eb44a8e29b60b324fd90c8a7a21f97ce9d43 Mon Sep 17 00:00:00 2001 From: xlight05 Date: Wed, 27 Nov 2024 18:27:25 +0530 Subject: [PATCH 2/2] Bump depedencies, Readme changes and minor changes --- ballerina/Package.md | 27 ---------- ballerina/{Module.md => README.md} | 0 .../config/create_cloud_toml_cmd.json | 2 +- .../diagnostics/invalid-input/Cloud.toml | 2 +- .../diagnostics/invalid-res-path/Cloud.toml | 2 +- .../invalid-service-path/Cloud.toml | 2 +- .../diagnostics/invalid-syntax/Cloud.toml | 2 +- .../diagnostics/missing-port/Cloud.toml | 2 +- .../resources/diagnostics/valid/Cloud.toml | 2 +- .../service/failed-port-retrieval/Cloud.toml | 2 +- .../service/valid-variable-port/Cloud.toml | 2 +- .../src/main/resources/c2c-schema.json | 2 +- gradle.properties | 50 +++++++++---------- 13 files changed, 35 insertions(+), 62 deletions(-) delete mode 100644 ballerina/Package.md rename ballerina/{Module.md => README.md} (100%) diff --git a/ballerina/Package.md b/ballerina/Package.md deleted file mode 100644 index f9d40817..00000000 --- a/ballerina/Package.md +++ /dev/null @@ -1,27 +0,0 @@ -## Package Overview - -This module provides the capabilities to generate cloud artifacts for Ballerina programs. - -This module generates the [Kubernetes](https://kubernetes.io/) and [Docker](https://www.docker.com/) artifacts required to deploy a Ballerina program in the cloud. - -Supports following artifact generation: -- Kubernetes deployment -- Kubernetes job -- Kubernetes service -- Kubernetes liveness probe -- Kubernetes readiness probe -- Kubernetes config map -- Kubernetes horizontal pod autoscaler -- Docker image generation -- Dockerfile generation - - -### Report Issues - -To report bugs, request new features, start new discussions, view project boards, etc., go to the [Ballerina Code2Cloud repository](https://github.com/ballerina-platform/module-ballerina-c2c). - -### Useful Links -- Discuss code changes of the Ballerina project in [ballerina-dev@googlegroups.com](mailto:ballerina-dev@googlegroups.com). -- Chat live with us via our [Discord server](https://discord.gg/ballerinalang). -- Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag. -- [Package Guide](https://ballerina.io/learn/user-guide/deployment/code-to-cloud/) diff --git a/ballerina/Module.md b/ballerina/README.md similarity index 100% rename from ballerina/Module.md rename to ballerina/README.md diff --git a/compiler-plugin-tests/src/test/resources/command/create-cloud-toml/config/create_cloud_toml_cmd.json b/compiler-plugin-tests/src/test/resources/command/create-cloud-toml/config/create_cloud_toml_cmd.json index 30a4a8b3..9b5abee8 100644 --- a/compiler-plugin-tests/src/test/resources/command/create-cloud-toml/config/create_cloud_toml_cmd.json +++ b/compiler-plugin-tests/src/test/resources/command/create-cloud-toml/config/create_cloud_toml_cmd.json @@ -23,7 +23,7 @@ "character": 0 } }, - "newText": "# This file contains most used configurations supported by Ballerina Code to Cloud\n# All the fields are optional. If these fields are not specified, default value will be taken from the compiler.\n# Full Code to Cloud specification can be accessed from https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md\n# Uncomment Any field below if you want to override the default value.\n\n# Settings related to artifacts generation\n#[settings]\n#buildImage = true # Build the Docker image while building the project\n#thinJar = true # Use the thin jars in the container\n#\n# Properties related to the container image\n#[container.image]\n#name = \"hello\" # Name of the container image\n#repository = \"ballerina\" # Container repository to host the container\n#tag = \"latest\" # Tag of the container\n#base = \"ballerina/jvm-runtime:2.0\" # Base container of the container image\n#\n# Copy the files to the container image\n#[[container.copy.files]]\n#sourceFile = \"./data/data.txt\" # Path to the external file\n#target = \"/home/ballerina/data/data.txt\" # Path of the file within the container\n#\n# External files required for the code\n#[[cloud.config.maps]]\n#file = \"resource/file.txt\" # Path of the external file\n#mount_dir = \"/home/ballerina/resource\" # Directory of the file within the container\n#\n# Environment variables required for the application\n#[[cloud.config.envs]]\n#key_ref = \"FOO\" # Key of the environment variable\n#name = \"foo\" # Name of the env if it is different from the key\n#config_name = \"module-foo\" # Name of the config config map\n#\n# Properties related to the deployment\n#[cloud.deployment]\n#min_memory = \"100Mi\" # Minimum memory allocated to the container\n#max_memory = \"512Mi\" # Maximum memory allocated to the container\n#min_cpu = \"200m\" # Minimum CPU allocated to the container\n#max_cpu = \"500m\" # Maximum CPU allocated to the container\n#\n# Matrices to auto-scale the container\n#[cloud.deployment.autoscaling]\n#min_replicas = 1 # Minimum number of replicas of the container alive at a given time\n#max_replicas = 2 # Maximum number of replicas of the container alive at a given time\n#cpu = 50 # CPU Utilization threshold for spawning a new instance\n#\n# Probe to indicate whether the container is ready to respond to requests. No readiness probe will be generated if not specified\n#[cloud.deployment.probes.readiness]\n#port = 9091 # Port of the readiness probe endpoint\n#path = \"/probes/readyz\" # Endpoint of the readiness probe\n#\n# Probe to indicate whether the container is running. No liveness probe will be generated if not specified\n#[cloud.deployment.probes.liveness]\n#port = 9091 # Port of the liveness probe endpoint\n#path = \"/probes/healthz\" # Endpoint of the liveness probe\n#\n# Volume definitions of the application. No default volumes will be generated if not specified\n#[[cloud.deployment.storage.volumes]]\n#name = \"volume1\" # Name of the volume\n#local_path = \"files\" # Path of the volume\n#size = \"2Gi\" # Maximum size of the volume\n#\n# Properties related to the builder image of the multistage build\n#[graalvm.builder]\n#base = \"ghcr.io/graalvm/native-image-community:21-ol9\" # base image of the builder image\n#buildCmd = \"native-image -jar hello.jar hello\" # RUN statement to build the native image\n#" + "newText": "# This file contains most used configurations supported by Ballerina Code to Cloud\n# All the fields are optional. If these fields are not specified, default value will be taken from the compiler.\n# Full Code to Cloud specification can be accessed from https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md\n# Uncomment Any field below if you want to override the default value.\n\n# Settings related to artifacts generation\n#[settings]\n#buildImage = true # Build the Docker image while building the project\n#thinJar = true # Use the thin jars in the container\n#\n# Properties related to the container image\n#[container.image]\n#name = \"hello\" # Name of the container image\n#repository = \"ballerina\" # Container repository to host the container\n#tag = \"latest\" # Tag of the container\n#base = \"ballerina/jvm-runtime:3.0\" # Base container of the container image\n#\n# Copy the files to the container image\n#[[container.copy.files]]\n#sourceFile = \"./data/data.txt\" # Path to the external file\n#target = \"/home/ballerina/data/data.txt\" # Path of the file within the container\n#\n# External files required for the code\n#[[cloud.config.maps]]\n#file = \"resource/file.txt\" # Path of the external file\n#mount_dir = \"/home/ballerina/resource\" # Directory of the file within the container\n#\n# Environment variables required for the application\n#[[cloud.config.envs]]\n#key_ref = \"FOO\" # Key of the environment variable\n#name = \"foo\" # Name of the env if it is different from the key\n#config_name = \"module-foo\" # Name of the config config map\n#\n# Properties related to the deployment\n#[cloud.deployment]\n#min_memory = \"100Mi\" # Minimum memory allocated to the container\n#max_memory = \"512Mi\" # Maximum memory allocated to the container\n#min_cpu = \"200m\" # Minimum CPU allocated to the container\n#max_cpu = \"500m\" # Maximum CPU allocated to the container\n#\n# Matrices to auto-scale the container\n#[cloud.deployment.autoscaling]\n#min_replicas = 1 # Minimum number of replicas of the container alive at a given time\n#max_replicas = 2 # Maximum number of replicas of the container alive at a given time\n#cpu = 50 # CPU Utilization threshold for spawning a new instance\n#\n# Probe to indicate whether the container is ready to respond to requests. No readiness probe will be generated if not specified\n#[cloud.deployment.probes.readiness]\n#port = 9091 # Port of the readiness probe endpoint\n#path = \"/probes/readyz\" # Endpoint of the readiness probe\n#\n# Probe to indicate whether the container is running. No liveness probe will be generated if not specified\n#[cloud.deployment.probes.liveness]\n#port = 9091 # Port of the liveness probe endpoint\n#path = \"/probes/healthz\" # Endpoint of the liveness probe\n#\n# Volume definitions of the application. No default volumes will be generated if not specified\n#[[cloud.deployment.storage.volumes]]\n#name = \"volume1\" # Name of the volume\n#local_path = \"files\" # Path of the volume\n#size = \"2Gi\" # Maximum size of the volume\n#\n# Properties related to the builder image of the multistage build\n#[graalvm.builder]\n#base = \"ghcr.io/graalvm/native-image-community:21-ol9\" # base image of the builder image\n#buildCmd = \"native-image -jar hello.jar hello\" # RUN statement to build the native image\n#" } ] } diff --git a/compiler-plugin-tests/src/test/resources/diagnostics/invalid-input/Cloud.toml b/compiler-plugin-tests/src/test/resources/diagnostics/invalid-input/Cloud.toml index 19a335ad..62fb3f2b 100644 --- a/compiler-plugin-tests/src/test/resources/diagnostics/invalid-input/Cloud.toml +++ b/compiler-plugin-tests/src/test/resources/diagnostics/invalid-input/Cloud.toml @@ -1,7 +1,7 @@ [container.image] repository = "wso2" #simple docker img name conv name = "hello" -base="ballerina/jvm-runtime:2.0" +base="ballerina/jvm-runtime:3.0" [cloud.deployment] min_cpu="aa" diff --git a/compiler-plugin-tests/src/test/resources/diagnostics/invalid-res-path/Cloud.toml b/compiler-plugin-tests/src/test/resources/diagnostics/invalid-res-path/Cloud.toml index 11e3cf8e..3988ba3f 100644 --- a/compiler-plugin-tests/src/test/resources/diagnostics/invalid-res-path/Cloud.toml +++ b/compiler-plugin-tests/src/test/resources/diagnostics/invalid-res-path/Cloud.toml @@ -1,7 +1,7 @@ [container.image] repository = "wso2" name = "hello" -base="ballerina/jvm-runtime:2.0" +base="ballerina/jvm-runtime:3.0" [cloud.deployment.probes.liveness] port = 9090 diff --git a/compiler-plugin-tests/src/test/resources/diagnostics/invalid-service-path/Cloud.toml b/compiler-plugin-tests/src/test/resources/diagnostics/invalid-service-path/Cloud.toml index f78d09fa..30c22fd5 100644 --- a/compiler-plugin-tests/src/test/resources/diagnostics/invalid-service-path/Cloud.toml +++ b/compiler-plugin-tests/src/test/resources/diagnostics/invalid-service-path/Cloud.toml @@ -1,7 +1,7 @@ [container.image] repository = "wso2" name = "hello" -base="ballerina/jvm-runtime:2.0" +base="ballerina/jvm-runtime:3.0" [cloud.deployment.probes.liveness] port = 9090 diff --git a/compiler-plugin-tests/src/test/resources/diagnostics/invalid-syntax/Cloud.toml b/compiler-plugin-tests/src/test/resources/diagnostics/invalid-syntax/Cloud.toml index 92f615ef..d93732c4 100644 --- a/compiler-plugin-tests/src/test/resources/diagnostics/invalid-syntax/Cloud.toml +++ b/compiler-plugin-tests/src/test/resources/diagnostics/invalid-syntax/Cloud.toml @@ -1,4 +1,4 @@ [container.image] repository "wso2" name = "hello" -base="ballerina/jvm-runtime:2.0" +base="ballerina/jvm-runtime:3.0" diff --git a/compiler-plugin-tests/src/test/resources/diagnostics/missing-port/Cloud.toml b/compiler-plugin-tests/src/test/resources/diagnostics/missing-port/Cloud.toml index a623da5c..fde893c2 100644 --- a/compiler-plugin-tests/src/test/resources/diagnostics/missing-port/Cloud.toml +++ b/compiler-plugin-tests/src/test/resources/diagnostics/missing-port/Cloud.toml @@ -1,7 +1,7 @@ [container.image] repository = "wso2" name = "hello" -base="ballerina/jvm-runtime:2.0" +base="ballerina/jvm-runtime:3.0" [container.image.user] run_as="ballerina" diff --git a/compiler-plugin-tests/src/test/resources/diagnostics/valid/Cloud.toml b/compiler-plugin-tests/src/test/resources/diagnostics/valid/Cloud.toml index b9b0f073..ecdd005f 100644 --- a/compiler-plugin-tests/src/test/resources/diagnostics/valid/Cloud.toml +++ b/compiler-plugin-tests/src/test/resources/diagnostics/valid/Cloud.toml @@ -1,4 +1,4 @@ [container.image] repository = "wso2" #simple docker img name conv name = "hello" -base="ballerina/jvm-runtime:2.0" +base="ballerina/jvm-runtime:3.0" diff --git a/compiler-plugin-tests/src/test/resources/service/failed-port-retrieval/Cloud.toml b/compiler-plugin-tests/src/test/resources/service/failed-port-retrieval/Cloud.toml index b9b0f073..ecdd005f 100644 --- a/compiler-plugin-tests/src/test/resources/service/failed-port-retrieval/Cloud.toml +++ b/compiler-plugin-tests/src/test/resources/service/failed-port-retrieval/Cloud.toml @@ -1,4 +1,4 @@ [container.image] repository = "wso2" #simple docker img name conv name = "hello" -base="ballerina/jvm-runtime:2.0" +base="ballerina/jvm-runtime:3.0" diff --git a/compiler-plugin-tests/src/test/resources/service/valid-variable-port/Cloud.toml b/compiler-plugin-tests/src/test/resources/service/valid-variable-port/Cloud.toml index b9b0f073..ecdd005f 100644 --- a/compiler-plugin-tests/src/test/resources/service/valid-variable-port/Cloud.toml +++ b/compiler-plugin-tests/src/test/resources/service/valid-variable-port/Cloud.toml @@ -1,4 +1,4 @@ [container.image] repository = "wso2" #simple docker img name conv name = "hello" -base="ballerina/jvm-runtime:2.0" +base="ballerina/jvm-runtime:3.0" diff --git a/compiler-plugin/src/main/resources/c2c-schema.json b/compiler-plugin/src/main/resources/c2c-schema.json index 8f50fb32..c0b626cd 100644 --- a/compiler-plugin/src/main/resources/c2c-schema.json +++ b/compiler-plugin/src/main/resources/c2c-schema.json @@ -67,7 +67,7 @@ "description": "Base container of the container image", "type": "string", "pattern": "^(?!\\s*$).+", - "default": "ballerina/jvm-runtime:2.0", + "default": "ballerina/jvm-runtime:3.0", "message": { "pattern": "`base` should not be empty" } diff --git a/gradle.properties b/gradle.properties index 5d077168..3830e1ec 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,34 +1,34 @@ org.gradle.caching=true org.gradle.jvmargs='-Dfile.encoding=UTF-8' group=io.ballerina -version=3.1.1-SNAPSHOT +version=3.2.0-SNAPSHOT systemProp.org.gradle.internal.publish.checksums.insecure=true spotbugsPluginVersion=6.0.18 shadowJarPluginVersion=8.1.1 downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 -ballerinaLangVersion=2201.11.0-20241117-133400-a3054b77 -stdlibConstraintVersion=1.6.0-20241113-090900-d276ad5 -stdlibIoVersion=1.6.2-20241112-233100-995cf5f -stdlibLogVersion=2.10.1-20241113-120000-4577868 -stdlibHttpVersion=2.13.0-20241114-182900-7e9f66a -stdlibAuthVersion=2.12.1-20241113-162300-ded40eb -stdlibFileVersion=1.10.1-20241113-151700-e1a2e38 -stdlibCacheVersion=3.8.1-20241113-125700-b75a1bf -stdlibCryptoVersion=2.7.3-20241113-081400-d015a39 -stdlibTimeVersion=2.6.0-20241113-073800-201b904 -stdlibMimeVersion=2.10.2-20241113-154200-d953747 -stdlibOsVersion=1.8.1-20241113-122000-cca973b -stdlibTaskVersion=2.5.1-20241113-123500-f905281 -stdlibJwtVersion=2.13.1-20241113-162400-b59ccfa -stdlibGrpcVersion=1.13.0-20241114-195700-5188f60 -stdlibOAuth2Version=2.12.1-20241113-162400-4c6ddfe -stdlibDataJsonDataVersion=0.3.0-20241114-143900-285d739 -stdlibUuidVersion=1.8.1-20241113-154400-443c67b -stdlibGraphqlVersion=1.15.0-20241117-164000-4d95b39 -stdlibUrlVersion=2.4.1-20241113-073900-335ff51 -stdlibWebsubVersion=2.13.0-20241114-233100-73205d6 -stdlibWebsubhubVersion=1.13.0-20241116-124900-2bb76a4 -observeVersion=1.4.0-20241113-092000-b83ae74 -observeInternalVersion=1.3.1-20241113-101700-265054d +ballerinaLangVersion=2201.11.0-20241121-075100-c4c87cbc +stdlibConstraintVersion=1.6.0-20241122-133100-98689e2 +stdlibIoVersion=1.7.0-20241121-173300-0fbd5d4 +stdlibLogVersion=2.11.0-20241122-150100-2e1a3ca +stdlibHttpVersion=2.13.0-20241126-181000-6585cc5 +stdlibAuthVersion=2.13.0-20241125-094500-d380c71 +stdlibFileVersion=1.11.0-20241122-180900-dff344c +stdlibCacheVersion=3.9.0-20241122-182900-c956a97 +stdlibCryptoVersion=2.8.0-20241122-130800-24f1267 +stdlibTimeVersion=2.6.0-20241122-120400-97742a7 +stdlibMimeVersion=2.11.0-20241125-094600-bbddf94 +stdlibOsVersion=1.9.0-20241122-071800-1fae486 +stdlibTaskVersion=2.6.0-20241122-124800-cb84357 +stdlibJwtVersion=2.14.0-20241125-085500-10a9526 +stdlibGrpcVersion=1.13.0-20241126-215800-1a63b04 +stdlibOAuth2Version=2.13.0-20241126-071700-7eb9e0b +stdlibDataJsonDataVersion=1.0.0-20241125-114000-0c2f457 +stdlibUuidVersion=1.9.0-20241125-110300-5eb185d +stdlibGraphqlVersion=1.15.0-20241127-145000-9be4f77 +stdlibUrlVersion=2.5.0-20241122-120400-67af694 +stdlibWebsubVersion=2.13.0-20241127-090200-25c84df +stdlibWebsubhubVersion=1.13.0-20241127-090300-97f79fe +observeVersion=1.4.0-20241122-184200-c596093 +observeInternalVersion=1.4.0-20241122-185200-9e5b1bb ballerinaGradlePluginVersion=2.0.1