Skip to content

Commit

Permalink
Merge pull request #32 from fantonangeli/sync-main-pr
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch
  • Loading branch information
fantonangeli authored Jul 9, 2024
2 parents bcde125 + 43475f7 commit 99ec7a1
Show file tree
Hide file tree
Showing 2,852 changed files with 294,852 additions and 223,683 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
**/dist-dev/
**/dist-dev-webapp/
**/dist-tests/
**/dist-e2e-tests/
**/dist-tests-e2e/
**/dist-storybook/
**/e2e-tests-tmp/
**/coverage/
Expand Down Expand Up @@ -75,6 +75,9 @@ node/
## runtime-tools-management-console-webapp
!packages/runtime-tools-management-console-webapp/build

## dev-deployment-dmn-form-webapp
!packages/dev-deployment-dmn-form-webapp/build

## vscode-*
**/.vscode-test/
**/.vscode-test-web/
Expand Down
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pnpm-lock.yaml

# @prettier/parser-xml transform empty elements to oneliners, breaking the compilation. e.g.: <ui></ui> -> <ui />
**/*.ui.xml

# @prettier/parser-xml tries to format *.mod files as they are used to create Document Type Definitions (DTDs).
**/go.mod

# @prettier/parser-xml plugin doesn't support DTD declaration
packages/xml-parser-ts-codegen/src/schemas/xsd/HFP.xsd
packages/xml-parser-ts-codegen/src/schemas/xsd-incomplete--manually-written/HFP.xsd
packages/xml-parser-ts-codegen/src/schemas/xsd-incomplete--manually-written/XSD.xsd
13 changes: 12 additions & 1 deletion .syncpackrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
{}
{
"versionGroups": [
{
"dependencies": ["prettier"],
"packages": [
"@kie-tools/uniforms-bootstrap4-codegen",
"@kie-tools/uniforms-patternfly-codegen",
"@kie-tools/yaml-language-server"
]
}
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
},
"files.associations": {
"*.yaml.helm": "helm"
}
},
"prettier.configPath": "prettier.config.mjs"
}
64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ This repository contains tooling applications and libraries for KIE projects.
To build and test all packages of the Apache KIE Tools project, you're going to need:

