Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T #120

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

T #120

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-ci-patterns/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ");
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
103 changes: 6 additions & 97 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:

env:
TMPDIR: "/tmp"
DO_NOT_TRACK: 1

jobs:
run:
Expand Down Expand Up @@ -80,7 +81,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"
Expand All @@ -96,107 +97,15 @@ 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 -F boxed-expression-component... build test test-e2e

- name: "PARTIAL → Bootstrap"
if: steps.setup_build_mode.outputs.mode == 'partial'
env:
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'
Expand All @@ -209,7 +118,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'
Expand All @@ -224,7 +133,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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_check_code_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/ci_check_dependencies_consistency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
- name: "Check dependencies mismatches"
shell: bash
run: |
pnpm bootstrap:root
turbo bootstrap:root
npx --yes [email protected] list-mismatches
4 changes: 2 additions & 2 deletions .github/workflows/release_build_extended_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/staging_build_extended_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,6 @@ fabric.properties
packages/bpmn-marshaller/**/ts-gen
packages/dmn-marshaller/**/ts-gen
packages/scesim-marshaller/**/ts-gen

# turborepo
.turbo
22 changes: 11 additions & 11 deletions packages/boxed-expression-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/chrome-extension-test-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/dashbuilder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-deployment-base-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
21 changes: 7 additions & 14 deletions packages/dev-deployment-kogito-quarkus-blank-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)\"",
"install": "node install.js",
"install:mvnw": "run-script-os",
"install:mvnw:darwin:linux": "mvn wrapper:wrapper",
"install:mvnw:win32": "pnpm powershell \"mvn wrapper:wrapper\"",
"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 && mvn dependency:tree",
"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:*",
Expand Down
9 changes: 9 additions & 0 deletions packages/dev-deployment-kogito-quarkus-blank-app/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"build:caching": {
"outputs": ["**/target/**", "**/.flattened-pom.xml", "mvnw", "mvnw.cmd"]
}
}
}
10 changes: 6 additions & 4 deletions packages/dmn-feel-antlr4-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
10 changes: 6 additions & 4 deletions packages/dmn-language-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand Down
Loading
Loading