You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ti...@apache.org on 2024/05/15 20:17:07 UTC
(incubator-kie-tools) branch main updated: NO-ISSUE: Update `kogito-serverless-operator` tests yamls following `KOGITO_RUNTIME_version` env var (#2333)
This is an automated email from the ASF dual-hosted git repository.
tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new b2a51785d16 NO-ISSUE: Update `kogito-serverless-operator` tests yamls following `KOGITO_RUNTIME_version` env var (#2333)
b2a51785d16 is described below
commit b2a51785d168df3f77e861a14b7daa98f924775a
Author: Thiago Lugli <th...@users.noreply.github.com>
AuthorDate: Wed May 15 17:17:03 2024 -0300
NO-ISSUE: Update `kogito-serverless-operator` tests yamls following `KOGITO_RUNTIME_version` env var (#2333)
---
packages/kogito-serverless-operator/install.js | 44 ++++++++++++++++++++++
packages/kogito-serverless-operator/package.json | 2 +-
.../update-kogito-version/update_kogito_version.js | 4 +-
3 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/packages/kogito-serverless-operator/install.js b/packages/kogito-serverless-operator/install.js
new file mode 100644
index 00000000000..2a1d0bb8733
--- /dev/null
+++ b/packages/kogito-serverless-operator/install.js
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+const fs = require("fs");
+const path = require("path");
+const buildEnv = require("./env");
+
+const sonataflowPlatformFiles = fs
+ .readdirSync(path.resolve(__dirname, "test/testdata"), {
+ recursive: true,
+ })
+ .filter((fileName) => fileName.endsWith("02-sonataflow_platform.yaml"));
+sonataflowPlatformFiles.forEach((filePath) => {
+ const fullFilePath = path.resolve(__dirname, path.join("test/testdata"), filePath);
+ fs.writeFileSync(
+ fullFilePath,
+ fs
+ .readFileSync(fullFilePath, "utf-8")
+ .replace(
+ /org\.kie:kie-addons-quarkus-persistence-jdbc:[^,\n]*/,
+ `org.kie:kie-addons-quarkus-persistence-jdbc:${buildEnv.env.kogitoRuntime.version}`
+ )
+ .replace(
+ /org\.kie\.kogito:kogito-addons-quarkus-jobs-knative-eventing:[^,\n]*/,
+ `org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:${buildEnv.env.kogitoRuntime.version}`
+ )
+ );
+});
diff --git a/packages/kogito-serverless-operator/package.json b/packages/kogito-serverless-operator/package.json
index 328bd9e66fa..63cdc230d6b 100644
--- a/packages/kogito-serverless-operator/package.json
+++ b/packages/kogito-serverless-operator/package.json
@@ -26,7 +26,7 @@
"image:build": "run-script-os",
"image:build:darwin:win32": "echo 'Image build not supported on Windows and macOS'",
"image:build:linux": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && run-script-if --bool \"$(build-env containerImages.build)\" --then \"make container-build\"",
- "install": "rimraf bin && go mod tidy && pnpm bump-version && pnpm format",
+ "install": "rimraf bin && go mod tidy && node install.js && pnpm bump-version && pnpm format",
"test": "run-script-os",
"test-e2e": "run-script-os",
"test-e2e:darwin:win32": "echo 'E2E tests not supported on Windows and macOS'",
diff --git a/scripts/update-kogito-version/update_kogito_version.js b/scripts/update-kogito-version/update_kogito_version.js
index a3a462a279a..4bec19a5063 100755
--- a/scripts/update-kogito-version/update_kogito_version.js
+++ b/scripts/update-kogito-version/update_kogito_version.js
@@ -61,7 +61,7 @@ try {
.readFileSync(serverlessLogicWebToolsBaseBuilderImageEnvPath, "utf-8")
.replace(
/SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag:[\s\n]*{[\s\n]*default:[\s\n]*".*"/,
- `SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag: {\n default: "${newImagesTag}"`
+ `SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag: {\n default: "${newImagesTag}"`
)
);
@@ -78,7 +78,7 @@ try {
.readFileSync(serverlessLogicWebToolsSwfDevModeImageEnvPath, "utf-8")
.replace(
/SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag:[\s\n]*{[\s\n]*default:[\s\n]*".*"/,
- `SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag: {\n default: "${newImagesTag}"`
+ `SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag: {\n default: "${newImagesTag}"`
)
);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org