- Node `18` _(To install, follow these instructions: https://nodejs.org/en/download/package-manager/)_
- pnpm `8.7.0` _(To install, follow these instructions: https://pnpm.io/installation#using-npm)_
- Node `20` _(To install, follow these instructions: https://nodejs.org/en/download/package-manager/)_
- pnpm `9.3.0` _(To install, follow these instructions: https://pnpm.io/installation#using-npm)_
- Maven `3.9.6`
- Java `17`
- Go `1.21.9` _(To install, follow these instructions: https://go.dev/doc/install)_
Expand Down Expand Up @@ -117,6 +117,66 @@ Bootstrapping installs the necessary dependencies for each package.
---

## Reproducible Builds for _maven-based_ packages

It is mandatory that any _maven-based_ package that releases artifacts runs [Reproducible Builds](https://reproducible-builds.org/)
to build it's artifacts, in this case, in our `build:prod` scripts.

`@kie-tools/maven-base` provides the `reproducible-build` `maven` profile to enable _Reproducible Builds_ in our builds.
To use it follow the steps:

- Make sure the `package.json` depends on `@kie-tools/maven-base`:

```json
{
"dependencies": {
"@kie-tools/maven-base": "workspace:*"
}
}
```

- Make the package `pom.xml` has `kie-tools-maven-base` as a parent and declares the `project.build.outputTimestamp` property like:

```xml
<project>
<parent>
<groupId>org.kie</groupId>
<artifactId>kie-tools-maven-base</artifactId>
<version>${revision}</version>
<relativePath>./node_modules/@kie-tools/maven-base/pom.xml</relativePath>
</parent>
...
<properties>
<project.build.outputTimestamp>2024-01-12T00:00:00Z</project.build.outputTimestamp>
</properties>
...
<projec>
```

- In your `package.json` scripts, enable the _Reproducible Build_ profile adding the `-Dreproducible` argument in `build:prod` scripts, like:

```json
{
"scripts": {
"build:prod": "pnpm lint && run-script-os",
"build:prod:darwin:linux": "mvn clean deploy [...other maven options...] -Dreproducible",
"build:prod:win32": "pnpm powershell \"mvn clean deploy [...other maven options...] `-Dreproducible\""
}
}
```

> IMPORTANT: the current version of the `maven-artifact-plugin` (3.4.1) used in `kie-tools` bans the `maven-flatten-plugin` that
> we use to generate deployable artifacts using the dynamic `${revision}` variable. You can check the full list of banned
> plugins [here](https://maven.apache.org/plugins-archives/maven-artifact-plugin-3.4.1/plugin-issues.html).
> The issue that caused the ban [flatten-maven-plugin/issues/256](https://github.com/mojohaus/flatten-maven-plugin/issues/256) was a result
> of change in `maven` behaviour between `v3.8.1` and `v3.8.2`, and isn't a problem on the `maven-flatten-plugin`.
> Actually, in later versions of the `maven-artifact-plugin` the ban got revoked.
> Having this in mind, and due to the fact that `kie-tools` requires newer `maven` versions, our _Reproducible Builds_ require
> temporarily overriding the list of banned plugins, until we upgrade to a newer `maven-artifact-plugin` version.
> This will be addressed by https://github.com/apache/incubator-kie-issues/issues/1371
---

## Applications

The Apache KIE Tools project contains several applications. To develop each one of them individually, refer to the instructions below.
Expand Down
2 changes: 1 addition & 1 deletion devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.4/.schema/devbox.schema.json",
"packages": {
"temurin-bin-17": "17.0.9",
"nodejs": "18.20.2",
"nodejs": "20.12.2",
"maven": "3.9.6",
"kubernetes-helm": "3.13.3",
"gnumake": "4.4.1",
Expand Down
32 changes: 16 additions & 16 deletions devbox.lock
Original file line number Diff line number Diff line change
Expand Up @@ -237,68 +237,68 @@
}
}
},
"nodejs@18.20.2": {
"last_modified": "2024-04-19T17:36:04-04:00",
"nodejs@20.12.2": {
"last_modified": "2024-05-22T06:18:38Z",
"plugin_version": "0.0.2",
"resolved": "github:NixOS/nixpkgs/92d295f588631b0db2da509f381b4fb1e74173c5#nodejs_18",
"resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#nodejs_20",
"source": "devbox-search",
"version": "18.20.2",
"version": "20.12.2",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/c4cy6ivwvyccxb5cgvmibb48cz5kgbxh-nodejs-18.20.2",
"path": "/nix/store/bzzs4kvjyvjjhs3rj08vqpvvzmfggvbv-nodejs-20.12.2",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/sl20inmjg0p9nbsqcbvrrynbxr0d4z4j-nodejs-18.20.2-libv8"
"path": "/nix/store/c56874bxzncqwy58kif6wfnzy017v1sl-nodejs-20.12.2-libv8"
}
],
"store_path": "/nix/store/c4cy6ivwvyccxb5cgvmibb48cz5kgbxh-nodejs-18.20.2"
"store_path": "/nix/store/bzzs4kvjyvjjhs3rj08vqpvvzmfggvbv-nodejs-20.12.2"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/02sxkyivycayrw2qbf0vbln1vv2l75wg-nodejs-18.20.2",
"path": "/nix/store/y50zafzgnnkrj4hvmk23icv2ggvys8r9-nodejs-20.12.2",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/sl5gvfjjm6f0b818vnggkpadr1mcyfs3-nodejs-18.20.2-libv8"
"path": "/nix/store/vc7y8h3c8pwbh4zbvjcyfqrd3fhdjhw6-nodejs-20.12.2-libv8"
}
],
"store_path": "/nix/store/02sxkyivycayrw2qbf0vbln1vv2l75wg-nodejs-18.20.2"
"store_path": "/nix/store/y50zafzgnnkrj4hvmk23icv2ggvys8r9-nodejs-20.12.2"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/8j5ld9b8gciy0dfpnjbi98w76v05kia6-nodejs-18.20.2",
"path": "/nix/store/l53svh1nfrcb83qbqvrrkangrcl1rr25-nodejs-20.12.2",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/bza5hfp4mb002mp12g33v5arcpyg223s-nodejs-18.20.2-libv8"
"path": "/nix/store/q71hh22bfqjygd34gq16dv4dwfc33378-nodejs-20.12.2-libv8"
}
],
"store_path": "/nix/store/8j5ld9b8gciy0dfpnjbi98w76v05kia6-nodejs-18.20.2"
"store_path": "/nix/store/l53svh1nfrcb83qbqvrrkangrcl1rr25-nodejs-20.12.2"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/c9wp3qkbfkpx2vylglrmd4w0jwvm216z-nodejs-18.20.2",
"path": "/nix/store/6g9n96qf1yx139xklnmy3v4xhjvjgsji-nodejs-20.12.2",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/1il1i3j9qch6hg6f7pp1753z95lappzv-nodejs-18.20.2-libv8"
"path": "/nix/store/s7b0dqga0311mvq48mirnlm0p3dr4gm3-nodejs-20.12.2-libv8"
}
],
"store_path": "/nix/store/c9wp3qkbfkpx2vylglrmd4w0jwvm216z-nodejs-18.20.2"
"store_path": "/nix/store/6g9n96qf1yx139xklnmy3v4xhjvjgsji-nodejs-20.12.2"
}
}
},
Expand Down
48 changes: 33 additions & 15 deletions docs/kie.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/base64png-editor-chrome-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
"webpack-merge": "^5.9.0",
"zip-webpack-plugin": "^4.0.1"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
~ specific language governing permissions and limitations
~ under the License.
-->
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<style>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/base64png-editor-vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@
"onCustomEditor:kieKogitoWebviewBase64PNGEditor",
"onCommand:extension.kogito.createBase64Png"
]
}
}
2 changes: 1 addition & 1 deletion examples/base64png-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
"rimraf": "^3.0.2",
"typescript": "^4.6.2"
}
}
}
2 changes: 1 addition & 1 deletion examples/commit-message-validation-service/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = composeEnv([require("@kie-tools/root-env/env")], {
vars: varsWithName({
EXAMPLE_COMMIT_MESSAGE_VALIDATION_SERVICE__port: {
default: "8090",
description: "Web server port",
description: "HTTP server port where the service will run at.",
},
EXAMPLE_COMMIT_MESSAGE_VALIDATION_SERVICE__validators: {
default: "Length:5-72;IssuePrefix:kie-issues#*",
Expand Down
2 changes: 1 addition & 1 deletion examples/commit-message-validation-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
"make"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env");
const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env");

module.exports = composeEnv([require("@kie-tools/root-env/env")], {
vars: varsWithName({}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
"mvn"
]
}
}
}
Loading

0 comments on commit 99ec7a1

Please sign in to comment.