diff --git a/.gitignore b/.gitignore index 674dc5174..abe85d73a 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,8 @@ Splunk_TA_Dynatrace_ucc/* demo_addon_for_splunk/ demo_addon_for_splunk_already_exists/ init_addon_for_ucc_package/ + +# UI build +# ignore everything except redirect_page.js +splunk_add_on_ucc_framework/package/appserver/static/js/build/ +!splunk_add_on_ucc_framework/package/appserver/static/js/build/redirect_page.js diff --git a/.licenserc.yaml b/.licenserc.yaml index 01ce14467..c1eb5f7a8 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -47,5 +47,6 @@ header: - "splunk_add_on_ucc_framework/commands/imports.py" - "scripts/compare_different_ucc_versions_output.sh" - "scripts/include-rum.sh" + - "build-ui.sh" - "scripts/rum-script.html" - "mypy.ini" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c4af773a..ead0c3dc0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,3 @@ # Contributing Guidelines -Read about Contributing Guidelines [here](https://splunk.github.io/addonfactory-ucc-generator/contributing/). +Read about Contributing Guidelines [here](docs/contributing.md). diff --git a/README.md b/README.md index a0b261f06..bf43d3868 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ If you are a part of the community use: https://splunk-usergroups.slack.com/arch ## Contributing Guidelines -Go to [Contributing Guidelines](https://splunk.github.io/addonfactory-ucc-generator/contributing/). +Go to [contributing Guidelines in the repo](docs/contributing.md) or [published version](https://splunk.github.io/addonfactory-ucc-generator/contributing/). diff --git a/build-ui.sh b/build-ui.sh new file mode 100755 index 000000000..fa513558b --- /dev/null +++ b/build-ui.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cd ui && yarn run setup +cd .. + +cp -n -R ui/dist/build/ splunk_add_on_ucc_framework/package/appserver/static/js/build/ \ No newline at end of file diff --git a/docs/contributing.md b/docs/contributing.md index bba2b0395..690def907 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,19 +1,22 @@ # Contributing Guidelines +Default development branch is `develop`. Please use it for PR + ## Build and Test -Download UCC UI and unpack it using the following commands: +Prerequisites: +- Node.js >= 18 ([NodeJS](https://nodejs.org/en/download) or use [nvm](https://github.com/nvm-sh/nvm)) +- Yarn Classic (`npm install --global yarn`) +- Poetry 1.5.1. [Installation guide](https://python-poetry.org/docs/#installing-with-the-official-installer) + +If you are interested in contributing to UI, `ui` folder has separate README.md. +Building UI in `ui/dist` folder and copying files to static folder of UCC. ``` -cd ui/ -yarn -yarn run build -cp -R dist/ ../splunk_add_on_ucc_framework/ +./build-ui.sh ``` -This project uses [`poetry 1.5.1`](https://python-poetry.org/). - -To build a new local version of `ucc-gen`: +Building a new local version of `ucc-gen`: ``` poetry build diff --git a/pyproject.toml b/pyproject.toml index fc48ca726..bd6db9d00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ version = "5.32.0" description = "Splunk Add-on SDK formerly UCC is a build and code generation framework" license = "Apache-2.0" authors = ["Splunk "] -include = ["NOTICE"] +include = ["NOTICE", "splunk_add_on_ucc_framework/package/appserver/**/*"] readme = "README.md" homepage = "https://github.com/splunk/addonfactory-ucc-generator" repository = "https://github.com/splunk/addonfactory-ucc-generator" diff --git a/ui/.gitignore b/ui/.gitignore index 6e43ebb2e..68e34e22b 100644 --- a/ui/.gitignore +++ b/ui/.gitignore @@ -122,3 +122,5 @@ dist # output dist/** .idea + +storybook-static diff --git a/ui/README.md b/ui/README.md index 7d330cb6e..71293f147 100644 --- a/ui/README.md +++ b/ui/README.md @@ -22,11 +22,7 @@ asking, `format:verify` won't. Running `yarn run setup` once is required to enable all other tasks. The command might take a few minutes to finish. -## Communication channels - -If you are a Splunker use: https://splunk.slack.com/archives/C03T8QCHBTJ - -If you are a part of the community use: https://splunk-usergroups.slack.com/archives/C03SG3ZL4S1 +We have published Storybook: https://splunk.github.io/addonfactory-ucc-generator/storybook ## Code Formatting diff --git a/ui/package.json b/ui/package.json index 0ded14134..ea28c1a06 100644 --- a/ui/package.json +++ b/ui/package.json @@ -105,7 +105,8 @@ "string-width": "^4.2.2" }, "engines": { - "node": ">=14.21.2" + "node": ">=18", + "yarn": "^1" }, "msw": { "workerDirectory": "src/public"