diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..773f250 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,53 @@ +name: Pull Requests + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +concurrency: + group: pr-${{ github.ref }} + cancel-in-progress: true + +env: + VALE_VERSION: "3.6.0" + +jobs: + run-ci: + # runs-on: ubuntu-latest + runs-on: ubuntu-latest + defaults: + run: + shell: bash + if: ${{ !github.event.pull_request.draft && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' }} + steps: + # If the condition above is not met, aka, the PR is not in draft status, then this step is skipped. + # Because this step is part of the critical path, omission of this step will result in remaining CI steps not gettinge executed. + # As of 8/8/2022 there is now way to enforce this beahvior in GitHub Actions CI. + - run: exit 0 + + requirements: + runs-on: ubuntu-latest + needs: run-ci + defaults: + run: + shell: bash + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Get Vale + run: | + URL="https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" + wget --quiet $URL --output-document vale.tar.gz + tar -xzf vale.tar.gz + chmod +x vale + sudo mv vale /usr/local/bin/ + + - name: Vale Version + run: vale --version + + - name: Test Files Present? + run: make required_files + + - name: Tests + run: make tests diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index a191d1f..746e338 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -3,7 +3,7 @@ on: inputs: version: description: "The version of the Vale to use" - default: "3.5.0" + default: "3.6.0" type: string required: false diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..159bb9c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:24.04 + +COPY . /app + +ENV VALE_VERSION="2.3.0" + +RUN apt-get update && apt-get install wget make -y + +RUN URL="https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" && \ + wget --quiet $URL --output-document vale.tar.gz && \ + tar -xzf vale.tar.gz && \ + chmod +x vale && \ + mv vale /usr/local/bin/ + +WORKDIR /app + + +CMD ["make", "tests"] \ No newline at end of file diff --git a/Makefile b/Makefile index df72180..c68f60e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ .PHONY: license +##@ Development + help: ## Display this help @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[0m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) @@ -9,7 +11,18 @@ init: ## Initialize the project npm ci -##@ Development +##@ Testing + +required_files: ## Check if required files are present + @echo "Checking if required files are present..." + ./scripts/missing_tests.sh packages + + +tests: ## Run tests + @echo "Running tests..." + ./scripts/check_rule.sh packages + +##@ Publish zip: ## Create the spectrocloud package ./scripts/create_zip.sh diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/acronym.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/acronym.yml index e53bac2..38335b2 100644 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/acronym.yml +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/acronym.yml @@ -3,14 +3,14 @@ extends: conditional message: "Use title case to define the acronym '%s'." -link: 'https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Acronyms' +link: "https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Acronyms" level: error ignorecase: false scope: text -# Match two to five capital letters surrounded by brackets +# Match two to five capital letters surrounded by brackets # to detect an acronym definition. -first: '[(][A-Z]{2,5}[)]' -# Match two to five capitalised words separated by any number of dashes +first: "[(][A-Z]{2,5}[)]" +# Match two to five capitalised words separated by any number of dashes # or whitespaces before the acronym definition. second: '(\b(([A-Z][a-z]+)[\-\s ]{1,}){2,5})([(][A-Z]{2,5}[)])' exceptions: @@ -35,7 +35,6 @@ exceptions: - (JPEG) - (JPG) - (JSON) - - (OS) - (OSS) - (PDF) - (PNG) @@ -56,4 +55,4 @@ exceptions: - (XML) - (ZIP) - (PXK) - - (PXK-E) \ No newline at end of file + - (PXK-E) diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/admonitions.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/admonitions.yml index a634a65..c3184e1 100644 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/admonitions.yml +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/admonitions.yml @@ -6,6 +6,7 @@ message: "The ':::note' admonition is not approved under the Spectro Cloud style link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Admonitions/Callouts level: error nonword: true +scope: raw ignorecase: true swap: - ":::note": ":::info" \ No newline at end of file + ":::note": ":::info" diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/spectrocloud.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/brand.yml similarity index 100% rename from packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/spectrocloud.yml rename to packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/brand.yml diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/future.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/future.yml index 9c4432d..634dffa 100644 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/future.yml +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/future.yml @@ -6,9 +6,10 @@ message: "Avoid documenting features that are not available at present. You ment level: error ignorecase: true tokens: - - 'coming soon' - - 'in the future' - - 'not yet available' - - 'will be released' - - 'to be implemented' - - 'under development' + - "coming soon" + - "in the future" + - "not yet available" + - "will be released" + - "to be implemented" + - "under development" + - "next release" diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml index 7c0e233..81579ad 100644 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml @@ -2,12 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 extends: existence -message: "Avoid using a noun that starts with an '-ing' in headings. Your heading starts with '%s'." +message: "Avoid using a noun that starts with an -ing in headings. Your heading starts with a word ending in '%s'." level: error +scope: heading raw: - - '\n\n\# [a-z]*ing ' - - '\n\n\#\# [a-z]*ing ' - - '\n\n\#\#\# [a-z]*ing ' - - '\n\n\#\#\#\# [a-z]*ing ' - - '\n\n\#\#\#\#\# [a-z]*ing ' - - '\n\n\#\#\#\#\#\# [a-z]*ing ' \ No newline at end of file + - "ing\\b" diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/inclusive.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/inclusive.yml index e554fb7..836000b 100644 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/inclusive.yml +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/inclusive.yml @@ -6,9 +6,8 @@ message: "Consider avoiding '%s' in favor of more inclusive language." link: "https://spectrocloud.atlassian.net/wiki/x/AQBCaQ" ignorecase: true level: error -tokens: - - master - - slave nonword: true -exceptions: - - master branch \ No newline at end of file +scope: raw +tokens: + - '\b(master)\b(?! branch)' + - '\bslave\b' diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/oxford-comma.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/oxford-comma.yml index 227d86a..ae992d9 100644 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/oxford-comma.yml +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/oxford-comma.yml @@ -8,4 +8,4 @@ link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro scope: sentence nonword: true tokens: - - '(\b(?:\w+(?: \w+)?, )+\b(?:\w+(?: \w+)?) (?:and|or) \w+(?: \w+)?[.?!])' \ No newline at end of file + - '\b\w+(?: \w+)*, \w+(?: \w+)* (and|or) \w+(?: \w+)*[.?!]' diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/plural-parantheses.yaml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/plural-parantheses.yml similarity index 100% rename from packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/plural-parantheses.yaml rename to packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/plural-parantheses.yml diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/we.yaml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/we.yaml deleted file mode 100644 index 38cd2fd..0000000 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/we.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Spectro Cloud -# SPDX-License-Identifier: Apache-2.0 - -extends: existence -message: "Try to avoid using first-person plural. Use terms like '%s' instead of '%s'." -link: 'https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Active-voice' -level: warning -ignorecase: true -tokens: - - ours? - - us - - let's diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/we.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/we.yml new file mode 100644 index 0000000..e2801f1 --- /dev/null +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/we.yml @@ -0,0 +1,15 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +extends: existence +message: "Try to avoid using first-person plural. Avoid terms such as '%s'. Address the user directly." +link: "https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Active-voice" +level: warning +ignorecase: true +tokens: + - ours? + - us + - let's + - we can +exceptions: + - we recommend diff --git a/packages/spectrocloud-docs-internal/tests/ableism/.vale.ini b/packages/spectrocloud-docs-internal/tests/ableism/.vale.ini new file mode 100644 index 0000000..d82a04b --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/ableism/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.ableism = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/ableism/fail.md b/packages/spectrocloud-docs-internal/tests/ableism/fail.md new file mode 100644 index 0000000..006dfc5 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/ableism/fail.md @@ -0,0 +1,9 @@ +## Instructions + +You can access the cluster by running the following command. + +```bash +kubectl get pods +``` + +You can see all the pods that are running in the cluster. diff --git a/packages/spectrocloud-docs-internal/tests/ableism/pass.md b/packages/spectrocloud-docs-internal/tests/ableism/pass.md new file mode 100644 index 0000000..cee6b73 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/ableism/pass.md @@ -0,0 +1,9 @@ +## Instructions + +You can access the cluster by issuing the following command. + +```bash +kubectl get pods +``` + +The output displays all the pods active in the cluster. diff --git a/packages/spectrocloud-docs-internal/tests/acronym/.vale.ini b/packages/spectrocloud-docs-internal/tests/acronym/.vale.ini new file mode 100644 index 0000000..3b24c33 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/acronym/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.acronym = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/acronym/fail.md b/packages/spectrocloud-docs-internal/tests/acronym/fail.md new file mode 100644 index 0000000..e0c99db --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/acronym/fail.md @@ -0,0 +1,13 @@ +## Troubleshooting + +Use the following steps to resolve the operating system (OS) error. + +1. Log in to the system console of the OS. + +2. Download the API log from the Logs tab. + + :::info + + You can downlog the log in HTML or JSON format. + + ::: diff --git a/packages/spectrocloud-docs-internal/tests/acronym/pass.md b/packages/spectrocloud-docs-internal/tests/acronym/pass.md new file mode 100644 index 0000000..618489d --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/acronym/pass.md @@ -0,0 +1,13 @@ +## Troubleshooting + +Use the following steps to resolve the Operating System (OS) error. + +1. Log in to the system console of the OS. + +2. Download the API log from the Logs tab. + + :::note + + You can downlog the log in HTML or JSON format. + + ::: diff --git a/packages/spectrocloud-docs-internal/tests/admonitions/.vale.ini b/packages/spectrocloud-docs-internal/tests/admonitions/.vale.ini new file mode 100644 index 0000000..a4244d2 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/admonitions/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.admonitions = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/admonitions/fail.md b/packages/spectrocloud-docs-internal/tests/admonitions/fail.md new file mode 100644 index 0000000..537e0e6 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/admonitions/fail.md @@ -0,0 +1,17 @@ +# Learn to Use Palette + +In this tutorial, you will learn how to use Palette to deploy a Kubernetes cluster. + + :::note + + This tutorial does not cover Edge clusters. + + ::: + +The following table lists the supported operating systems for the Palette platform. + +:::note + +This will trigger a failure. + +::: diff --git a/packages/spectrocloud-docs-internal/tests/admonitions/pass.md b/packages/spectrocloud-docs-internal/tests/admonitions/pass.md new file mode 100644 index 0000000..584ccb7 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/admonitions/pass.md @@ -0,0 +1,17 @@ +# Learn to Use Palette + +In this tutorial, you will learn how to use Palette to deploy a Kubernetes cluster. + + :::info + + This tutorial does not cover Edge clusters. + + ::: + +The following table lists the supported operating systems for the Palette platform. + +:::info + +This will not trigger a failure. + +::: diff --git a/packages/spectrocloud-docs-internal/tests/brand/.vale.ini b/packages/spectrocloud-docs-internal/tests/brand/.vale.ini new file mode 100644 index 0000000..eb6e602 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/brand/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.brand = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/brand/fail.md b/packages/spectrocloud-docs-internal/tests/brand/fail.md new file mode 100644 index 0000000..fca87ab --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/brand/fail.md @@ -0,0 +1,3 @@ +## Company Information + +The organization, spectro cloud, was founded in 2019. We can be reached at support@spectrocloud.com diff --git a/packages/spectrocloud-docs-internal/tests/brand/pass.md b/packages/spectrocloud-docs-internal/tests/brand/pass.md new file mode 100644 index 0000000..d33c840 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/brand/pass.md @@ -0,0 +1,9 @@ +## Company Information + +The organization, Spectro Cloud, was founded in 2019. We can be reached at support@spectrocloud.com. You can also visit our website at [https://spectrocloud.com](https://spectrocloud.com). + +We also have a hidden CLI. + +```shell +spectrocloud --version +``` diff --git a/packages/spectrocloud-docs-internal/tests/colon/.vale.ini b/packages/spectrocloud-docs-internal/tests/colon/.vale.ini new file mode 100644 index 0000000..df26754 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/colon/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.colon = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/colon/fail.md b/packages/spectrocloud-docs-internal/tests/colon/fail.md new file mode 100644 index 0000000..7f00a04 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/colon/fail.md @@ -0,0 +1,21 @@ +### Deploying Cluster Profile + +Use the following command to remove all previous configurations: + + ```bash + kubectl delete -f cluster-profile.yaml + ``` + + :::info + + This callout is allowed. + + ::: + +A few things to keep in mind before removing the cluster profile: + +- The cluster profile is removed Palette + +- Active clusters are not affected. + +- Names starting with `project:scope` are reserved for internal use. diff --git a/packages/spectrocloud-docs-internal/tests/colon/pass.md b/packages/spectrocloud-docs-internal/tests/colon/pass.md new file mode 100644 index 0000000..c0d07eb --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/colon/pass.md @@ -0,0 +1,21 @@ +### Deploying Cluster Profile + +Use the following command to remove all previous configurations. + + ```bash + kubectl delete -f cluster-profile.yaml + ``` + + :::info + + This callout is allowed. + + ::: + +A few things to keep in mind before removing the cluster profile: + +- The cluster profile is removed Palette + +- Active clusters are not affected. + +- Names starting with `project:scope` are reserved for internal use. diff --git a/packages/spectrocloud-docs-internal/tests/condescending/.vale.ini b/packages/spectrocloud-docs-internal/tests/condescending/.vale.ini new file mode 100644 index 0000000..f3c33e0 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/condescending/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.condescending = YES diff --git a/packages/spectrocloud-docs-internal/tests/condescending/fail.md b/packages/spectrocloud-docs-internal/tests/condescending/fail.md new file mode 100644 index 0000000..4b2479a --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/condescending/fail.md @@ -0,0 +1,8 @@ +## Information + +The design of the prouct is based on the following principles: + +- Reduce complexity by providing an easy single pane of glass for managing all your clusters. +- Provide a consistent experience across all cloud providers. +- Ease the use of Kubernetes by providing a clear and intuitive user interface. +- Obvious UX patterns and design elements. diff --git a/packages/spectrocloud-docs-internal/tests/condescending/pass.md b/packages/spectrocloud-docs-internal/tests/condescending/pass.md new file mode 100644 index 0000000..0524c7b --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/condescending/pass.md @@ -0,0 +1,7 @@ +## Information + +The design of the prouct is based on the following principles: + +- Reduce complexity by providing a single pane of glass for managing all your clusters. +- Provide a consistent experience across all cloud providers. +- Ease the use of Kubernetes by providing a clear and intuitive user interface. diff --git a/packages/spectrocloud-docs-internal/tests/direction/.vale.ini b/packages/spectrocloud-docs-internal/tests/direction/.vale.ini new file mode 100644 index 0000000..e84c56e --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/direction/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.direction = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/direction/fail.md b/packages/spectrocloud-docs-internal/tests/direction/fail.md new file mode 100644 index 0000000..579b8ce --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/direction/fail.md @@ -0,0 +1,9 @@ +# Spectro Pack + +The Spectro Pack is used to maintain internal Palette configurations used by the Palette Installer during a deployment. The following list provides an overview of the Spectro Pack: + +- A pack containing immutable configurations used by the Palette Installer. + +- The Spectro Pack is used to maintain internal Palette configurations. + +- As mentioned above, the Spectro Pack is immutable and should not be modified. diff --git a/packages/spectrocloud-docs-internal/tests/direction/pass.md b/packages/spectrocloud-docs-internal/tests/direction/pass.md new file mode 100644 index 0000000..19baee2 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/direction/pass.md @@ -0,0 +1,9 @@ +# Spectro Pack + +The Spectro Pack is used to maintain internal Palette configurations used by the Palette Installer during a deployment. The following list provides an overview of the Spectro Pack: + +- A pack containing immutable configurations used by the Palette Installer. + +- The Spectro Pack is used to maintain internal Palette configurations. + +- As mention earlier, the Spectro Pack is immutable and should not be modified. diff --git a/packages/spectrocloud-docs-internal/tests/file-type/.vale.ini b/packages/spectrocloud-docs-internal/tests/file-type/.vale.ini new file mode 100644 index 0000000..50d1506 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/file-type/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.file-type = YES diff --git a/packages/spectrocloud-docs-internal/tests/file-type/fail.md b/packages/spectrocloud-docs-internal/tests/file-type/fail.md new file mode 100644 index 0000000..b8f4d8d --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/file-type/fail.md @@ -0,0 +1,19 @@ +# Supported Formats + +The following file type are supported by Palette: + +- csv file +- iso file +- json file +- md file +- pdf file +- png file +- py file +- svg file +- tar file +- tf file +- tgz file +- txt file +- yaml file +- ZIP file +- zst file diff --git a/packages/spectrocloud-docs-internal/tests/file-type/pass.md b/packages/spectrocloud-docs-internal/tests/file-type/pass.md new file mode 100644 index 0000000..86f2f52 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/file-type/pass.md @@ -0,0 +1,19 @@ +# Supported Formats + +The following file type are supported by Palette: + +- CSV file +- ISO file +- JSON file +- MD file +- PDF file +- PNG file +- PY file +- SVG file +- TAR file +- TF file +- TGZ file +- TXT file +- YAML file +- zip file +- ZST file diff --git a/packages/spectrocloud-docs-internal/tests/future/.vale.ini b/packages/spectrocloud-docs-internal/tests/future/.vale.ini new file mode 100644 index 0000000..3f59268 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/future/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.future = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/future/fail.md b/packages/spectrocloud-docs-internal/tests/future/fail.md new file mode 100644 index 0000000..2b58789 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/future/fail.md @@ -0,0 +1,9 @@ +# Overview + +In the next release of Palette, the ability to deploy multiple Kubernetes clusters with a single click will be available + +:::info + +This feature will be limited to the Enterprise Edition. VerteX is still under development and will be announced in the future. + +::: diff --git a/packages/spectrocloud-docs-internal/tests/future/pass.md b/packages/spectrocloud-docs-internal/tests/future/pass.md new file mode 100644 index 0000000..8ecc755 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/future/pass.md @@ -0,0 +1,3 @@ +# Overview + +The ability to deploy multiple Kubernetes clusters with a single click is not currently available in Palette. End users can achieve similar functionality by using the Spectro Cloud API to automate the deployment of multiple clusters. diff --git a/packages/spectrocloud-docs-internal/tests/gender/.vale.ini b/packages/spectrocloud-docs-internal/tests/gender/.vale.ini new file mode 100644 index 0000000..1005e30 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/gender/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.gender = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/gender/fail.md b/packages/spectrocloud-docs-internal/tests/gender/fail.md new file mode 100644 index 0000000..b46eac4 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/gender/fail.md @@ -0,0 +1,9 @@ +## Requirements + +- Ensure users can select the platform version. They may have to request a new version if it is not available. + +- Kubernetes version 1.20.0 or later is required. + +## Usage + +Select the left **Main Menu**. The user, he should ensure there are no errors in the **Platform Version** field. diff --git a/packages/spectrocloud-docs-internal/tests/gender/pass.md b/packages/spectrocloud-docs-internal/tests/gender/pass.md new file mode 100644 index 0000000..08e6b5b --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/gender/pass.md @@ -0,0 +1,9 @@ +## Requirements + +- Ensure users can select the platform version. They may have to request a new version if it is not available. + +- Kubernetes version 1.20.0 or later is required. + +## Usage + +Select the left **Main Menu**. The user should ensure there are no errors in the **Platform Version** field. diff --git a/packages/spectrocloud-docs-internal/tests/headings-title/.vale.ini b/packages/spectrocloud-docs-internal/tests/headings-title/.vale.ini new file mode 100644 index 0000000..f0196ea --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/headings-title/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.headings-title = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/headings-title/fail.md b/packages/spectrocloud-docs-internal/tests/headings-title/fail.md new file mode 100644 index 0000000..6d473de --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/headings-title/fail.md @@ -0,0 +1,11 @@ +# Palette eXtended Kubernetes (PXK) + +Palette eXtended Kubernetes (PXK) is a Kubernetes distribution that is optimized for Palette. + +### Features + +#### Managing Multiple Clusters + +##### Security + +###### Exceptions diff --git a/packages/spectrocloud-docs-internal/tests/headings-title/pass.md b/packages/spectrocloud-docs-internal/tests/headings-title/pass.md new file mode 100644 index 0000000..1737a53 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/headings-title/pass.md @@ -0,0 +1,11 @@ +# Palette eXtended Kubernetes (PXK) + +Palette eXtended Kubernetes (PXK) is a Kubernetes distribution that is optimized for Palette. + +### Features + +#### Multi-Cluster Management + +##### Security + +###### Exceptions diff --git a/packages/spectrocloud-docs-internal/tests/inclusive/.vale.ini b/packages/spectrocloud-docs-internal/tests/inclusive/.vale.ini new file mode 100644 index 0000000..3edea11 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/inclusive/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.inclusive = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/inclusive/fail.md b/packages/spectrocloud-docs-internal/tests/inclusive/fail.md new file mode 100644 index 0000000..08cfcc3 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/inclusive/fail.md @@ -0,0 +1,3 @@ +# Cluster Nodes + +Palette manages both the master and worker nodes in a cluster. The master nodes are responsible for managing the worker nodes, and the worker nodes are responsible for handling the workloads. diff --git a/packages/spectrocloud-docs-internal/tests/inclusive/pass.md b/packages/spectrocloud-docs-internal/tests/inclusive/pass.md new file mode 100644 index 0000000..5074902 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/inclusive/pass.md @@ -0,0 +1,3 @@ +# Cluster Nodes + +The source code can be found in the master branch of the public repository. diff --git a/packages/spectrocloud-docs-internal/tests/longform/.vale.ini b/packages/spectrocloud-docs-internal/tests/longform/.vale.ini new file mode 100644 index 0000000..d7c20d3 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/longform/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.longform = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/longform/fail.md b/packages/spectrocloud-docs-internal/tests/longform/fail.md new file mode 100644 index 0000000..bfb57b5 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/longform/fail.md @@ -0,0 +1,15 @@ +## Debug Steps + +Use the following steps to debug the issue. + +1. Check the logs for any errors. + + ```shell + palette -h work -n + ``` + +2. Check the status of the pods. + + ```shell + kubeclt logs pod-name -n + ``` diff --git a/packages/spectrocloud-docs-internal/tests/longform/pass.md b/packages/spectrocloud-docs-internal/tests/longform/pass.md new file mode 100644 index 0000000..37e19d7 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/longform/pass.md @@ -0,0 +1,15 @@ +## Debug Steps + +Use the following steps to debug the issue. + +1. Check the logs for any errors. + +```shell +kubectl logs pod-name --namespace namespace +``` + +2. Check the status of the pods. + + ```shell + kubeclt logs pod-name --namespace + ``` diff --git a/packages/spectrocloud-docs-internal/tests/oxford-comma/.vale.ini b/packages/spectrocloud-docs-internal/tests/oxford-comma/.vale.ini new file mode 100644 index 0000000..f647913 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/oxford-comma/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.oxford-comma = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/oxford-comma/fail.md b/packages/spectrocloud-docs-internal/tests/oxford-comma/fail.md new file mode 100644 index 0000000..1175761 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/oxford-comma/fail.md @@ -0,0 +1,5 @@ +## Overview + +The project requires collaboration among engineers, designers and managers to succeed. + +From the left Main Menu, select Profiles and then select Add Cluster Profile. diff --git a/packages/spectrocloud-docs-internal/tests/oxford-comma/pass.md b/packages/spectrocloud-docs-internal/tests/oxford-comma/pass.md new file mode 100644 index 0000000..0342ac9 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/oxford-comma/pass.md @@ -0,0 +1,5 @@ +## Overview + +With a unique approach to managing multiple clusters, Palette gives IT teams complete control, visibility, and production-scale efficiencies. + +From the left Main Menu, select Profiles, and then select Add Cluster Profile. diff --git a/packages/spectrocloud-docs-internal/tests/plural-parantheses/.vale.ini b/packages/spectrocloud-docs-internal/tests/plural-parantheses/.vale.ini new file mode 100644 index 0000000..3db9a10 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/plural-parantheses/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.plural-parantheses = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/plural-parantheses/fail.md b/packages/spectrocloud-docs-internal/tests/plural-parantheses/fail.md new file mode 100644 index 0000000..689a44a --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/plural-parantheses/fail.md @@ -0,0 +1,13 @@ +## Parameters + +The following parameter(s) are supported. + +:::info + +The cluster node(s) will automatically scale down. + +::: + +- `name` (string, required): The name of the user. + +- `age` (number, required): The age of the user. diff --git a/packages/spectrocloud-docs-internal/tests/plural-parantheses/pass.md b/packages/spectrocloud-docs-internal/tests/plural-parantheses/pass.md new file mode 100644 index 0000000..53cd7cd --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/plural-parantheses/pass.md @@ -0,0 +1,7 @@ +## Parameters + +The following parameters are supported: + +- `name` (string, required): The name of the user. + +- `age` (number, required): The age of the user. diff --git a/packages/spectrocloud-docs-internal/tests/product-ui/.vale.ini b/packages/spectrocloud-docs-internal/tests/product-ui/.vale.ini new file mode 100644 index 0000000..faf3ddf --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/product-ui/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.product-ui = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/product-ui/fail.md b/packages/spectrocloud-docs-internal/tests/product-ui/fail.md new file mode 100644 index 0000000..aee8785 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/product-ui/fail.md @@ -0,0 +1,14 @@ +# Enable Feature + +Use the following steps to enable the specical feature. + +1. Log in to Palette. + +2. Navigate to the nav bar and select **Features**. + +3. Select the three dots and click on "Enable Feature". + + :::note + + The dropdown menu on the side also contains more options. + ::: diff --git a/packages/spectrocloud-docs-internal/tests/product-ui/pass.md b/packages/spectrocloud-docs-internal/tests/product-ui/pass.md new file mode 100644 index 0000000..6599b77 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/product-ui/pass.md @@ -0,0 +1,14 @@ +# Enable Feature + +Use the following steps to enable the specical feature. + +1. Log in to Palette. + +2. Navigate to the left **Main Menu** and select **Features**. + +3. Select the **three-dots Menu** and click on "Enable Feature". + + :::note + + The **drop-down Menu** on the side also contains more options. + ::: diff --git a/packages/spectrocloud-docs-internal/tests/we/.vale.ini b/packages/spectrocloud-docs-internal/tests/we/.vale.ini new file mode 100644 index 0000000..d320c37 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/we/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.we = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/we/fail.md b/packages/spectrocloud-docs-internal/tests/we/fail.md new file mode 100644 index 0000000..0a6f68d --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/we/fail.md @@ -0,0 +1,21 @@ +# Debug Steps + +Let's dive into the debugging steps to resolve the issue. + +:::note + +Before you begin, take note of how us and other orgs use the kubectl tool. + +::: + +1. We recommend clearing the cache before you begin. + + ```shell + kubectl cache clear + ``` + + :::tip + + We can also use the `kubectl clear --cache` command. + + ::: diff --git a/packages/spectrocloud-docs-internal/tests/we/pass.md b/packages/spectrocloud-docs-internal/tests/we/pass.md new file mode 100644 index 0000000..d2c687a --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/we/pass.md @@ -0,0 +1,15 @@ +# Debug Steps + +Use the following steps to resolve the issue. + +:::note + +We use kubectl in a distinct way. Make sure you understand the differences by reviewing the longform flags. + +::: + +1. We recommend clearing the cache before you begin. + + ```shell + kubectl cache clear + ``` diff --git a/packages/spectrocloud/styles/spectrocloud/acronym.yml b/packages/spectrocloud/styles/spectrocloud/acronym.yml index e53bac2..38335b2 100644 --- a/packages/spectrocloud/styles/spectrocloud/acronym.yml +++ b/packages/spectrocloud/styles/spectrocloud/acronym.yml @@ -3,14 +3,14 @@ extends: conditional message: "Use title case to define the acronym '%s'." -link: 'https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Acronyms' +link: "https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Acronyms" level: error ignorecase: false scope: text -# Match two to five capital letters surrounded by brackets +# Match two to five capital letters surrounded by brackets # to detect an acronym definition. -first: '[(][A-Z]{2,5}[)]' -# Match two to five capitalised words separated by any number of dashes +first: "[(][A-Z]{2,5}[)]" +# Match two to five capitalised words separated by any number of dashes # or whitespaces before the acronym definition. second: '(\b(([A-Z][a-z]+)[\-\s ]{1,}){2,5})([(][A-Z]{2,5}[)])' exceptions: @@ -35,7 +35,6 @@ exceptions: - (JPEG) - (JPG) - (JSON) - - (OS) - (OSS) - (PDF) - (PNG) @@ -56,4 +55,4 @@ exceptions: - (XML) - (ZIP) - (PXK) - - (PXK-E) \ No newline at end of file + - (PXK-E) diff --git a/packages/spectrocloud/styles/spectrocloud/admonitions.yml b/packages/spectrocloud/styles/spectrocloud/admonitions.yml index a634a65..c3184e1 100644 --- a/packages/spectrocloud/styles/spectrocloud/admonitions.yml +++ b/packages/spectrocloud/styles/spectrocloud/admonitions.yml @@ -6,6 +6,7 @@ message: "The ':::note' admonition is not approved under the Spectro Cloud style link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Admonitions/Callouts level: error nonword: true +scope: raw ignorecase: true swap: - ":::note": ":::info" \ No newline at end of file + ":::note": ":::info" diff --git a/packages/spectrocloud/styles/spectrocloud/spectrocloud.yml b/packages/spectrocloud/styles/spectrocloud/brand.yml similarity index 100% rename from packages/spectrocloud/styles/spectrocloud/spectrocloud.yml rename to packages/spectrocloud/styles/spectrocloud/brand.yml diff --git a/packages/spectrocloud/styles/spectrocloud/future.yml b/packages/spectrocloud/styles/spectrocloud/future.yml index 9c4432d..634dffa 100644 --- a/packages/spectrocloud/styles/spectrocloud/future.yml +++ b/packages/spectrocloud/styles/spectrocloud/future.yml @@ -6,9 +6,10 @@ message: "Avoid documenting features that are not available at present. You ment level: error ignorecase: true tokens: - - 'coming soon' - - 'in the future' - - 'not yet available' - - 'will be released' - - 'to be implemented' - - 'under development' + - "coming soon" + - "in the future" + - "not yet available" + - "will be released" + - "to be implemented" + - "under development" + - "next release" diff --git a/packages/spectrocloud/styles/spectrocloud/headings-title.yml b/packages/spectrocloud/styles/spectrocloud/headings-title.yml index 7c0e233..81579ad 100644 --- a/packages/spectrocloud/styles/spectrocloud/headings-title.yml +++ b/packages/spectrocloud/styles/spectrocloud/headings-title.yml @@ -2,12 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 extends: existence -message: "Avoid using a noun that starts with an '-ing' in headings. Your heading starts with '%s'." +message: "Avoid using a noun that starts with an -ing in headings. Your heading starts with a word ending in '%s'." level: error +scope: heading raw: - - '\n\n\# [a-z]*ing ' - - '\n\n\#\# [a-z]*ing ' - - '\n\n\#\#\# [a-z]*ing ' - - '\n\n\#\#\#\# [a-z]*ing ' - - '\n\n\#\#\#\#\# [a-z]*ing ' - - '\n\n\#\#\#\#\#\# [a-z]*ing ' \ No newline at end of file + - "ing\\b" diff --git a/packages/spectrocloud/styles/spectrocloud/inclusive.yml b/packages/spectrocloud/styles/spectrocloud/inclusive.yml index e554fb7..836000b 100644 --- a/packages/spectrocloud/styles/spectrocloud/inclusive.yml +++ b/packages/spectrocloud/styles/spectrocloud/inclusive.yml @@ -6,9 +6,8 @@ message: "Consider avoiding '%s' in favor of more inclusive language." link: "https://spectrocloud.atlassian.net/wiki/x/AQBCaQ" ignorecase: true level: error -tokens: - - master - - slave nonword: true -exceptions: - - master branch \ No newline at end of file +scope: raw +tokens: + - '\b(master)\b(?! branch)' + - '\bslave\b' diff --git a/packages/spectrocloud/styles/spectrocloud/longform.yml b/packages/spectrocloud/styles/spectrocloud/longform.yml index 3476ca7..f2d9ff0 100644 --- a/packages/spectrocloud/styles/spectrocloud/longform.yml +++ b/packages/spectrocloud/styles/spectrocloud/longform.yml @@ -1,7 +1,5 @@ # Copyright (c) Spectro Cloud # SPDX-License-Identifier: Apache-2.0 - ---- extends: existence message: "Avoid using the short form of commands. Replace the short form flag in '%s' with the corresponding long form flag." link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Commands-%26-Parameters @@ -9,21 +7,21 @@ level: error ignorecase: false scope: raw tokens: -# Match a word followed by one or more spaces, followed by the short form of a flag (one to three letters). The short flag can appear one or more times consecutively. For example: palette -h. - - (\b([\w]+))([\s ]{1,}[-][a-zA-Z]{1,3})+ + # Match a word followed by one or more spaces, followed by the short form of a flag (one to three letters). The short flag can appear one or more times consecutively. For example: palette -h. + - (\b([\w]+))([\s ]{1,}[-][a-zA-Z]{1,3})+ exceptions: - - ls([\s ]{1,}[-][a-zA-Z]{1,3})+ - - cd([\s ]{1,}[-][a-zA-Z]{1,3})+ - - cp([\s ]{1,}[-][a-zA-Z]{1,3})+ - - mv([\s ]{1,}[-][a-zA-Z]{1,3})+ - - rm([\s ]{1,}[-][a-zA-Z]{1,3})+ - - mkdir([\s ]{1,}[-][a-zA-Z]{1,3})+ - - rmdir([\s ]{1,}[-][a-zA-Z]{1,3})+ - - cat([\s ]{1,}[-][a-zA-Z]{1,3})+ - - pwd([\s ]{1,}[-][a-zA-Z]{1,3})+ - - echo([\s ]{1,}[-][a-zA-Z]{1,3})+ - - chmod([\s ]{1,}[-][a-zA-Z]{1,3})+ - - chown([\s ]{1,}[-][a-zA-Z]{1,3})+ - - sed([\s ]{1,}[-][a-zA-Z]{1,3})+ - - wc([\s ]{1,}[-][a-zA-Z]{1,3})+ - - tar([\s ]{1,}[-][a-zA-Z]{1,3})+ \ No newline at end of file + - ls([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cd([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cp([\s ]{1,}[-][a-zA-Z]{1,3})+ + - mv([\s ]{1,}[-][a-zA-Z]{1,3})+ + - rm([\s ]{1,}[-][a-zA-Z]{1,3})+ + - mkdir([\s ]{1,}[-][a-zA-Z]{1,3})+ + - rmdir([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cat([\s ]{1,}[-][a-zA-Z]{1,3})+ + - pwd([\s ]{1,}[-][a-zA-Z]{1,3})+ + - echo([\s ]{1,}[-][a-zA-Z]{1,3})+ + - chmod([\s ]{1,}[-][a-zA-Z]{1,3})+ + - chown([\s ]{1,}[-][a-zA-Z]{1,3})+ + - sed([\s ]{1,}[-][a-zA-Z]{1,3})+ + - wc([\s ]{1,}[-][a-zA-Z]{1,3})+ + - tar([\s ]{1,}[-][a-zA-Z]{1,3})+ diff --git a/packages/spectrocloud/styles/spectrocloud/oxford-comma.yml b/packages/spectrocloud/styles/spectrocloud/oxford-comma.yml index 227d86a..ae992d9 100644 --- a/packages/spectrocloud/styles/spectrocloud/oxford-comma.yml +++ b/packages/spectrocloud/styles/spectrocloud/oxford-comma.yml @@ -8,4 +8,4 @@ link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro scope: sentence nonword: true tokens: - - '(\b(?:\w+(?: \w+)?, )+\b(?:\w+(?: \w+)?) (?:and|or) \w+(?: \w+)?[.?!])' \ No newline at end of file + - '\b\w+(?: \w+)*, \w+(?: \w+)* (and|or) \w+(?: \w+)*[.?!]' diff --git a/packages/spectrocloud/styles/spectrocloud/plural-parantheses.yaml b/packages/spectrocloud/styles/spectrocloud/plural-parantheses.yml similarity index 96% rename from packages/spectrocloud/styles/spectrocloud/plural-parantheses.yaml rename to packages/spectrocloud/styles/spectrocloud/plural-parantheses.yml index 298bb32..f31919b 100644 --- a/packages/spectrocloud/styles/spectrocloud/plural-parantheses.yaml +++ b/packages/spectrocloud/styles/spectrocloud/plural-parantheses.yml @@ -12,4 +12,4 @@ action: - trim_right - "(s)" tokens: - - '\b\w+\(s\)' \ No newline at end of file + - '\b\w+\(s\)' diff --git a/packages/spectrocloud/styles/spectrocloud/we.yaml b/packages/spectrocloud/styles/spectrocloud/we.yaml deleted file mode 100644 index 38cd2fd..0000000 --- a/packages/spectrocloud/styles/spectrocloud/we.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Spectro Cloud -# SPDX-License-Identifier: Apache-2.0 - -extends: existence -message: "Try to avoid using first-person plural. Use terms like '%s' instead of '%s'." -link: 'https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Active-voice' -level: warning -ignorecase: true -tokens: - - ours? - - us - - let's diff --git a/packages/spectrocloud/styles/spectrocloud/we.yml b/packages/spectrocloud/styles/spectrocloud/we.yml new file mode 100644 index 0000000..e2801f1 --- /dev/null +++ b/packages/spectrocloud/styles/spectrocloud/we.yml @@ -0,0 +1,15 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +extends: existence +message: "Try to avoid using first-person plural. Avoid terms such as '%s'. Address the user directly." +link: "https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Active-voice" +level: warning +ignorecase: true +tokens: + - ours? + - us + - let's + - we can +exceptions: + - we recommend diff --git a/packages/spectrocloud/tests/ableism/.vale.ini b/packages/spectrocloud/tests/ableism/.vale.ini new file mode 100644 index 0000000..4fa4193 --- /dev/null +++ b/packages/spectrocloud/tests/ableism/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.ableism = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/ableism/fail.md b/packages/spectrocloud/tests/ableism/fail.md new file mode 100644 index 0000000..006dfc5 --- /dev/null +++ b/packages/spectrocloud/tests/ableism/fail.md @@ -0,0 +1,9 @@ +## Instructions + +You can access the cluster by running the following command. + +```bash +kubectl get pods +``` + +You can see all the pods that are running in the cluster. diff --git a/packages/spectrocloud/tests/ableism/pass.md b/packages/spectrocloud/tests/ableism/pass.md new file mode 100644 index 0000000..cee6b73 --- /dev/null +++ b/packages/spectrocloud/tests/ableism/pass.md @@ -0,0 +1,9 @@ +## Instructions + +You can access the cluster by issuing the following command. + +```bash +kubectl get pods +``` + +The output displays all the pods active in the cluster. diff --git a/packages/spectrocloud/tests/acronym/.vale.ini b/packages/spectrocloud/tests/acronym/.vale.ini new file mode 100644 index 0000000..3d853db --- /dev/null +++ b/packages/spectrocloud/tests/acronym/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.acronym = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/acronym/fail.md b/packages/spectrocloud/tests/acronym/fail.md new file mode 100644 index 0000000..e0c99db --- /dev/null +++ b/packages/spectrocloud/tests/acronym/fail.md @@ -0,0 +1,13 @@ +## Troubleshooting + +Use the following steps to resolve the operating system (OS) error. + +1. Log in to the system console of the OS. + +2. Download the API log from the Logs tab. + + :::info + + You can downlog the log in HTML or JSON format. + + ::: diff --git a/packages/spectrocloud/tests/acronym/pass.md b/packages/spectrocloud/tests/acronym/pass.md new file mode 100644 index 0000000..0166712 --- /dev/null +++ b/packages/spectrocloud/tests/acronym/pass.md @@ -0,0 +1,13 @@ +## Troubleshooting + +Use the following steps to resolve the Operating System (OS) error. + +1. Log in to the system console of the OS. + +2. Download the API log from the Logs tab. + + :::info + + You can downlog the log in HTML or JSON format. + + ::: diff --git a/packages/spectrocloud/tests/admonitions/.vale.ini b/packages/spectrocloud/tests/admonitions/.vale.ini new file mode 100644 index 0000000..11ff097 --- /dev/null +++ b/packages/spectrocloud/tests/admonitions/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.admonitions = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/admonitions/fail.md b/packages/spectrocloud/tests/admonitions/fail.md new file mode 100644 index 0000000..537e0e6 --- /dev/null +++ b/packages/spectrocloud/tests/admonitions/fail.md @@ -0,0 +1,17 @@ +# Learn to Use Palette + +In this tutorial, you will learn how to use Palette to deploy a Kubernetes cluster. + + :::note + + This tutorial does not cover Edge clusters. + + ::: + +The following table lists the supported operating systems for the Palette platform. + +:::note + +This will trigger a failure. + +::: diff --git a/packages/spectrocloud/tests/admonitions/pass.md b/packages/spectrocloud/tests/admonitions/pass.md new file mode 100644 index 0000000..584ccb7 --- /dev/null +++ b/packages/spectrocloud/tests/admonitions/pass.md @@ -0,0 +1,17 @@ +# Learn to Use Palette + +In this tutorial, you will learn how to use Palette to deploy a Kubernetes cluster. + + :::info + + This tutorial does not cover Edge clusters. + + ::: + +The following table lists the supported operating systems for the Palette platform. + +:::info + +This will not trigger a failure. + +::: diff --git a/packages/spectrocloud/tests/brand/.vale.ini b/packages/spectrocloud/tests/brand/.vale.ini new file mode 100644 index 0000000..6be2d8c --- /dev/null +++ b/packages/spectrocloud/tests/brand/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.brand = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/brand/fail.md b/packages/spectrocloud/tests/brand/fail.md new file mode 100644 index 0000000..fca87ab --- /dev/null +++ b/packages/spectrocloud/tests/brand/fail.md @@ -0,0 +1,3 @@ +## Company Information + +The organization, spectro cloud, was founded in 2019. We can be reached at support@spectrocloud.com diff --git a/packages/spectrocloud/tests/brand/pass.md b/packages/spectrocloud/tests/brand/pass.md new file mode 100644 index 0000000..d33c840 --- /dev/null +++ b/packages/spectrocloud/tests/brand/pass.md @@ -0,0 +1,9 @@ +## Company Information + +The organization, Spectro Cloud, was founded in 2019. We can be reached at support@spectrocloud.com. You can also visit our website at [https://spectrocloud.com](https://spectrocloud.com). + +We also have a hidden CLI. + +```shell +spectrocloud --version +``` diff --git a/packages/spectrocloud/tests/colon/.vale.ini b/packages/spectrocloud/tests/colon/.vale.ini new file mode 100644 index 0000000..a3dff66 --- /dev/null +++ b/packages/spectrocloud/tests/colon/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.colon = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/colon/fail.md b/packages/spectrocloud/tests/colon/fail.md new file mode 100644 index 0000000..7f00a04 --- /dev/null +++ b/packages/spectrocloud/tests/colon/fail.md @@ -0,0 +1,21 @@ +### Deploying Cluster Profile + +Use the following command to remove all previous configurations: + + ```bash + kubectl delete -f cluster-profile.yaml + ``` + + :::info + + This callout is allowed. + + ::: + +A few things to keep in mind before removing the cluster profile: + +- The cluster profile is removed Palette + +- Active clusters are not affected. + +- Names starting with `project:scope` are reserved for internal use. diff --git a/packages/spectrocloud/tests/colon/pass.md b/packages/spectrocloud/tests/colon/pass.md new file mode 100644 index 0000000..c0d07eb --- /dev/null +++ b/packages/spectrocloud/tests/colon/pass.md @@ -0,0 +1,21 @@ +### Deploying Cluster Profile + +Use the following command to remove all previous configurations. + + ```bash + kubectl delete -f cluster-profile.yaml + ``` + + :::info + + This callout is allowed. + + ::: + +A few things to keep in mind before removing the cluster profile: + +- The cluster profile is removed Palette + +- Active clusters are not affected. + +- Names starting with `project:scope` are reserved for internal use. diff --git a/packages/spectrocloud/tests/condescending/.vale.ini b/packages/spectrocloud/tests/condescending/.vale.ini new file mode 100644 index 0000000..fe583a4 --- /dev/null +++ b/packages/spectrocloud/tests/condescending/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.condescending = YES diff --git a/packages/spectrocloud/tests/condescending/fail.md b/packages/spectrocloud/tests/condescending/fail.md new file mode 100644 index 0000000..4b2479a --- /dev/null +++ b/packages/spectrocloud/tests/condescending/fail.md @@ -0,0 +1,8 @@ +## Information + +The design of the prouct is based on the following principles: + +- Reduce complexity by providing an easy single pane of glass for managing all your clusters. +- Provide a consistent experience across all cloud providers. +- Ease the use of Kubernetes by providing a clear and intuitive user interface. +- Obvious UX patterns and design elements. diff --git a/packages/spectrocloud/tests/condescending/pass.md b/packages/spectrocloud/tests/condescending/pass.md new file mode 100644 index 0000000..0524c7b --- /dev/null +++ b/packages/spectrocloud/tests/condescending/pass.md @@ -0,0 +1,7 @@ +## Information + +The design of the prouct is based on the following principles: + +- Reduce complexity by providing a single pane of glass for managing all your clusters. +- Provide a consistent experience across all cloud providers. +- Ease the use of Kubernetes by providing a clear and intuitive user interface. diff --git a/packages/spectrocloud/tests/direction/.vale.ini b/packages/spectrocloud/tests/direction/.vale.ini new file mode 100644 index 0000000..5ab7260 --- /dev/null +++ b/packages/spectrocloud/tests/direction/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.direction = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/direction/fail.md b/packages/spectrocloud/tests/direction/fail.md new file mode 100644 index 0000000..579b8ce --- /dev/null +++ b/packages/spectrocloud/tests/direction/fail.md @@ -0,0 +1,9 @@ +# Spectro Pack + +The Spectro Pack is used to maintain internal Palette configurations used by the Palette Installer during a deployment. The following list provides an overview of the Spectro Pack: + +- A pack containing immutable configurations used by the Palette Installer. + +- The Spectro Pack is used to maintain internal Palette configurations. + +- As mentioned above, the Spectro Pack is immutable and should not be modified. diff --git a/packages/spectrocloud/tests/direction/pass.md b/packages/spectrocloud/tests/direction/pass.md new file mode 100644 index 0000000..19baee2 --- /dev/null +++ b/packages/spectrocloud/tests/direction/pass.md @@ -0,0 +1,9 @@ +# Spectro Pack + +The Spectro Pack is used to maintain internal Palette configurations used by the Palette Installer during a deployment. The following list provides an overview of the Spectro Pack: + +- A pack containing immutable configurations used by the Palette Installer. + +- The Spectro Pack is used to maintain internal Palette configurations. + +- As mention earlier, the Spectro Pack is immutable and should not be modified. diff --git a/packages/spectrocloud/tests/file-type/.vale.ini b/packages/spectrocloud/tests/file-type/.vale.ini new file mode 100644 index 0000000..5de1d3b --- /dev/null +++ b/packages/spectrocloud/tests/file-type/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.file-type = YES diff --git a/packages/spectrocloud/tests/file-type/fail.md b/packages/spectrocloud/tests/file-type/fail.md new file mode 100644 index 0000000..b8f4d8d --- /dev/null +++ b/packages/spectrocloud/tests/file-type/fail.md @@ -0,0 +1,19 @@ +# Supported Formats + +The following file type are supported by Palette: + +- csv file +- iso file +- json file +- md file +- pdf file +- png file +- py file +- svg file +- tar file +- tf file +- tgz file +- txt file +- yaml file +- ZIP file +- zst file diff --git a/packages/spectrocloud/tests/file-type/pass.md b/packages/spectrocloud/tests/file-type/pass.md new file mode 100644 index 0000000..86f2f52 --- /dev/null +++ b/packages/spectrocloud/tests/file-type/pass.md @@ -0,0 +1,19 @@ +# Supported Formats + +The following file type are supported by Palette: + +- CSV file +- ISO file +- JSON file +- MD file +- PDF file +- PNG file +- PY file +- SVG file +- TAR file +- TF file +- TGZ file +- TXT file +- YAML file +- zip file +- ZST file diff --git a/packages/spectrocloud/tests/future/.vale.ini b/packages/spectrocloud/tests/future/.vale.ini new file mode 100644 index 0000000..6a4075f --- /dev/null +++ b/packages/spectrocloud/tests/future/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.future = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/future/fail.md b/packages/spectrocloud/tests/future/fail.md new file mode 100644 index 0000000..2b58789 --- /dev/null +++ b/packages/spectrocloud/tests/future/fail.md @@ -0,0 +1,9 @@ +# Overview + +In the next release of Palette, the ability to deploy multiple Kubernetes clusters with a single click will be available + +:::info + +This feature will be limited to the Enterprise Edition. VerteX is still under development and will be announced in the future. + +::: diff --git a/packages/spectrocloud/tests/future/pass.md b/packages/spectrocloud/tests/future/pass.md new file mode 100644 index 0000000..8ecc755 --- /dev/null +++ b/packages/spectrocloud/tests/future/pass.md @@ -0,0 +1,3 @@ +# Overview + +The ability to deploy multiple Kubernetes clusters with a single click is not currently available in Palette. End users can achieve similar functionality by using the Spectro Cloud API to automate the deployment of multiple clusters. diff --git a/packages/spectrocloud/tests/gender/.vale.ini b/packages/spectrocloud/tests/gender/.vale.ini new file mode 100644 index 0000000..b13dd6b --- /dev/null +++ b/packages/spectrocloud/tests/gender/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.gender = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/gender/fail.md b/packages/spectrocloud/tests/gender/fail.md new file mode 100644 index 0000000..b46eac4 --- /dev/null +++ b/packages/spectrocloud/tests/gender/fail.md @@ -0,0 +1,9 @@ +## Requirements + +- Ensure users can select the platform version. They may have to request a new version if it is not available. + +- Kubernetes version 1.20.0 or later is required. + +## Usage + +Select the left **Main Menu**. The user, he should ensure there are no errors in the **Platform Version** field. diff --git a/packages/spectrocloud/tests/gender/pass.md b/packages/spectrocloud/tests/gender/pass.md new file mode 100644 index 0000000..08e6b5b --- /dev/null +++ b/packages/spectrocloud/tests/gender/pass.md @@ -0,0 +1,9 @@ +## Requirements + +- Ensure users can select the platform version. They may have to request a new version if it is not available. + +- Kubernetes version 1.20.0 or later is required. + +## Usage + +Select the left **Main Menu**. The user should ensure there are no errors in the **Platform Version** field. diff --git a/packages/spectrocloud/tests/headings-title/.vale.ini b/packages/spectrocloud/tests/headings-title/.vale.ini new file mode 100644 index 0000000..9eacd66 --- /dev/null +++ b/packages/spectrocloud/tests/headings-title/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.headings-title = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/headings-title/fail.md b/packages/spectrocloud/tests/headings-title/fail.md new file mode 100644 index 0000000..6d473de --- /dev/null +++ b/packages/spectrocloud/tests/headings-title/fail.md @@ -0,0 +1,11 @@ +# Palette eXtended Kubernetes (PXK) + +Palette eXtended Kubernetes (PXK) is a Kubernetes distribution that is optimized for Palette. + +### Features + +#### Managing Multiple Clusters + +##### Security + +###### Exceptions diff --git a/packages/spectrocloud/tests/headings-title/pass.md b/packages/spectrocloud/tests/headings-title/pass.md new file mode 100644 index 0000000..1737a53 --- /dev/null +++ b/packages/spectrocloud/tests/headings-title/pass.md @@ -0,0 +1,11 @@ +# Palette eXtended Kubernetes (PXK) + +Palette eXtended Kubernetes (PXK) is a Kubernetes distribution that is optimized for Palette. + +### Features + +#### Multi-Cluster Management + +##### Security + +###### Exceptions diff --git a/packages/spectrocloud/tests/inclusive/.vale.ini b/packages/spectrocloud/tests/inclusive/.vale.ini new file mode 100644 index 0000000..aab07d4 --- /dev/null +++ b/packages/spectrocloud/tests/inclusive/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.inclusive = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/inclusive/fail.md b/packages/spectrocloud/tests/inclusive/fail.md new file mode 100644 index 0000000..08cfcc3 --- /dev/null +++ b/packages/spectrocloud/tests/inclusive/fail.md @@ -0,0 +1,3 @@ +# Cluster Nodes + +Palette manages both the master and worker nodes in a cluster. The master nodes are responsible for managing the worker nodes, and the worker nodes are responsible for handling the workloads. diff --git a/packages/spectrocloud/tests/inclusive/pass.md b/packages/spectrocloud/tests/inclusive/pass.md new file mode 100644 index 0000000..5074902 --- /dev/null +++ b/packages/spectrocloud/tests/inclusive/pass.md @@ -0,0 +1,3 @@ +# Cluster Nodes + +The source code can be found in the master branch of the public repository. diff --git a/packages/spectrocloud/tests/longform/.vale.ini b/packages/spectrocloud/tests/longform/.vale.ini new file mode 100644 index 0000000..14088b0 --- /dev/null +++ b/packages/spectrocloud/tests/longform/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.longform = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/longform/fail.md b/packages/spectrocloud/tests/longform/fail.md new file mode 100644 index 0000000..bfb57b5 --- /dev/null +++ b/packages/spectrocloud/tests/longform/fail.md @@ -0,0 +1,15 @@ +## Debug Steps + +Use the following steps to debug the issue. + +1. Check the logs for any errors. + + ```shell + palette -h work -n + ``` + +2. Check the status of the pods. + + ```shell + kubeclt logs pod-name -n + ``` diff --git a/packages/spectrocloud/tests/longform/pass.md b/packages/spectrocloud/tests/longform/pass.md new file mode 100644 index 0000000..37e19d7 --- /dev/null +++ b/packages/spectrocloud/tests/longform/pass.md @@ -0,0 +1,15 @@ +## Debug Steps + +Use the following steps to debug the issue. + +1. Check the logs for any errors. + +```shell +kubectl logs pod-name --namespace namespace +``` + +2. Check the status of the pods. + + ```shell + kubeclt logs pod-name --namespace + ``` diff --git a/packages/spectrocloud/tests/oxford-comma/.vale.ini b/packages/spectrocloud/tests/oxford-comma/.vale.ini new file mode 100644 index 0000000..55c3145 --- /dev/null +++ b/packages/spectrocloud/tests/oxford-comma/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.oxford-comma = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/oxford-comma/fail.md b/packages/spectrocloud/tests/oxford-comma/fail.md new file mode 100644 index 0000000..1175761 --- /dev/null +++ b/packages/spectrocloud/tests/oxford-comma/fail.md @@ -0,0 +1,5 @@ +## Overview + +The project requires collaboration among engineers, designers and managers to succeed. + +From the left Main Menu, select Profiles and then select Add Cluster Profile. diff --git a/packages/spectrocloud/tests/oxford-comma/pass.md b/packages/spectrocloud/tests/oxford-comma/pass.md new file mode 100644 index 0000000..0342ac9 --- /dev/null +++ b/packages/spectrocloud/tests/oxford-comma/pass.md @@ -0,0 +1,5 @@ +## Overview + +With a unique approach to managing multiple clusters, Palette gives IT teams complete control, visibility, and production-scale efficiencies. + +From the left Main Menu, select Profiles, and then select Add Cluster Profile. diff --git a/packages/spectrocloud/tests/plural-parantheses/.vale.ini b/packages/spectrocloud/tests/plural-parantheses/.vale.ini new file mode 100644 index 0000000..a24e4ac --- /dev/null +++ b/packages/spectrocloud/tests/plural-parantheses/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.plural-parantheses = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/plural-parantheses/fail.md b/packages/spectrocloud/tests/plural-parantheses/fail.md new file mode 100644 index 0000000..689a44a --- /dev/null +++ b/packages/spectrocloud/tests/plural-parantheses/fail.md @@ -0,0 +1,13 @@ +## Parameters + +The following parameter(s) are supported. + +:::info + +The cluster node(s) will automatically scale down. + +::: + +- `name` (string, required): The name of the user. + +- `age` (number, required): The age of the user. diff --git a/packages/spectrocloud/tests/plural-parantheses/pass.md b/packages/spectrocloud/tests/plural-parantheses/pass.md new file mode 100644 index 0000000..53cd7cd --- /dev/null +++ b/packages/spectrocloud/tests/plural-parantheses/pass.md @@ -0,0 +1,7 @@ +## Parameters + +The following parameters are supported: + +- `name` (string, required): The name of the user. + +- `age` (number, required): The age of the user. diff --git a/packages/spectrocloud/tests/product-ui/.vale.ini b/packages/spectrocloud/tests/product-ui/.vale.ini new file mode 100644 index 0000000..8bf705d --- /dev/null +++ b/packages/spectrocloud/tests/product-ui/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.product-ui = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/product-ui/fail.md b/packages/spectrocloud/tests/product-ui/fail.md new file mode 100644 index 0000000..aee8785 --- /dev/null +++ b/packages/spectrocloud/tests/product-ui/fail.md @@ -0,0 +1,14 @@ +# Enable Feature + +Use the following steps to enable the specical feature. + +1. Log in to Palette. + +2. Navigate to the nav bar and select **Features**. + +3. Select the three dots and click on "Enable Feature". + + :::note + + The dropdown menu on the side also contains more options. + ::: diff --git a/packages/spectrocloud/tests/product-ui/pass.md b/packages/spectrocloud/tests/product-ui/pass.md new file mode 100644 index 0000000..6599b77 --- /dev/null +++ b/packages/spectrocloud/tests/product-ui/pass.md @@ -0,0 +1,14 @@ +# Enable Feature + +Use the following steps to enable the specical feature. + +1. Log in to Palette. + +2. Navigate to the left **Main Menu** and select **Features**. + +3. Select the **three-dots Menu** and click on "Enable Feature". + + :::note + + The **drop-down Menu** on the side also contains more options. + ::: diff --git a/packages/spectrocloud/tests/we/.vale.ini b/packages/spectrocloud/tests/we/.vale.ini new file mode 100644 index 0000000..db64458 --- /dev/null +++ b/packages/spectrocloud/tests/we/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.we = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/we/fail.md b/packages/spectrocloud/tests/we/fail.md new file mode 100644 index 0000000..0a6f68d --- /dev/null +++ b/packages/spectrocloud/tests/we/fail.md @@ -0,0 +1,21 @@ +# Debug Steps + +Let's dive into the debugging steps to resolve the issue. + +:::note + +Before you begin, take note of how us and other orgs use the kubectl tool. + +::: + +1. We recommend clearing the cache before you begin. + + ```shell + kubectl cache clear + ``` + + :::tip + + We can also use the `kubectl clear --cache` command. + + ::: diff --git a/packages/spectrocloud/tests/we/pass.md b/packages/spectrocloud/tests/we/pass.md new file mode 100644 index 0000000..d2c687a --- /dev/null +++ b/packages/spectrocloud/tests/we/pass.md @@ -0,0 +1,15 @@ +# Debug Steps + +Use the following steps to resolve the issue. + +:::note + +We use kubectl in a distinct way. Make sure you understand the differences by reviewing the longform flags. + +::: + +1. We recommend clearing the cache before you begin. + + ```shell + kubectl cache clear + ``` diff --git a/scripts/check_rule.sh b/scripts/check_rule.sh new file mode 100755 index 0000000..da1eb6c --- /dev/null +++ b/scripts/check_rule.sh @@ -0,0 +1,144 @@ +#!/bin/bash +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +set -e + + +failed_tests=0 + +# Function to get the last directory name from a given path. This is used to get the rule name. +get_last_directory_name() { + dir_path=$1 + base_name=$(basename "$dir_path") + first_char=$(echo "$base_name" | cut -c1 | tr '[:lower:]' '[:upper:]') + rest_chars=$(echo "$base_name" | cut -c2-) + capitalized_name="${first_char}${rest_chars}" + echo "$capitalized_name" +} +# This function extracts the first folder name (package name) from a given path. +get_package_name() { + dir_path=$1 + package_name=$(basename "$(dirname "$(dirname "$dir_path")")") + echo "$package_name" +} + + +# This function checks the pass conditions for the Vale rule. A file with the name pass.md is expected to be present. +# The function takes one argument which is the base directory +# The expected folder structure is base_directory/.vale.ini and base_directory/pass.md +# If any error is found, the function will exit with status code 1 +check_pass_conditions() { + base_directory=$1 + config_file="$base_directory/.vale.ini" + pass_md_file="$base_directory/pass.md" + rule_name=$(get_last_directory_name "$base_directory") + package_name=$(get_package_name "$base_directory") + + # Check if the directory contains a file named pass.md + if [ ! -f "$pass_md_file" ]; then + echo "Error: $base_directory does not contain a file named pass.md" + exit 1 + fi + + # Check if the .vale.ini configuration file exists + if [ ! -f "$config_file" ]; then + echo "Error: $base_directory does not contain a file named .vale.ini" + exit 1 + fi + # echo "vale --config=$config_file --no-exit --output=line $pass_md_file" + RESULT=$(vale --config="$config_file" --no-exit --output=line "$pass_md_file" | wc -l) + # debug=$(vale --config="$config_file" --output=line "$pass_md_file") + # echo "Debug: $debug" + # cat $pass_md_file + # cat $config_file + # echo "" + + if [ "$RESULT" -ne 0 ]; then + echo "$package_name/$rule_name fail condition test - ❌" + log=$(vale --config="$config_file" --output=line "$pass_md_file") + echo "Debug: $log" + failed_tests=$((failed_tests + 1)) + return 1 + fi + + echo "$package_name/$rule_name pass condition test - ✅" +} + + +# This function checks the fail conditions for the Vale rule. A file with the name fail.md is expected to be present. +# The function takes one argument which is the base directory +# The expected folder structure is base_directory/.vale.ini and base_directory/fail.md +# If any error is found, the function will exit with status code 1 +check_fail_conditions() { + base_directory=$1 + config_file="$base_directory/.vale.ini" + fail_md_file="$base_directory/fail.md" + rule_name=$(get_last_directory_name "$base_directory") + package_name=$(get_package_name "$base_directory") + + # Check if the directory contains a file named fail.md + if [ ! -f "$fail_md_file" ]; then + echo "Error: $base_directory does not contain a file named pass.md" + exit 1 + fi + + # Check if the .vale.ini configuration file exists + if [ ! -f "$config_file" ]; then + echo "Error: $base_directory does not contain a file named .vale.ini" + exit 1 + fi + + + RESULT=$(vale --config="$config_file" --no-exit --output=line "$fail_md_file" | wc -l) + + if [ -z $RESULT ]; then + echo "$package_name/$rule_name fail condition test - ❌" + log=$(vale --config="$config_file" --output=line "$fail_md_file") + echo "Debug: $log" + failed_tests=$((failed_tests + 1)) + return 1 + fi + echo "$package_name/$rule_name fail condition test - ✅" +} + + +# This function traverses the base directory and checks the pass and fail conditions for the Vale rules. +traverse_and_check() { + base_directory=$1 + + # Traverse the packages directory and look one level down + for package_dir in "$base_directory"/*; do + if [ -d "$package_dir/tests" ]; then + echo "Checking Vale rules for package: $package_dir" + + + # Walk the tests directory for sub-directories + echo "" + for test_subdir in "$package_dir/tests"/*; do + if [ -d "$test_subdir" ]; then + check_pass_conditions "$test_subdir" || true + check_fail_conditions "$test_subdir" || true + fi + done + fi + done +} + +# Define the base directory to check (example usage) +BASE_DIRECTORY=$1 +echo "Starting the Vale rule test suit ..." +echo "" +traverse_and_check "$BASE_DIRECTORY" + + +# Output the final number of failed tests +if [ "$failed_tests" -ne 0 ]; then + echo "" + echo "❌ Total failed tests: $failed_tests " + exit 1 +fi + +echo "" +echo "All Vale rules checked successfully without any errors 🎉" +exit 0 diff --git a/scripts/create_zip.sh b/scripts/create_zip.sh index 094ab99..8a601e7 100755 --- a/scripts/create_zip.sh +++ b/scripts/create_zip.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright (c) Spectro Cloud # SPDX-License-Identifier: Apache-2.0 @@ -19,9 +19,11 @@ copy_content() { if [ "$1" = "spectrocloud" ]; then echo "Copying content for spectrocloud pkg" cp -R packages/spectrocloud/ workbench/spectrocloud + remove_tests "workbench/spectrocloud" elif [ "$1" = "spectrocloud-docs-internal" ]; then echo "Copying content for spectrocloud-docs-internal pkg" cp -R packages/spectrocloud-docs-internal workbench/spectrocloud-docs-internal + remove_tests "workbench/spectrocloud-docs-internal" fi } @@ -47,6 +49,14 @@ zip_files() { cd .. } +# Function to remove all tests folders from the target directory +# The function takes one argument which is the target directory +remove_tests() { + target_dir=$1 + echo "Removing the tests folder from $target_dir" + find "$target_dir" -type d -name tests -exec rm -rf {} + +} + # Function to check and remove existing zip files # The function takes one argument. Allowed values are "spectrocloud" and "spectrocloud-docs-internal" # The function removes the existing zip files if present diff --git a/scripts/missing_tests.sh b/scripts/missing_tests.sh new file mode 100755 index 0000000..8270840 --- /dev/null +++ b/scripts/missing_tests.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# Base directory (change as needed) +BASE_DIR=$1 + +# Required test files +REQUIRED_FILES=(".vale.ini" "pass.md" "fail.md") + +# Counter for failed tests +failed_tests=0 + +# Function to get the rule name from the rule file path. If the file does not end with .yaml, it will return an error message. +get_rule_name() { + local rule_file="$1" + if [[ "$rule_file" == *.yaml ]]; then + echo "" + echo "Error: The rule $rule_file ends with .yaml. Vale requires .yml instead. ❌" + echo "" + else + local rule_name=$(basename "$rule_file" .yml) + echo "$rule_name" + fi +} + +# Function to check if test files exist +check_test_files() { + local test_dir="$1" + local package_name="$2" + local rule_name="$3" + local all_files_exist=true + local missing_files=() + + for file in "${REQUIRED_FILES[@]}"; do + if [[ ! -f "$test_dir/$file" ]]; then + all_files_exist=false + missing_files+=("$file") + fi + done + + if [[ "$all_files_exist" == false ]]; then + ((failed_tests++)) + echo "$package_name/$rule_name missing required files: ❌" + for file in "${missing_files[@]}"; do + echo " - $file" + done + fi + +} + +check_yaml_extension() { + local file="$1" + if [[ "$file" == *.yaml ]]; then + echo "The file ends with .yaml" + else + echo "The file does not end with .yaml" + fi +} + +# Function to traverse the directory structure +traverse_directories() { + for package_dir in "$BASE_DIR"/*; do + echo "" + if [[ -d "$package_dir/styles" ]]; then + local package_name=$(basename "$package_dir") + for rule_file in "$package_dir/styles"/*/*.yml "$package_dir/styles"/*/*.yaml; do + if [[ -f "$rule_file" ]]; then + local rule_name=$(get_rule_name "$rule_file") + local test_dir="$package_dir/tests/$rule_name" + local result="" + if [[ -d "$test_dir" ]]; then + check_test_files "$test_dir" "$package_name" "$rule_name" + else + echo "$package_name/$rule_name missing test directory - ❌" + ((failed_tests++)) + fi + fi + done + fi + done +} + +# Execute the traversal function +traverse_directories "$BASE_DIR" +echo "" + +# Exit with the appropriate status code +if [[ "$failed_tests" -ne 0 ]]; then + echo "❌ Total rules missing tests: $failed_tests " + exit 1 +fi + +echo "All Vale rules have a set of test files 🎉" +exit 0