From 232a2a3a07ad579757ce371038a1c6c37ac4ba5f Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Thu, 4 Apr 2024 01:56:36 -0400 Subject: [PATCH 1/9] Turbo --- .github/actions/bootstrap/action.yml | 10 +- .github/actions/setup-ci-patterns/action.yml | 2 +- .github/actions/setup-env/action.yml | 5 + .github/workflows/ci_build.yml | 100 +----------------- .../workflows/ci_check_code_formatting.yml | 4 +- .../ci_check_dependencies_consistency.yaml | 2 +- .../release_build_extended_services.yml | 4 +- .../staging_build_extended_services.yml | 4 +- .gitignore | 3 + .../boxed-expression-component/package.json | 22 ++-- .../chrome-extension-test-helper/package.json | 4 +- .../package.json | 19 ++-- .../turbo.json | 9 ++ packages/dmn-feel-antlr4-parser/package.json | 10 +- packages/dmn-language-service/package.json | 10 +- packages/dmn-marshaller/package.json | 26 ++--- packages/dmn-marshaller/turbo.json | 9 ++ packages/envelope-bus/package.json | 12 ++- packages/envelope/package.json | 10 +- packages/feel-input-component/package.json | 14 +-- packages/i18n-common-dictionary/package.json | 10 +- packages/i18n/package.json | 10 +- packages/monaco-editor/package.json | 10 +- packages/operating-system/package.json | 10 +- packages/root-env/env/index.js | 2 +- .../package.json | 11 +- .../turbo.json | 9 ++ packages/storybook-base/package.json | 10 +- packages/xml-parser-ts-codegen/package.json | 10 +- packages/xml-parser-ts/package.json | 10 +- packages/yard-model/package.json | 14 +-- packages/yard-model/turbo.json | 9 ++ scripts/bootstrap/bootstrap.js | 3 + scripts/bootstrap/check_structure.mjs | 35 ++++++ scripts/sparse-checkout/run.sh | 8 +- turbo.json | 61 +++++++++++ 36 files changed, 283 insertions(+), 218 deletions(-) create mode 100644 packages/dev-deployment-kogito-quarkus-blank-app/turbo.json create mode 100644 packages/dmn-marshaller/turbo.json create mode 100644 packages/serverless-workflow-diagram-editor/turbo.json create mode 100644 packages/yard-model/turbo.json create mode 100644 scripts/bootstrap/check_structure.mjs create mode 100644 turbo.json diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index c6aea0f6f07..8ab22735c47 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -6,15 +6,15 @@ inputs: description: "kie-tools path" required: false default: "." - pnpm_filter_string: - description: "pnpm filter string to choose what to bootstrap" + turbo_filter_string: + description: "turbo filter string to choose what to bootstrap" required: false default: "" outputs: - pnpm_filter_string: + turbo_filter_string: description: "Same as the input" - value: ${{ inputs.pnpm_filter_string }} + value: ${{ inputs.turbo_filter_string }} runs: using: "composite" @@ -31,7 +31,7 @@ runs: run: | echo "STEP: Bootstrap" cd ${{ inputs.working_dir }} - pnpm bootstrap ${{ inputs.pnpm_filter_string }} + turbo bootstrap -- ${{ inputs.turbo_filter_string }} - name: "Print storage usage (after bootstrap)" shell: bash diff --git a/.github/actions/setup-ci-patterns/action.yml b/.github/actions/setup-ci-patterns/action.yml index 6261751e347..e5fa62b2bee 100644 --- a/.github/actions/setup-ci-patterns/action.yml +++ b/.github/actions/setup-ci-patterns/action.yml @@ -52,7 +52,7 @@ runs: const cwd = process.env["CWD"]; - const pnpmWorkspacePackagesRootPaths = ["packages", "examples"].map(p => path.join(cwd, p)).join("\n"); + const pnpmWorkspacePackagesRootPaths = ["packages", "examples", "scripts"].map(p => path.join(cwd, p)).join("\n"); const nonSourceFilesPatterns = fs.readFileSync(path.join(cwd, "./.github/supporting-files/ci/non-source-files-patterns.txt"), "utf-8"); const nonSourceFilesPatternsForGitDiff = nonSourceFilesPatterns.split("\n").filter(p => p.trim() !== "").map(p => `':!${p}'`).join(" "); diff --git a/.github/actions/setup-env/action.yml b/.github/actions/setup-env/action.yml index 95cc66b252f..10943a9a1e4 100644 --- a/.github/actions/setup-env/action.yml +++ b/.github/actions/setup-env/action.yml @@ -52,6 +52,11 @@ runs: with: node-version: 18.14.0 + - name: "Setup turbo" + shell: bash + run: | + "npm -g install turbo" + - name: "Setup JDK 17" uses: actions/setup-java@v3 with: diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index ef5a5b98253..38382b235aa 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -96,99 +96,7 @@ jobs: START_SERVER_AND_TEST_INSECURE: "true" NODE_OPTIONS: "--max_old_space_size=4096" run: >- - pnpm - -F='!@kie-tools/serverless-logic-web-tools-swf-dev-mode-image' - -F='!@kie-tools/dev-deployment-base-image' - -F='!@kie-tools/dev-deployment-kogito-quarkus-blank-app-image' - -F='!@kie-tools/dev-deployment-dmn-form-webapp-image' - -F='!@kie-tools/serverless-logic-web-tools-base-builder-image' - -F='!@kie-tools/dashbuilder-viewer-image' - -r --workspace-concurrency=1 build:prod - - - name: "FULL → Build → serverless-logic-web-tools-swf-dev-mode-image" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/serverless-logic-web-tools-swf-dev-mode-image" - pnpm -F @kie-tools/serverless-logic-web-tools-swf-dev-mode-image... --workspace-concurrency=1 build:prod - - - name: "FULL → Build → dev-deployment-base-image and dev-deployment-kogito-quarkus-blank-app" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/dev-deployment-base-image" - pnpm -F @kie-tools/dev-deployment-base-image... -F @kie-tools/dev-deployment-kogito-quarkus-blank-app... --workspace-concurrency=1 build:prod - - - name: "FULL → Build → dev-deployment-dmn-form-webapp-image" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/dev-deployment-dmn-form-webapp-image" - pnpm -F @kie-tools/dev-deployment-dmn-form-webapp-image... --workspace-concurrency=1 build:prod - - - name: "FULL → Build → serverless-logic-web-tools-base-builder-image" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/serverless-logic-web-tools-base-builder-image" - pnpm -F @kie-tools/serverless-logic-web-tools-base-builder-image... --workspace-concurrency=1 build:prod - - - name: "FULL → Build → dashbuilder-viewer-image" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/dashbuilder-viewer-image" - pnpm -F @kie-tools/dashbuilder-viewer-image... --workspace-concurrency=1 build:prod + turbo build -F boxed-expression-component - name: "PARTIAL → Bootstrap" if: steps.setup_build_mode.outputs.mode == 'partial' @@ -196,7 +104,7 @@ jobs: PLAYWRIGHT_BASE__installDeps: "true" uses: ./.github/actions/bootstrap with: - pnpm_filter_string: -F "...[${{ steps.checkout_pr.outputs.base_sha }}]..." + turbo_filter_string: -F "...[${{ steps.checkout_pr.outputs.base_sha }}]..." - name: "PARTIAL → Build dependencies" if: steps.setup_build_mode.outputs.mode == 'partial' @@ -209,7 +117,7 @@ jobs: export CHANGED_PKGS_EXCLUSION_FILTER=$(pnpm -F="...[${{ steps.checkout_pr.outputs.base_sha }}]" exec bash -c 'echo -n " -F='"'"'!$(jq --raw-output .name package.json)'"'"'"') echo $ALL_DEPENDENCIES_FILTER echo $CHANGED_PKGS_EXCLUSION_FILTER - eval "pnpm $ALL_DEPENDENCIES_FILTER $CHANGED_PKGS_EXCLUSION_FILTER build:dev" + eval "turbo $ALL_DEPENDENCIES_FILTER $CHANGED_PKGS_EXCLUSION_FILTER build build-tests" - name: "PARTIAL → Build changed and dependents" if: steps.setup_build_mode.outputs.mode == 'partial' @@ -224,7 +132,7 @@ jobs: START_SERVER_AND_TEST_INSECURE: "true" NODE_OPTIONS: "--max_old_space_size=4096" run: | - pnpm -F "...[${{ steps.checkout_pr.outputs.base_sha }}]" --workspace-concurrency=1 build:prod + turbo -F "...[${{ steps.checkout_pr.outputs.base_sha }}]" --workspace-concurrency=1 lint build test test-e2e - name: "Check tests result (`main` only)" if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' diff --git a/.github/workflows/ci_check_code_formatting.yml b/.github/workflows/ci_check_code_formatting.yml index 6b39b7f13cc..a58a6490e1a 100644 --- a/.github/workflows/ci_check_code_formatting.yml +++ b/.github/workflows/ci_check_code_formatting.yml @@ -30,5 +30,5 @@ jobs: shell: bash run: | export NODE_OPTIONS=--max_old_space_size=6144 - pnpm bootstrap:root - pnpm format:check + turbo bootstrap:root + turbo format:check diff --git a/.github/workflows/ci_check_dependencies_consistency.yaml b/.github/workflows/ci_check_dependencies_consistency.yaml index 1dcb2f170c5..16b9be1308c 100644 --- a/.github/workflows/ci_check_dependencies_consistency.yaml +++ b/.github/workflows/ci_check_dependencies_consistency.yaml @@ -29,5 +29,5 @@ jobs: - name: "Check dependencies mismatches" shell: bash run: | - pnpm bootstrap:root + turbo bootstrap:root npx --yes syncpack@6.2.0 list-mismatches diff --git a/.github/workflows/release_build_extended_services.yml b/.github/workflows/release_build_extended_services.yml index 1818f7af300..55ab0fea45d 100644 --- a/.github/workflows/release_build_extended_services.yml +++ b/.github/workflows/release_build_extended_services.yml @@ -57,12 +57,12 @@ jobs: id: bootstrap uses: ./.github/actions/bootstrap with: - pnpm_filter_string: -F @kie-tools/extended-services... + turbo_filter_string: -F @kie-tools/extended-services... - name: "Build" shell: bash run: | - pnpm ${{ steps.bootstrap.outputs.pnpm_filter_string }} build:prod + turbo ${{ steps.bootstrap.outputs.turbo_filter_string }} lint build test test-e2e - name: "Upload Extended Services for macOS (macOS only)" if: ${{ runner.os == 'macOS' && !inputs.dry_run }} diff --git a/.github/workflows/staging_build_extended_services.yml b/.github/workflows/staging_build_extended_services.yml index 77e748d85c2..7afee7324c9 100644 --- a/.github/workflows/staging_build_extended_services.yml +++ b/.github/workflows/staging_build_extended_services.yml @@ -57,14 +57,14 @@ jobs: uses: ./kie-tools/.github/actions/bootstrap with: working_dir: kie-tools - pnpm_filter_string: -F @kie-tools/extended-services... + turbo_filter_string: -F @kie-tools/extended-services... - name: "Build Extended Services" working-directory: ${{ github.workspace }}/kie-tools env: EXTENDED_SERVICES__kieSandboxUrl: "https://kiegroup.github.io/kogito-online-staging/${{ inputs.tag }}-prerelease" run: >- - pnpm ${{ steps.bootstrap.outputs.pnpm_filter_string }} build:prod + turbo ${{ steps.bootstrap.outputs.turbo_filter_string }} lint build test test-e2e - name: "STAGING: Upload Extended Services for macOS (macOS only)" if: ${{ runner.os == 'macOS' && !inputs.dry_run }} diff --git a/.gitignore b/.gitignore index 24a344a6244..fb14e73de2c 100644 --- a/.gitignore +++ b/.gitignore @@ -271,3 +271,6 @@ fabric.properties packages/bpmn-marshaller/**/ts-gen packages/dmn-marshaller/**/ts-gen packages/scesim-marshaller/**/ts-gen + +# turborepo +.turbo \ No newline at end of file diff --git a/packages/boxed-expression-component/package.json b/packages/boxed-expression-component/package.json index 36c6cbf894b..078a70904bd 100644 --- a/packages/boxed-expression-component/package.json +++ b/packages/boxed-expression-component/package.json @@ -5,20 +5,20 @@ "license": "Apache-2.0", "keywords": [], "scripts": { - "build:dev": "rimraf dist && pnpm copy:css && tsc -p tsconfig.json", - "build:prod": "rimraf dist && pnpm copy:css && pnpm lint && tsc -p tsconfig.json && pnpm test && pnpm test:e2e", - "build:storybook": "storybook build -o dist-storybook", + "build:caching": "pnpm copy:css && tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:dev-webapp": "storybook build -o dist-storybook", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", "copy:css": "copyfiles -u 1 \"src/**/*.{sass,scss,css}\" dist/", - "deploy": "gh-pages -d dist-dev", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", + "deploy:dev-webapp": "gh-pages -d dist-dev", + "lint": "kie-tools--eslint ./src", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command", "start": "run-script-os", - "start:linux:darwin": "cross-env STORYBOOK_PORT=$(build-env boxedExpressionComponent.storybook.port) pnpm storybook-base --storybookArgs=\"dev --no-open\"", - "start:win32": "pnpm powershell \"cross-env STORYBOOK_PORT=$(build-env boxedExpressionComponent.storybook.port) pnpm storybook-base --storybookArgs='dev --no-open'", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"", - "test:e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm rimraf ./dist-e2e-tests\" \"pnpm test:e2e:run\"", - "test:e2e:open": "pnpm exec playwright show-report dist-e2e-tests/reports", - "test:e2e:run": "pnpm exec playwright test" + "start:linux:darwin": "cross-env STORYBOOK_PORT=$(build-env boxedExpressionComponent.storybook.port) pnpm storybook-base --storybookArgs=\"dev\"", + "start:win32": "pnpm powershell \"cross-env STORYBOOK_PORT=$(build-env boxedExpressionComponent.storybook.port) pnpm storybook-base --storybookArgs='dev'", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"", + "test-e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool true --then \"pnpm exec playwright test\"" }, "dependencies": { "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/chrome-extension-test-helper/package.json b/packages/chrome-extension-test-helper/package.json index cbcdbc6ad87..59443a99994 100644 --- a/packages/chrome-extension-test-helper/package.json +++ b/packages/chrome-extension-test-helper/package.json @@ -14,8 +14,8 @@ "url": "https://github.com/apache/incubator-kie-tools/issues" }, "scripts": { - "build": "rimraf dist && tsc", - "prepare": "pnpm run build" + "build:dev": "rimraf dist && tsc", + "build:prod": "rimraf dist && tsc" }, "devDependencies": { "@kie-tools/tsconfig": "workspace:*", diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/package.json b/packages/dev-deployment-kogito-quarkus-blank-app/package.json index 58f2c1f1aab..581dddc12ee 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/package.json +++ b/packages/dev-deployment-kogito-quarkus-blank-app/package.json @@ -13,21 +13,14 @@ "url": "https://github.com/apache/incubator-kie-tools/issues" }, "scripts": { - "build:dev": "run-script-os", - "build:dev:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests", - "build:dev:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests\"", - "build:prod": "pnpm lint && run-script-os", - "build:prod:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", - "build:prod:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "build": "mvn source:jar source:test-jar jar:jar jar:test-jar install:install", + "build:caching": "run-script-os", + "build:caching:darwin:linux": "mvn package -DskipTests=$(build-env tests.run --not) -DskipITs=$(build-env endToEndTests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", + "build:caching:win32": "pnpm powershell \"mvn package `-DskipTests=$(build-env tests.run --not) `-DskipITs=$(build-env endToEndTests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "clean": "mvn clean", "install": "node install.js", - "install:mvnw": "run-script-os", - "install:mvnw:darwin:linux": "mvn wrapper:wrapper", - "install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"", "lint": "echo 'Linting'", - "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command", - "quarkus:dev": "run-script-os", - "quarkus:dev:darwin:linux": "mvn clean package quarkus:dev -DskipTests", - "quarkus:dev:win32": "mvn clean package quarkus:dev `-DskipTests" + "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, "devDependencies": { "@kie-tools/maven-config-setup-helper": "workspace:*", diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/turbo.json b/packages/dev-deployment-kogito-quarkus-blank-app/turbo.json new file mode 100644 index 00000000000..61e0b8b49aa --- /dev/null +++ b/packages/dev-deployment-kogito-quarkus-blank-app/turbo.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "pipeline": { + "build:caching": { + "outputs": ["**/target/**", "**/.flattened-pom.xml", "mvnw", "mvnw.cmd"] + } + } +} diff --git a/packages/dmn-feel-antlr4-parser/package.json b/packages/dmn-feel-antlr4-parser/package.json index 28af574458a..1a373a99180 100644 --- a/packages/dmn-feel-antlr4-parser/package.json +++ b/packages/dmn-feel-antlr4-parser/package.json @@ -19,10 +19,12 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "@kie-tools/dmn-marshaller": "workspace:*", diff --git a/packages/dmn-language-service/package.json b/packages/dmn-language-service/package.json index 448fbc97434..7470cd74cd7 100644 --- a/packages/dmn-language-service/package.json +++ b/packages/dmn-language-service/package.json @@ -19,10 +19,12 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "@kie-tools/dmn-feel-antlr4-parser": "workspace:*", diff --git a/packages/dmn-marshaller/package.json b/packages/dmn-marshaller/package.json index b713141179c..6e467e2e60e 100644 --- a/packages/dmn-marshaller/package.json +++ b/packages/dmn-marshaller/package.json @@ -19,18 +19,20 @@ "src" ], "scripts": { - "build:codegen": "pnpm build:codegen:dmn10 && pnpm build:codegen:dmn11 && pnpm build:codegen:dmn12 && pnpm build:codegen:dmn13 && pnpm build:codegen:dmn14 && pnpm build:codegen:dmn15 && pnpm build:codegen:kie10", - "build:codegen:dmn10": "xml-parser-ts-codegen ./src/schemas/dmn-1_0/dmn3.xsd Definitions", - "build:codegen:dmn11": "xml-parser-ts-codegen ./src/schemas/dmn-1_1/dmn.xsd definitions", - "build:codegen:dmn12": "xml-parser-ts-codegen ./src/schemas/dmn-1_2/DMN12.xsd definitions", - "build:codegen:dmn13": "xml-parser-ts-codegen ./src/schemas/dmn-1_3/DMN13.xsd definitions", - "build:codegen:dmn14": "xml-parser-ts-codegen ./src/schemas/dmn-1_4/DMN14.xsd definitions", - "build:codegen:dmn15": "xml-parser-ts-codegen ./src/schemas/dmn-1_5/DMN15.xsd definitions", - "build:codegen:kie10": "xml-parser-ts-codegen ./src/schemas/kie-1_0/KIE.xsd ComponentsWidthsExtension", - "build:dev": "rimraf dist && pnpm build:codegen && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && pnpm build:codegen && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist* src/schemas/*/ts-gen", + "codegen": "pnpm codegen:dmn10 && pnpm codegen:dmn11 && pnpm codegen:dmn12 && pnpm codegen:dmn13 && pnpm codegen:dmn14 && pnpm codegen:dmn15 && pnpm codegen:kie10", + "codegen:dmn10": "xml-parser-ts-codegen ./src/schemas/dmn-1_0/dmn3.xsd Definitions", + "codegen:dmn11": "xml-parser-ts-codegen ./src/schemas/dmn-1_1/dmn.xsd definitions", + "codegen:dmn12": "xml-parser-ts-codegen ./src/schemas/dmn-1_2/DMN12.xsd definitions", + "codegen:dmn13": "xml-parser-ts-codegen ./src/schemas/dmn-1_3/DMN13.xsd definitions", + "codegen:dmn14": "xml-parser-ts-codegen ./src/schemas/dmn-1_4/DMN14.xsd definitions", + "codegen:dmn15": "xml-parser-ts-codegen ./src/schemas/dmn-1_5/DMN15.xsd definitions", + "codegen:kie10": "xml-parser-ts-codegen ./src/schemas/kie-1_0/KIE.xsd ComponentsWidthsExtension", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "@kie-tools/xml-parser-ts": "workspace:*" diff --git a/packages/dmn-marshaller/turbo.json b/packages/dmn-marshaller/turbo.json new file mode 100644 index 00000000000..6c0163cab03 --- /dev/null +++ b/packages/dmn-marshaller/turbo.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "pipeline": { + "codegen": { + "outputs": ["dist*", "src/schemas/**/ts-gen"] + } + } +} diff --git a/packages/envelope-bus/package.json b/packages/envelope-bus/package.json index 069e140ea5a..4981396c173 100644 --- a/packages/envelope-bus/package.json +++ b/packages/envelope-bus/package.json @@ -18,11 +18,13 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json && pnpm build:tests", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm build:tests && pnpm test", - "build:tests": "rimraf dist-tests && tsc -p tsconfig.tests.json", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build-tests": "tsc -p tsconfig.tests.json", + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "react": "^17.0.2", diff --git a/packages/envelope/package.json b/packages/envelope/package.json index 2f149195e3a..6dcef67429c 100644 --- a/packages/envelope/package.json +++ b/packages/envelope/package.json @@ -19,10 +19,12 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "@kie-tools-core/envelope-bus": "workspace:*", diff --git a/packages/feel-input-component/package.json b/packages/feel-input-component/package.json index 1d27b557a4b..98e6ccf85b4 100644 --- a/packages/feel-input-component/package.json +++ b/packages/feel-input-component/package.json @@ -7,14 +7,16 @@ "types": "./dist/index.d.ts", "main": "dist/index.js", "scripts": { - "build:dev": "rimraf dist && pnpm copy:css && tsc -p tsconfig.json", - "build:prod": "rimraf dist && pnpm copy:css && pnpm lint && tsc -p tsconfig.json && pnpm test", - "build:showcase": "rimraf ./dist-dev && webpack -c ./showcase/webpack.config.js --env prod", + "build:caching": "pnpm copy:css && tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:dev-webapp": "webpack -c ./showcase/webpack.config.js --env prod", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", "copy:css": "copyfiles -u 1 \"src/**/*.{sass,scss,css}\" dist/", - "deploy": "gh-pages -d dist-dev", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", + "deploy:dev-webapp": "gh-pages -d dist-dev", + "lint": "kie-tools--eslint ./src", "start": "webpack serve -c ./showcase/webpack.config.js --host 0.0.0.0 --env dev", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/i18n-common-dictionary/package.json b/packages/i18n-common-dictionary/package.json index d928fb578a4..8430bcadf67 100644 --- a/packages/i18n-common-dictionary/package.json +++ b/packages/i18n-common-dictionary/package.json @@ -18,10 +18,12 @@ "dist" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "@kie-tools-core/i18n": "workspace:*" diff --git a/packages/i18n/package.json b/packages/i18n/package.json index bbdc86d3972..b188e1ecff4 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -17,10 +17,12 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "react": "^17.0.2", diff --git a/packages/monaco-editor/package.json b/packages/monaco-editor/package.json index cb21297607b..4d87deda91d 100644 --- a/packages/monaco-editor/package.json +++ b/packages/monaco-editor/package.json @@ -12,10 +12,12 @@ "dist/standalone" ], "scripts": { - "build:dev": "rimraf dist && webpack --mode development", - "build:prod": "rimraf dist && webpack --mode production", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "pnpm build:dev", + "build:dev": "webpack --mode development", + "build:prod": "webpack --mode production", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "monaco-editor": "^0.39.0" diff --git a/packages/operating-system/package.json b/packages/operating-system/package.json index 8437c99d9c8..ade84f7e8cb 100644 --- a/packages/operating-system/package.json +++ b/packages/operating-system/package.json @@ -19,10 +19,12 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "devDependencies": { "@babel/core": "^7.16.0", diff --git a/packages/root-env/env/index.js b/packages/root-env/env/index.js index 0e3e5b8e1be..7e1fcaccbe0 100644 --- a/packages/root-env/env/index.js +++ b/packages/root-env/env/index.js @@ -27,7 +27,7 @@ module.exports = composeEnv([], { description: "Enables/disables running linters during the build.", }, KIE_TOOLS_BUILD__runTests: { - default: `${true}`, + default: `${false}`, description: "Enables/disables running tests during the build.", }, KIE_TOOLS_BUILD__ignoreTestFailures: { diff --git a/packages/serverless-workflow-diagram-editor/package.json b/packages/serverless-workflow-diagram-editor/package.json index cd60a9e8af4..8b0fada375d 100644 --- a/packages/serverless-workflow-diagram-editor/package.json +++ b/packages/serverless-workflow-diagram-editor/package.json @@ -17,12 +17,11 @@ "dist" ], "scripts": { - "build:dev": "run-script-os", - "build:dev:linux:darwin": "mvn clean install -DskipTests -DskipITs -Pno-showcase", - "build:dev:win32": "pnpm powershell \"mvn clean install `-DskipTests `-DskipITs `-Pno-showcase\"", - "build:prod": "run-script-os", - "build:prod:linux:darwin": "pnpm lint && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) -DskipITs=$(build-env endToEndTests.run --not) -Pno-showcase", - "build:prod:win32": "pnpm lint && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) `-DskipITs=$(build-env endToEndTests.run --not) `-Pno-showcase\"", + "build": "mvn source:jar source:test-jar jar:jar jar:test-jar install:install", + "build:caching": "run-script-os", + "build:caching:darwin:linux": "mvn package -DskipTests=$(build-env tests.run --not) -DskipITs=$(build-env endToEndTests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", + "build:caching:win32": "pnpm powershell \"mvn package `-DskipTests=$(build-env tests.run --not) `-DskipITs=$(build-env endToEndTests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "clean": "mvn clean", "install": "node install.js", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" diff --git a/packages/serverless-workflow-diagram-editor/turbo.json b/packages/serverless-workflow-diagram-editor/turbo.json new file mode 100644 index 00000000000..61e0b8b49aa --- /dev/null +++ b/packages/serverless-workflow-diagram-editor/turbo.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "pipeline": { + "build:caching": { + "outputs": ["**/target/**", "**/.flattened-pom.xml", "mvnw", "mvnw.cmd"] + } + } +} diff --git a/packages/storybook-base/package.json b/packages/storybook-base/package.json index af50cf2a9b5..8bfe51fbbc6 100644 --- a/packages/storybook-base/package.json +++ b/packages/storybook-base/package.json @@ -21,10 +21,12 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "devDependencies": { "@babel/core": "^7.16.0", diff --git a/packages/xml-parser-ts-codegen/package.json b/packages/xml-parser-ts-codegen/package.json index a6239ed569d..34c4087ace2 100644 --- a/packages/xml-parser-ts-codegen/package.json +++ b/packages/xml-parser-ts-codegen/package.json @@ -20,10 +20,12 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { "@kie-tools/xml-parser-ts": "workspace:*", diff --git a/packages/xml-parser-ts/package.json b/packages/xml-parser-ts/package.json index fa814c30507..936606898bb 100644 --- a/packages/xml-parser-ts/package.json +++ b/packages/xml-parser-ts/package.json @@ -20,10 +20,12 @@ "src" ], "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" + "build:caching": "tsc -p tsconfig.json", + "build:dev": "pnpm build:caching", + "build:prod": "pnpm build:caching", + "clean": "rimraf dist*", + "lint": "kie-tools--eslint ./src", + "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool true --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": {}, "devDependencies": { diff --git a/packages/yard-model/package.json b/packages/yard-model/package.json index 6c23d04b87f..21579ff484b 100644 --- a/packages/yard-model/package.json +++ b/packages/yard-model/package.json @@ -14,16 +14,12 @@ "url": "https://github.com/apache/incubator-kie-tools/issues" }, "scripts": { - "build:dev": "run-script-os", - "build:dev:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests", - "build:dev:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests\"", - "build:prod": "pnpm lint && run-script-os", - "build:prod:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", - "build:prod:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "build": "mvn source:jar source:test-jar jar:jar jar:test-jar install:install", + "build:caching": "run-script-os", + "build:caching:darwin:linux": "mvn package -DskipTests=$(build-env tests.run --not) -DskipITs=$(build-env endToEndTests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", + "build:caching:win32": "pnpm powershell \"mvn package `-DskipTests=$(build-env tests.run --not) `-DskipITs=$(build-env endToEndTests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", + "clean": "mvn clean", "install": "node install.js", - "install:mvnw": "run-script-os", - "install:mvnw:darwin:linux": "mvn wrapper:wrapper", - "install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/yard-model/turbo.json b/packages/yard-model/turbo.json new file mode 100644 index 00000000000..61e0b8b49aa --- /dev/null +++ b/packages/yard-model/turbo.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "pipeline": { + "build:caching": { + "outputs": ["**/target/**", "**/.flattened-pom.xml", "mvnw", "mvnw.cmd"] + } + } +} diff --git a/scripts/bootstrap/bootstrap.js b/scripts/bootstrap/bootstrap.js index d29192f49b5..b763d3e34a0 100755 --- a/scripts/bootstrap/bootstrap.js +++ b/scripts/bootstrap/bootstrap.js @@ -53,6 +53,9 @@ execSync(`node ${require.resolve("./check_required_preinstalled_cli_commands.mjs console.info("\n\n[bootstrap] Checking packages dependencies..."); execSync(`node ${require.resolve("./check_packages_dependencies.js")}`, execOpts); +console.info("\n\n[bootstrap] Checking structure..."); +execSync(`node ${require.resolve("./check_structure.mjs")}`, execOpts); + console.info("\n\n[bootstrap] Formatting pnpm-lock.yaml..."); execSync(`pnpm pretty-quick --pattern pnpm-lock.yaml`, execOpts); diff --git a/scripts/bootstrap/check_structure.mjs b/scripts/bootstrap/check_structure.mjs new file mode 100644 index 00000000000..295ceaa72ba --- /dev/null +++ b/scripts/bootstrap/check_structure.mjs @@ -0,0 +1,35 @@ +/* + * 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. + */ + +async function main() { + // 1. all folders inside packages/examples must have a valid package.json file on it + // 2. there can't be files inside packages/examples directories + // 3. prettierignore is always a superset of gitignore + + console.info(`[check-structure] Checking if all package directories have a a valid package.json file...`); + + console.info(`[check-structure] Checking if there's dangling files outside packages directories...`); + + console.info(`[check-structure] Checking if .prettierignore is a superset of .gitignore...`); + + console.info(`[check-structure] Done.`); + process.exit(0); +} + +main(); diff --git a/scripts/sparse-checkout/run.sh b/scripts/sparse-checkout/run.sh index 327aaadfd8a..e18894a7256 100755 --- a/scripts/sparse-checkout/run.sh +++ b/scripts/sparse-checkout/run.sh @@ -4,7 +4,7 @@ ARGV=("$@") KIE_TOOLS_ORG=$1 KIE_TOOLS_BRANCH=$2 KIE_TOOLS_PACKAGE_NAMES_TO_BUILD=("${ARGV[@]:2}") -KIE_TOOLS_PACKAGES_PNPM_FILTER_STRING=$(echo ${KIE_TOOLS_PACKAGE_NAMES_TO_BUILD[@]} | xargs -n1 -I{} echo -n "-F {}... " | xargs) +KIE_TOOLS_PACKAGES_TURBO_FILTER_STRING=$(echo ${KIE_TOOLS_PACKAGE_NAMES_TO_BUILD[@]} | xargs -n1 -I{} echo -n "-F {}... " | xargs) KIE_TOOLS_GIT_REMOTE_URL="https://github.com/$KIE_TOOLS_ORG/incubator-kie-tools" KIE_TOOLS_CLONE_DIR_PATH='incubator-kie-tools' KIE_TOOLS_PATHS_INCLUDED_BY_DEFAULT='scripts repo docs patches' @@ -13,7 +13,7 @@ echo "[kie-tools-sparse-checkout] Starting..." echo "KIE_TOOLS_ORG: $KIE_TOOLS_ORG" echo "KIE_TOOLS_BRANCH: $KIE_TOOLS_BRANCH" echo "KIE_TOOLS_PACKAGE_NAMES_TO_BUILD: ${KIE_TOOLS_PACKAGE_NAMES_TO_BUILD[@]}" -echo "KIE_TOOLS_PACKAGES_PNPM_FILTER_STRING: $KIE_TOOLS_PACKAGES_PNPM_FILTER_STRING" +echo "KIE_TOOLS_PACKAGES_TURBO_FILTER_STRING: $KIE_TOOLS_PACKAGES_TURBO_FILTER_STRING" echo "KIE_TOOLS_GIT_REMOTE_URL: $KIE_TOOLS_GIT_REMOTE_URL" echo "KIE_TOOLS_CLONE_DIR_PATH: $KIE_TOOLS_CLONE_DIR_PATH" echo "KIE_TOOLS_PATHS_INCLUDED_BY_DEFAULT: $KIE_TOOLS_PATHS_INCLUDED_BY_DEFAULT" @@ -28,7 +28,7 @@ git sparse-checkout set $KIE_TOOLS_PATHS_INCLUDED_BY_DEFAULT echo "" echo "[kie-tools-sparse-checkout] Installing scripts and root dependencies..." -pnpm bootstrap:root --frozen-lockfile +turbo bootstrap:root -- --frozen-lockfile echo "" echo "[kie-tools-sparse-checkout] Listing paths of packages to fetch for (${KIE_TOOLS_PACKAGE_NAMES_TO_BUILD[@]})..." @@ -41,7 +41,7 @@ eval "git sparse-checkout set $KIE_TOOLS_PATHS_INCLUDED_BY_DEFAULT $KIE_TOOLS_PA echo "" echo "[kie-tools-sparse-checkout] Installing packages dependencies..." -eval "pnpm bootstrap:packages $KIE_TOOLS_PACKAGES_PNPM_FILTER_STRING --frozen-lockfile" +eval "turbo bootstrap:packages -- $KIE_TOOLS_PACKAGES_TURBO_FILTER_STRING --frozen-lockfile" echo "" echo "[kie-tools-sparse-checkout] Done." diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000000..54224cb3729 --- /dev/null +++ b/turbo.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://turbo.build/schema.json", + "pipeline": { + "//#bootstrap": { + "cache": false + }, + "//#bootstrap:root": { + "cache": false + }, + "//#bootstrap:packages": { + "cache": false + }, + "//#format": { + "cache": false + }, + "//#format:check": { + "cache": false + }, + "//#update-version-to": { + "cache": false + }, + "clean": { + "cache": false + }, + "lint": {}, + "codegen": { + "dependsOn": ["^build"] + }, + "build:caching": { + "dependsOn": ["^build", "codegen"], + "inputs": ["src/**"], + "outputs": ["dist/**"] + }, + "build": { + "cache": false, + "dependsOn": ["build:caching"] + }, + "codegen-tests": { + "dependsOn": ["build"] + }, + "build-tests": { + "dependsOn": ["^build-tests", "codegen-tests"], + "inputs": ["src-tests/**"], + "outputs": ["dist-tests/**"] + }, + "test": { + "dependsOn": ["build-tests"], + "inputs": ["tests/**"], + "outputs": ["dist-tests/**"] + }, + "test-e2e": { + "dependsOn": ["build"], + "inputs": ["tests/e2e/**"], // FIXME: I think this should be e2e-tests or tests-e2e + "outputs": ["dist-e2e-tests/**"] // FIXME: I think this should be dist-e2e-tests or dist-tests-e2e + }, + "start": { + "dependsOn": ["^build"], + "persistent": true + } + } +} From 2f7ba7927202bf7a0a1187117efb13cc3d2ce355 Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Thu, 4 Apr 2024 02:50:05 -0400 Subject: [PATCH 2/9] Setup turbo --- .github/actions/setup-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-env/action.yml b/.github/actions/setup-env/action.yml index 10943a9a1e4..abc29333d36 100644 --- a/.github/actions/setup-env/action.yml +++ b/.github/actions/setup-env/action.yml @@ -55,7 +55,7 @@ runs: - name: "Setup turbo" shell: bash run: | - "npm -g install turbo" + npm -g install turbo - name: "Setup JDK 17" uses: actions/setup-java@v3 From 22d85a9dc442a4453ca4bdcc6638cb66508dd672 Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Sat, 6 Apr 2024 00:27:37 -0400 Subject: [PATCH 3/9] Testing --- .github/workflows/ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 38382b235aa..b3f7aa94287 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -96,7 +96,7 @@ jobs: START_SERVER_AND_TEST_INSECURE: "true" NODE_OPTIONS: "--max_old_space_size=4096" run: >- - turbo build -F boxed-expression-component + turbo -F boxed-expression-component build test test-e2e - name: "PARTIAL → Bootstrap" if: steps.setup_build_mode.outputs.mode == 'partial' From 0f865d5114f4ccabc7b04c6611c8c8670e00d2e3 Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Sat, 6 Apr 2024 00:34:45 -0400 Subject: [PATCH 4/9] Full build label on CI GitHub Actions workflow --- .github/workflows/ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index b3f7aa94287..847301a29dc 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -80,7 +80,7 @@ jobs: PLAYWRIGHT_BASE__installDeps: "true" uses: ./.github/actions/bootstrap - - name: "FULL → Build (without some images)" + - name: "FULL → Build" if: steps.setup_build_mode.outputs.mode == 'full' env: WEBPACK__minimize: "false" From e0cb6486147750a8342f37cdffd65af20641a644 Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Sat, 6 Apr 2024 00:36:58 -0400 Subject: [PATCH 5/9] . --- .github/workflows/ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 847301a29dc..a7b617a3042 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -96,7 +96,7 @@ jobs: START_SERVER_AND_TEST_INSECURE: "true" NODE_OPTIONS: "--max_old_space_size=4096" run: >- - turbo -F boxed-expression-component build test test-e2e + turbo -F boxed-expression-component... build test test-e2e - name: "PARTIAL → Bootstrap" if: steps.setup_build_mode.outputs.mode == 'partial' From d7054995f8481ec7c70ac3b8c748356e87839629 Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Mon, 8 Apr 2024 22:37:58 -0400 Subject: [PATCH 6/9] Do not track --- .github/workflows/ci_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index a7b617a3042..17c384d8031 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -13,6 +13,7 @@ concurrency: env: TMPDIR: "/tmp" + DO_NOT_TRACK: 1 jobs: run: From 221b148391d9ca26eceebe973ee9c01f5476001b Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Mon, 15 Apr 2024 20:22:38 -0400 Subject: [PATCH 7/9] Improve cache --- turbo.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/turbo.json b/turbo.json index 54224cb3729..f1293d223f4 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,7 @@ { "$schema": "https://turbo.build/schema.json", "pipeline": { + // Root "//#bootstrap": { "cache": false }, @@ -19,15 +20,21 @@ "//#update-version-to": { "cache": false }, + + // Packages "clean": { "cache": false }, - "lint": {}, + "lint": { + "cache": false + }, "codegen": { + "cache": false, "dependsOn": ["^build"] }, "build:caching": { "dependsOn": ["^build", "codegen"], + "cache": true, "inputs": ["src/**"], "outputs": ["dist/**"] }, @@ -36,24 +43,29 @@ "dependsOn": ["build:caching"] }, "codegen-tests": { + "cache": false, "dependsOn": ["build"] }, "build-tests": { + "cache": true, "dependsOn": ["^build-tests", "codegen-tests"], "inputs": ["src-tests/**"], "outputs": ["dist-tests/**"] }, "test": { + "cache": true, "dependsOn": ["build-tests"], "inputs": ["tests/**"], "outputs": ["dist-tests/**"] }, "test-e2e": { + "cache": true, "dependsOn": ["build"], "inputs": ["tests/e2e/**"], // FIXME: I think this should be e2e-tests or tests-e2e "outputs": ["dist-e2e-tests/**"] // FIXME: I think this should be dist-e2e-tests or dist-tests-e2e }, "start": { + "cache": false, "dependsOn": ["^build"], "persistent": true } From 78960b2b2e5679bb85b7c68847112e47da9577cd Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Mon, 15 Apr 2024 20:30:00 -0400 Subject: [PATCH 8/9] Fetch maven dependencies on `install` --- packages/dashbuilder/package.json | 2 +- .../dev-deployment-base-image/package.json | 2 +- .../package.json | 2 +- packages/extended-services-java/package.json | 2 +- packages/jbpm-quarkus-devui/package.json | 2 +- packages/maven-base/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../sonataflow-quarkus-devui/package.json | 2 +- packages/stunner-editors/package.json | 2 +- .../package.json | 2 +- packages/yard-model/package.json | 2 +- packages/yard-validator-worker/package.json | 2 +- packages/yard-validator/install.js | 25 ------------------- packages/yard-validator/package.json | 8 ------ 15 files changed, 13 insertions(+), 46 deletions(-) delete mode 100644 packages/yard-validator/install.js diff --git a/packages/dashbuilder/package.json b/packages/dashbuilder/package.json index 2456b22b250..a70ddd4575c 100644 --- a/packages/dashbuilder/package.json +++ b/packages/dashbuilder/package.json @@ -32,7 +32,7 @@ "build:prod:win32": "pnpm powershell \"mvn clean install `-Dgwt.compiler.skip=true `-DskipTests\"", "copy:components": "pnpm delete:components && copyfiles -u 3 \"../dashbuilder-component-assembler/dist/**/*\" ./dashbuilder-runtime-parent/dashbuilder-runtime-client/src/main/webapp/dashbuilder/component", "delete:components": "rimraf ./dashbuilder-runtime-parent/dashbuilder-runtime-client/src/main/webapp/dashbuilder/component", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/dev-deployment-base-image/package.json b/packages/dev-deployment-base-image/package.json index 2cf3a0972c1..8247f73e159 100644 --- a/packages/dev-deployment-base-image/package.json +++ b/packages/dev-deployment-base-image/package.json @@ -25,7 +25,7 @@ "create-test-image:openshift": "kie-tools--image-builder openshift -r \"$(build-env devDeploymentBaseImage.registry)\" -a \"$(build-env devDeploymentBaseImage.account)\" -n \"$(build-env devDeploymentBaseImage.name)\" -t \"$(build-env devDeploymentBaseImage.tags)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentBaseImage.builderImage)\"", "image:docker:build": "kie-tools--image-builder build -r \"$(build-env devDeploymentBaseImage.registry)\" -a \"$(build-env devDeploymentBaseImage.account)\" -n \"$(build-env devDeploymentBaseImage.name)\" -t \"$(build-env devDeploymentBaseImage.tags)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentBaseImage.builderImage)\" --build-arg USER_ID_ARG=\"$(build-env devDeploymentBaseImage.userId)\" --build-arg HOME_PATH_ARG=\"$(build-env devDeploymentBaseImage.homePath)\"", "image:podman:build": "kie-tools--image-builder build -r \"$(build-env devDeploymentBaseImage.registry)\" -a \"$(build-env devDeploymentBaseImage.account)\" -n \"$(build-env devDeploymentBaseImage.name)\" -t \"$(build-env devDeploymentBaseImage.tags)\" --build-arg BUILDER_IMAGE_ARG=\"$(build-env devDeploymentBaseImage.builderImage)\" --build-arg USER_ID_ARG=\"$(build-env devDeploymentBaseImage.userId)\" --build-arg HOME_PATH_ARG=\"$(build-env devDeploymentBaseImage.homePath)\" -e podman", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "install:mvnw": "run-script-os", "install:mvnw:darwin:linux": "mvn wrapper:wrapper", "install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"", diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/package.json b/packages/dev-deployment-kogito-quarkus-blank-app/package.json index 581dddc12ee..2538f8bc914 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/package.json +++ b/packages/dev-deployment-kogito-quarkus-blank-app/package.json @@ -18,7 +18,7 @@ "build:caching:darwin:linux": "mvn package -DskipTests=$(build-env tests.run --not) -DskipITs=$(build-env endToEndTests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:caching:win32": "pnpm powershell \"mvn package `-DskipTests=$(build-env tests.run --not) `-DskipITs=$(build-env endToEndTests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", "clean": "mvn clean", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/extended-services-java/package.json b/packages/extended-services-java/package.json index 03ea848c18a..d2f38ed3336 100644 --- a/packages/extended-services-java/package.json +++ b/packages/extended-services-java/package.json @@ -26,7 +26,7 @@ "copy:app:linux:darwin": "copyfiles -u 1 \"target/quarkus-app/**/*\" dist/", "copy:app:win32": "copyfiles -u 1 \"target/quarkus-app/**\" dist/", "dist": "rimraf dist && mkdir dist && pnpm copy:app && pnpm rename:app", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command", "rename:app": "run-script-os", "rename:app:linux:darwin": "mv dist/quarkus-app dist/extended-services-java", diff --git a/packages/jbpm-quarkus-devui/package.json b/packages/jbpm-quarkus-devui/package.json index c6b62f532cc..9ea429a8b1c 100644 --- a/packages/jbpm-quarkus-devui/package.json +++ b/packages/jbpm-quarkus-devui/package.json @@ -19,7 +19,7 @@ "build:prod": "pnpm lint && run-script-os", "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command", "quarkus:dev": "run-script-os", diff --git a/packages/maven-base/package.json b/packages/maven-base/package.json index ab18e994e1d..b6fd0833119 100644 --- a/packages/maven-base/package.json +++ b/packages/maven-base/package.json @@ -19,7 +19,7 @@ "build:prod": "pnpm lint && run-script-os", "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/package.json b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/package.json index 692c4d3da2e..9d91dd26fba 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/package.json +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/package.json @@ -19,7 +19,7 @@ "build:prod": "pnpm lint && run-script-os", "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command", "quarkus:dev": "run-script-os", diff --git a/packages/serverless-workflow-diagram-editor/package.json b/packages/serverless-workflow-diagram-editor/package.json index 8b0fada375d..5040bb6f2de 100644 --- a/packages/serverless-workflow-diagram-editor/package.json +++ b/packages/serverless-workflow-diagram-editor/package.json @@ -22,7 +22,7 @@ "build:caching:darwin:linux": "mvn package -DskipTests=$(build-env tests.run --not) -DskipITs=$(build-env endToEndTests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:caching:win32": "pnpm powershell \"mvn package `-DskipTests=$(build-env tests.run --not) `-DskipITs=$(build-env endToEndTests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", "clean": "mvn clean", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/sonataflow-quarkus-devui/package.json b/packages/sonataflow-quarkus-devui/package.json index c1d9bd09606..8792357ccb3 100644 --- a/packages/sonataflow-quarkus-devui/package.json +++ b/packages/sonataflow-quarkus-devui/package.json @@ -19,7 +19,7 @@ "build:prod": "pnpm lint && run-script-os", "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command", "quarkus:dev": "run-script-os", diff --git a/packages/stunner-editors/package.json b/packages/stunner-editors/package.json index 8e8c79887a3..0b3958abca5 100644 --- a/packages/stunner-editors/package.json +++ b/packages/stunner-editors/package.json @@ -28,7 +28,7 @@ "dist:bpmn": "symlink-dir kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/target/kie-wb-common-stunner-bpmn-kogito-runtime ./dist/bpmn", "dist:dmn": "symlink-dir kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/target/kie-wb-common-dmn-webapp-kogito-runtime ./dist/dmn", "dist:scesim": "symlink-dir drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/target/drools-wb-scenario-simulation-editor-kogito-runtime ./dist/scesim", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/vscode-java-code-completion-extension-plugin/package.json b/packages/vscode-java-code-completion-extension-plugin/package.json index 639541c2b64..54e33da9252 100644 --- a/packages/vscode-java-code-completion-extension-plugin/package.json +++ b/packages/vscode-java-code-completion-extension-plugin/package.json @@ -23,7 +23,7 @@ "build:prod": "pnpm lint && run-script-os", "build:prod:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:prod:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "install:mvnw": "mvn wrapper:wrapper -f ./", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" diff --git a/packages/yard-model/package.json b/packages/yard-model/package.json index 21579ff484b..927921a1f8f 100644 --- a/packages/yard-model/package.json +++ b/packages/yard-model/package.json @@ -19,7 +19,7 @@ "build:caching:darwin:linux": "mvn package -DskipTests=$(build-env tests.run --not) -DskipITs=$(build-env endToEndTests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:caching:win32": "pnpm powershell \"mvn package `-DskipTests=$(build-env tests.run --not) `-DskipITs=$(build-env endToEndTests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", "clean": "mvn clean", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, diff --git a/packages/yard-validator-worker/package.json b/packages/yard-validator-worker/package.json index f5e2fc2c08d..d51e4b63ddb 100644 --- a/packages/yard-validator-worker/package.json +++ b/packages/yard-validator-worker/package.json @@ -21,7 +21,7 @@ "build:prod:darwin:linux": "pnpm install:mvnw && mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)", "build:prod:win32": "pnpm install:mvnw && pnpm powershell \"mvn clean install `-DskipTests=$(build-env tests.run --not) `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"", "copy:webworker": "copyfiles -f target/worker/yard-validator-worker/yard-validator-worker.js dist", - "install": "node install.js", + "install": "node install.js && mvn dependency:tree", "install:mvnw": "run-script-os", "install:mvnw:darwin:linux": "mvn wrapper:wrapper", "install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"", diff --git a/packages/yard-validator/install.js b/packages/yard-validator/install.js deleted file mode 100644 index 4247286a3fc..00000000000 --- a/packages/yard-validator/install.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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 buildEnv = require("./env"); -const { setup } = require("@kie-tools/maven-config-setup-helper"); - -setup(` - -Drevision=${buildEnv.env.yardValidator.version} -`); diff --git a/packages/yard-validator/package.json b/packages/yard-validator/package.json index ef41d51c611..7b2d07df3f6 100644 --- a/packages/yard-validator/package.json +++ b/packages/yard-validator/package.json @@ -17,8 +17,6 @@ "build:dev": "rimraf dist && tsc -p tsconfig.json && pnpm copy:webworker", "build:prod": "pnpm lint && tsc -p tsconfig.json && pnpm copy:webworker", "copy:webworker": "copyfiles -f node_modules/@kie-tools/yard-validator-worker/dist/yard-validator-worker.js dist", - "install": "node install.js", - "install:mvnw": "run-script-os", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" }, @@ -34,11 +32,5 @@ "rimraf": "^3.0.2", "run-script-os": "^1.1.6", "typescript": "^4.6.2" - }, - "kieTools": { - "requiredPreinstalledCliCommands": [ - "java", - "mvn" - ] } } \ No newline at end of file From e3c29115faf2cf97028f8f1c95eedc4406e398ef Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Mon, 15 Apr 2024 23:30:15 -0400 Subject: [PATCH 9/9] Fix reference done to `maven-base` --- packages/jbpm-quarkus-devui/pom.xml | 2 +- packages/sonataflow-quarkus-devui/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jbpm-quarkus-devui/pom.xml b/packages/jbpm-quarkus-devui/pom.xml index 48c40bf1cdc..56fee1070c3 100644 --- a/packages/jbpm-quarkus-devui/pom.xml +++ b/packages/jbpm-quarkus-devui/pom.xml @@ -29,7 +29,7 @@ org.kie kie-tools-maven-base ${revision} - ../maven-base/pom.xml + ./node_modules/@kie-tools/maven-base/pom.xml 4.0.0 diff --git a/packages/sonataflow-quarkus-devui/pom.xml b/packages/sonataflow-quarkus-devui/pom.xml index c7ea653f42a..b06db076419 100644 --- a/packages/sonataflow-quarkus-devui/pom.xml +++ b/packages/sonataflow-quarkus-devui/pom.xml @@ -29,7 +29,7 @@ org.kie kie-tools-maven-base ${revision} - ../maven-base/pom.xml + ./node_modules/@kie-tools/maven-base/pom.xml 4.0.0