From b29d66d138a5952ccef2d294a7b8f5d9b2ee164e Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Wed, 26 Jul 2023 16:49:53 +0100 Subject: [PATCH 01/11] added ascidoctorconfig and vale.ini file to experiement with some settings --- .asciidoctorconfig | 119 +++++++++++++++++++++++++++++++++++++++++++++ .vale.ini | 21 ++++++++ 2 files changed, 140 insertions(+) create mode 100644 .asciidoctorconfig create mode 100644 .vale.ini diff --git a/.asciidoctorconfig b/.asciidoctorconfig new file mode 100644 index 000000000..595f3d881 --- /dev/null +++ b/.asciidoctorconfig @@ -0,0 +1,119 @@ +:data-uri: +:icons: +:experimental: + +//:toc: macro +//:toc-title: +:imagesdir: static/images +:includedir: modules +:prewrap!: +//Solution name +:rh-solution-name: Validated Patterns +:solution-name-upstream: Hybrid Cloud Patterns +//:solution-version: Update later when we start using versioned releases +//Patterns +:aeg-pattern: Ansible Edge GitOps pattern +:aeg: Ansible Edge GitOps +:ie-pattern: Industrial Edge pattern +:ie: Industrial Edge +:mcg-pattern: Multicloud GitOps pattern +:mcg: multicloud GitOps +:med-pattern: Medical Diagnosis pattern +:med: medical diagnosis +:multi-devsec-pattern: Multi-cluster DevSecOps pattern +:multi-devsec: multi-cluster DevSecOps +//Operators +:validated-patterns-op: Validated Patterns Operator +:grafana-op: Grafana Operator +:eso-op: External Secrets Operator +//OpenShift +:rh-ocp: Red Hat OpenShift Container Platform +:ocp: OpenShift Container Platform +:ocp-version: 4.12 +:ocp-registry: OpenShift image registry +//Single node and 3-node OpenShift +:sno: single-node OpenShift +:sno-first: Single-node OpenShift +:3no: three-node OpenShift +:3no-first: Three-node OpenShift +//OpenShift Platform Plus +:rh-opp: Red Hat OpenShift Platform Plus +:opp: OpenShift Platform Plus +//openshift virtualization (cnv) +:VirtProductName: OpenShift Virtualization +//Ansible: +:rh-ansible: Red Hat Ansible Automation Platform +:ansible: Ansible Automation Platform +//GitOps +:rh-gitops: Red Hat OpenShift GitOps +:rh-gitops-short: OpenShift GitOps +//CoreOS +:op-system-first: Red Hat Enterprise Linux CoreOS (RHCOS) +:op-system-short: RHCOS +:op-system-lowercase: rhcos +//RHEL +:rhel-first: Red Hat Enterprise Linux (RHEL) +:rhel-short: RHEL +//:op-system-version: 8.x +//Console icons +:rh-app-icon: image:red-hat-applications-menu-icon.jpg[title="Red Hat applications"] +:kebab: image:kebab.png[title="Options menu"] +:rh-openstack-first: Red Hat OpenStack Platform (RHOSP) +:openstack-short: RHOSP +//Assisted Installer +:ai-full: Assisted Installer +:ai-version: 2.3 +//Cluster Manager +:cluster-manager-first: Red Hat OpenShift Cluster Manager +:cluster-manager: OpenShift Cluster Manager +:cluster-manager-url: link:https://console.redhat.com/openshift[OpenShift Cluster Manager Hybrid Cloud Console] +:cluster-manager-url-pull: link:https://console.redhat.com/openshift/install/pull-secret[pull secret from the Red Hat OpenShift Cluster Manager] +:insights-advisor-url: link:https://console.redhat.com/openshift/insights/advisor/[Insights Advisor] +:hybrid-console-first: Red Hat Hybrid Cloud Console +:hybrid-console: Hybrid Cloud Console +//ACM +:rh-rhacm-first: Red Hat Advanced Cluster Management (RHACM) +:rh-rhacm: RHACM +//:rh-rhacm-version: 2.5 +//ACS +:rh-acs-first: Red Hat Advanced Cluster Security for Kubernetes + +:cert-manager-operator: cert-manager Operator for Red Hat OpenShift +:secondary-scheduler-operator-full: Secondary Scheduler Operator for Red Hat OpenShift +:secondary-scheduler-operator: Secondary Scheduler Operator +:rh-virtualization-first: Red Hat Virtualization (RHV) +:rh-virtualization: RHV +:rh-virtualization-engine-name: Manager +//gitops +:gitops-title: Red Hat OpenShift GitOps +:gitops-shortname: GitOps +:gitops-ver: 1.1 +//pipelines +:rh-pipelines-first: Red Hat OpenShift Pipelines +:pipelines-short: OpenShift Pipelines +:pipelines-ver: pipelines-1.9 +:tekton-chains: Tekton Chains +:tekton-hub: Tekton Hub +:pac: Pipelines as Code +//AMQ +:rh-amq-first: Red Hat AMQ +:rh-amq-short: RHAMQ +//Runtimes +:rh-runtime: Red Hat Runtimes +//Data foundation +:rh-ocp-data-first: Red Hat OpenShift Data Foundation +:rh-ocp-data-short: OpenShift Data Foundation +//Serverless +:rh-serverless-first: Red Hat OpenShift Serverless +:serverless-short: OpenShift Serverless +:ServerlessOperatorName: OpenShift Serverless Operator +:FunctionsProductName: OpenShift Serverless Functions +//Quay +:rh-quay: Red Hat Quay +:quay-short: Quay +// Red Hat Quay Container Security Operator +:rhq-cso: Red Hat Quay Container Security Operator +//Cloud platforms +:AWS: Amazon Web Services (AWS) +:GCP: Google Cloud Platform (GCP) +:Azure: Microsoft Azure \ No newline at end of file diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 000000000..815edea56 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,21 @@ +StylesPath = .vale/styles + +MinAlertLevel = suggestion + +Packages = RedHat, AsciiDoc + +IgnoredScopes = code, tt, img, url, a, body.id + +SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock, literalblock + +# Ignore files in dirs starting with `.` to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files +[[!.]*.adoc] +BasedOnStyles = RedHat, AsciiDoc + +# Optional: pass doc attributes to asciidoctor before linting +#[asciidoctor] +#openshift-enterprise = YES + +# Disabling rules (NO) +RedHat.ReleaseNotes = NO + From ee43775203133240a23edf3a409b15595dc948fb Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Wed, 20 Sep 2023 23:13:29 +0100 Subject: [PATCH 02/11] added a module mount config --- .asciidoctorconfig | 5 ++--- config.yaml | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.asciidoctorconfig b/.asciidoctorconfig index 595f3d881..2423046f4 100644 --- a/.asciidoctorconfig +++ b/.asciidoctorconfig @@ -1,11 +1,10 @@ -:data-uri: :icons: :experimental: //:toc: macro //:toc-title: -:imagesdir: static/images -:includedir: modules +:imagesdir: /static/images +:includedir: /modules :prewrap!: //Solution name :rh-solution-name: Validated Patterns diff --git a/config.yaml b/config.yaml index e86cc6697..a089e9ce2 100644 --- a/config.yaml +++ b/config.yaml @@ -45,3 +45,17 @@ menus: - name: Workshop url: https://play.validatedpatterns.io weight: 25 +module: + mounts: + - source: archetypes + target: archetypes + - source: content + target: content + - source: static + target: static + - source: layouts + target: layouts + - source: assets + target: assets + - source: modules + target: content From 0495f59e5d0a22fd0edab8ac151465d42888c66b Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Sun, 1 Oct 2023 11:56:41 +0100 Subject: [PATCH 03/11] added hugo env to config-yaml --- config.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index a089e9ce2..d9d540f57 100644 --- a/config.yaml +++ b/config.yaml @@ -11,6 +11,9 @@ security: exec: allow: ["^dart-sass-embedded$", "^go$", "^npx$", "^postcss$", "^asciidoctor$"] osEnv: (?i)^(GEM_PATH)$ + funcs: + getenv: + - ^HUGO_ markup: asciidocExt: @@ -55,7 +58,5 @@ module: target: static - source: layouts target: layouts - - source: assets - target: assets - source: modules target: content From 8d5de7fdf3108aaa1f6f2f7082a10b6efb0f5d33 Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Tue, 21 Nov 2023 23:12:57 +0000 Subject: [PATCH 04/11] adding CODEOWNERS and modiles/.vale.ini files --- .vale.ini | 12 +++++++----- CODEOWNERS.txt | 6 ++++++ modules/vale.ini | 12 ++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 CODEOWNERS.txt create mode 100644 modules/vale.ini diff --git a/.vale.ini b/.vale.ini index 815edea56..80ec531d8 100644 --- a/.vale.ini +++ b/.vale.ini @@ -4,17 +4,19 @@ MinAlertLevel = suggestion Packages = RedHat, AsciiDoc -IgnoredScopes = code, tt, img, url, a, body.id +Vocab = ValidatedPatternsDocs -SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock, literalblock +#IgnoredScopes = code, tt, img, url, a, body.id + +#SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock, literalblock # Ignore files in dirs starting with `.` to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files [[!.]*.adoc] BasedOnStyles = RedHat, AsciiDoc -# Optional: pass doc attributes to asciidoctor before linting -#[asciidoctor] -#openshift-enterprise = YES +# Use local ValidatedPatternsDocs Vocab terms +Vale.Terms = YES +Vale.Avoid = YES # Disabling rules (NO) RedHat.ReleaseNotes = NO diff --git a/CODEOWNERS.txt b/CODEOWNERS.txt new file mode 100644 index 000000000..d57c4c2be --- /dev/null +++ b/CODEOWNERS.txt @@ -0,0 +1,6 @@ +# Set the @validatedpatterns/docs team to own the entire repo +# we need this so that we can request and require PR reviews before merging. +* @validatedpatterns/docs + +# Additional (more granular) ownership rules: + diff --git a/modules/vale.ini b/modules/vale.ini new file mode 100644 index 000000000..08d43661d --- /dev/null +++ b/modules/vale.ini @@ -0,0 +1,12 @@ +StylesPath = ../.vale/styles + +MinAlertLevel = suggestion + +Vocab = ValidatedPatternsDocs + +[[!.]*.adoc] +BasedOnStyles = AsciiDoc, RedHat + +# Use local ValidatedPatternsDocs Vocab terms +Vale.Terms = YES +Vale.Avoid = YES From c9ed30f22ca1fda6b4150b01727bd625e43a3ef7 Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Tue, 21 Nov 2023 23:32:27 +0000 Subject: [PATCH 05/11] update dthe gitignore file and added a VPVOCAB option for Vale --- .gitignore | 5 ++--- .../Vocab/ValidatedPatternsDocs/accept.txt | 20 +++++++++++++++++++ .../Vocab/ValidatedPatternsDocs/reject.txt | 15 ++++++++++++++ 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .vale/styles/Vocab/ValidatedPatternsDocs/accept.txt create mode 100644 .vale/styles/Vocab/ValidatedPatternsDocs/reject.txt diff --git a/.gitignore b/.gitignore index 3693a51eb..918bf2c8b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,5 @@ tmp/ Gemfile.lock .vscode .idea -.vale -modules/.vale.ini -.vale.ini \ No newline at end of file +.vale/styles/AsciiDoc +.vale/styles/RedHat diff --git a/.vale/styles/Vocab/ValidatedPatternsDocs/accept.txt b/.vale/styles/Vocab/ValidatedPatternsDocs/accept.txt new file mode 100644 index 000000000..5ef46f477 --- /dev/null +++ b/.vale/styles/Vocab/ValidatedPatternsDocs/accept.txt @@ -0,0 +1,20 @@ +# Regex terms added to accept.txt are ignored by the Vale linter and override RedHat Vale rules. +# Add terms that have a corresponding incorrectly capitalized form to reject.txt. + +[Ff]ronthaul +[Mm]idhaul +[Pp]assthrough +[Rr]ealtime +Assisted Installer +Control Plane Machine Set Operator +custom resource +custom resources +Mbps +MetalLB +Operator +Operators +[Pp]reinstall +[Pp]ostinstall +NICs? +Mellanox +VFs? diff --git a/.vale/styles/Vocab/ValidatedPatternsDocs/reject.txt b/.vale/styles/Vocab/ValidatedPatternsDocs/reject.txt new file mode 100644 index 000000000..5a9d2b4c2 --- /dev/null +++ b/.vale/styles/Vocab/ValidatedPatternsDocs/reject.txt @@ -0,0 +1,15 @@ +# Regex terms added to reject.txt are highlighted as errors by the Vale linter and override RedHat Vale rules. +# Add terms that have a corresponding correctly capitalized form to accept.txt. + +[Dd]eployment [Cc]onfigs? +[Dd]eployment [Cc]onfigurations? +[Oo]peratorize +[Ss]ingle [Nn]ode OpenShift +[Tt]hree [Nn]ode OpenShift +AI +configuration maps? +MachineSets +machinesets? +minions? +operators? +SNO \ No newline at end of file From 8a1839d1ea587af4ef307950c54bc5bc24b9fa73 Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Wed, 22 Nov 2023 00:10:26 +0000 Subject: [PATCH 06/11] added a vale action to the workflow --- .github/workflows/htmltest.yml | 2 ++ .github/workflows/vale-action.yml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/vale-action.yml diff --git a/.github/workflows/htmltest.yml b/.github/workflows/htmltest.yml index 864dcd746..7684e6e98 100644 --- a/.github/workflows/htmltest.yml +++ b/.github/workflows/htmltest.yml @@ -35,6 +35,8 @@ jobs: ls -lR public/ - name: Run htmltest + # Don't fail the build on broken links + #continue-on-error: true uses: wjdp/htmltest-action@master with: config: .htmltest.yml diff --git a/.github/workflows/vale-action.yml b/.github/workflows/vale-action.yml new file mode 100644 index 000000000..7e47dc4f9 --- /dev/null +++ b/.github/workflows/vale-action.yml @@ -0,0 +1,18 @@ +name: Lint with Vale +on: [pull_request] + +jobs: + vale: + name: Vale linter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: errata-ai/vale-action@reviewdog + with: + filter_mode: added + vale_flags: "--no-exit --minAlertLevel=error --glob=*.adoc" + reporter: github-pr-review + fail_on_error: false + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + REVIEWDOG_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file From b0816779096fe3b777ab2e9397ebceaebff93954 Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Wed, 22 Nov 2023 00:27:42 +0000 Subject: [PATCH 07/11] chnaging alert level to suggestion to test the vale action on PR --- .github/workflows/vale-action.yml | 2 +- content/contribute/creating-a-pattern.adoc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/vale-action.yml b/.github/workflows/vale-action.yml index 7e47dc4f9..45045a66c 100644 --- a/.github/workflows/vale-action.yml +++ b/.github/workflows/vale-action.yml @@ -10,7 +10,7 @@ jobs: - uses: errata-ai/vale-action@reviewdog with: filter_mode: added - vale_flags: "--no-exit --minAlertLevel=error --glob=*.adoc" + vale_flags: "--no-exit --minAlertLevel=suggestion --glob=*.adoc" reporter: github-pr-review fail_on_error: false env: diff --git a/content/contribute/creating-a-pattern.adoc b/content/contribute/creating-a-pattern.adoc index 03c7e9a40..c12b0c41c 100644 --- a/content/contribute/creating-a-pattern.adoc +++ b/content/contribute/creating-a-pattern.adoc @@ -8,9 +8,10 @@ aliases: /creating-a-pattern/ :toc: :imagesdir: /images :_content-type: ASSEMBLY + include::modules/comm-attributes.adoc[] -The validated patterns community has relied on existing architectures that have been successfully deployed in an enterprise. The architecture itself is a best practice in assembling technologies and projects to provide a working solution. How that solution is deployed and managed is a different matter. It may have evolved over time and may have grown in its deployment such that ongoing maintenance is not sustainable. +The validated patterns community has relied on existing architectures that have been successfully deployed in an enterprise. The architecture itself is a best practice in assembling technologies and projects to provide a working solution. How that solution is deployed and managed is a different matter. It might have evolved over time and may have grown in its deployment such that ongoing maintenance is not sustainable. The validated patterns framework is much more of a best practice of structuring the various configuration assets and integrating with GitOps and DevOps tools. From 9dfa9de9338c6a69fb7cc3dd306b46ef604c2031 Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Thu, 23 Nov 2023 12:24:51 +0000 Subject: [PATCH 08/11] added some more envOS variables --- config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index d9d540f57..051eeae60 100644 --- a/config.yaml +++ b/config.yaml @@ -10,7 +10,7 @@ params: security: exec: allow: ["^dart-sass-embedded$", "^go$", "^npx$", "^postcss$", "^asciidoctor$"] - osEnv: (?i)^(GEM_PATH)$ + osEnv: (?i)^(GEM_PATH|PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|RUBYLIB)$ funcs: getenv: - ^HUGO_ From dd1d02c903f8aca9b72e69f642d63040a21cad1d Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Thu, 23 Nov 2023 12:33:41 +0000 Subject: [PATCH 09/11] using attributes with link works fine --- modules/mcg-about-multicloud-gitops.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/mcg-about-multicloud-gitops.adoc b/modules/mcg-about-multicloud-gitops.adoc index 466238364..97d2ddebf 100644 --- a/modules/mcg-about-multicloud-gitops.adoc +++ b/modules/mcg-about-multicloud-gitops.adoc @@ -45,19 +45,19 @@ image::multicloud-gitops/logical-diagram.png[Logical Architecture] The following technologies are used in this solution: -https://www.redhat.com/en/technologies/cloud-computing/openshift/try-it[Red Hat OpenShift Platform]:: +https://www.redhat.com/en/technologies/cloud-computing/openshift/try-it[{rh-ocp}]:: An enterprise-ready Kubernetes container platform built for an open hybrid cloud strategy. It provides a consistent application platform to manage hybrid cloud, public cloud, and edge deployments. It delivers a complete application platform for both traditional and cloud-native applications, allowing them to run anywhere. OpenShift has a pre-configured, pre-installed, and self-updating monitoring stack that provides monitoring for core platform components. It also enables the use of external secret management systems, for example, HashiCorp Vault in this case, to securely add secrets into the OpenShift platform. -https://www.redhat.com/en/technologies/cloud-computing/openshift/try-it[Red Hat OpenShift GitOps]:: +https://www.redhat.com/en/technologies/cloud-computing/openshift/try-it[{rh-gitops}]:: A declarative application continuous delivery tool for Kubernetes based on the ArgoCD project. Application definitions, configurations, and environments are declarative and version controlled in Git. It can automatically push the desired application state into a cluster, quickly find out if the application state is in sync with the desired state, and manage applications in multi-cluster environments. -https://www.redhat.com/en/technologies/management/advanced-cluster-management[Red Hat Advanced Cluster Management for Kubernetes]:: +https://www.redhat.com/en/technologies/management/advanced-cluster-management[{rh-rhacm-first}]:: Controls clusters and applications from a single console, with built-in security policies. Extends the value of Red Hat OpenShift by deploying apps, managing multiple clusters, and enforcing policies across multiple clusters at scale. -https://www.redhat.com/en/technologies/management/ansible[Red Hat Ansible Automation Platform]:: +https://www.redhat.com/en/technologies/management/ansible[{rh-ansible}]:: Provides an enterprise framework for building and operating IT automation at scale across hybrid clouds including edge deployments. It enables users across an organization to create, share, and manage automation, from development and operations to security and network teams. -Hashicorp Vault:: +{hashicorp-vault}:: Provides a secure centralized store for dynamic infrastructure and applications across clusters, including over low-trust networks between clouds and data centers. This solution also uses a variety of _observability tools_ including the Prometheus monitoring and Grafana dashboard that are integrated with OpenShift as well as components of the Observatorium meta-project which includes Thanos and the Loki API. From a2dfecc767e332ba53539477077b89c2d6b24f5f Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Mon, 27 Nov 2023 15:39:46 +0000 Subject: [PATCH 10/11] reverted the Vale min alert to error and added a job to test a html link cehcker --- .github/workflows/htmltest.yml | 42 --------------------- .github/workflows/internal-links-action.yml | 13 +++++++ .github/workflows/preview-message.yml | 2 +- .github/workflows/vale-action.yml | 2 +- .gitignore | 2 + 5 files changed, 17 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/htmltest.yml create mode 100644 .github/workflows/internal-links-action.yml diff --git a/.github/workflows/htmltest.yml b/.github/workflows/htmltest.yml deleted file mode 100644 index 7684e6e98..000000000 --- a/.github/workflows/htmltest.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: HtmlTest Action -on: - schedule: - - cron: '23 17 * * *' -jobs: - build: - name: Htmltest - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true # Fetch Hugo themes (true OR recursive) - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.7' - - - name: Install build dependencies - run: | - gem install asciidoctor rouge - - - name: Setup Hugo - uses: peaceiris/actions-hugo@v3 - with: - hugo-version: '0.133.1' - extended: true - - - name: Build - run: | - hugo --minify - - - name: Display the public/ folders - run: | - ls -lR public/ - - - name: Run htmltest - # Don't fail the build on broken links - #continue-on-error: true - uses: wjdp/htmltest-action@master - with: - config: .htmltest.yml diff --git a/.github/workflows/internal-links-action.yml b/.github/workflows/internal-links-action.yml new file mode 100644 index 000000000..9b3963082 --- /dev/null +++ b/.github/workflows/internal-links-action.yml @@ -0,0 +1,13 @@ +name: Check internal links +on: push +jobs: + check_html_links_job: + name: A job to test only internal links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: check-html-links-action step + id: check-links + uses: modernweb-dev/check-html-links-action@v1 + with: + doc-folder: public/ \ No newline at end of file diff --git a/.github/workflows/preview-message.yml b/.github/workflows/preview-message.yml index f1e8f772b..60419932e 100644 --- a/.github/workflows/preview-message.yml +++ b/.github/workflows/preview-message.yml @@ -16,5 +16,5 @@ jobs: This is an automated message: You can preview this docs PR at http://${{ github.event.number }}.docs-pr.validatedpatterns.io - Note that they get generated every five minutes, so please wait a bit. + Note that the preview gets generated every five minutes, so please wait a bit. repo-token: ${{ secrets.DOCS_PR_TOKEN }} diff --git a/.github/workflows/vale-action.yml b/.github/workflows/vale-action.yml index 45045a66c..7e47dc4f9 100644 --- a/.github/workflows/vale-action.yml +++ b/.github/workflows/vale-action.yml @@ -10,7 +10,7 @@ jobs: - uses: errata-ai/vale-action@reviewdog with: filter_mode: added - vale_flags: "--no-exit --minAlertLevel=suggestion --glob=*.adoc" + vale_flags: "--no-exit --minAlertLevel=error --glob=*.adoc" reporter: github-pr-review fail_on_error: false env: diff --git a/.gitignore b/.gitignore index 918bf2c8b..f3f22cf37 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ Gemfile.lock .idea .vale/styles/AsciiDoc .vale/styles/RedHat +.htmltest.yml +.github/workflows/htmltest.yml \ No newline at end of file From 4f3dff16206d1fb20b2404defd1ec73cc7828afa Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Wed, 2 Jul 2025 15:13:51 +0100 Subject: [PATCH 11/11] resuming tests for vale checks on PRs --- .github/workflows/vale-action.yml | 56 ++++++++++++++++++++++++------- .vale.ini | 4 +-- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/.github/workflows/vale-action.yml b/.github/workflows/vale-action.yml index 7e47dc4f9..d2479b1af 100644 --- a/.github/workflows/vale-action.yml +++ b/.github/workflows/vale-action.yml @@ -1,18 +1,50 @@ -name: Lint with Vale -on: [pull_request] +name: Vale Linting + +on: + pull_request: + types: [opened, synchronize, reopened] # Trigger on PR open, new commits, or reopening jobs: vale: - name: Vale linter + name: Lint documentation with Vale runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v3 - - uses: errata-ai/vale-action@reviewdog + - uses: actions/checkout@v4 + - uses: errata-ai/vale-action@v2.1.1 + + # Optional: Install Asciidoctor if you're linting AsciiDoc files + - name: Install Asciidoctor + run: sudo apt-get install -y asciidoctor + + - name: Run Vale with Reviewdog + uses: errata-ai/vale-action@reviewdog # Use the 'reviewdog' branch for PR checks and comments with: - filter_mode: added - vale_flags: "--no-exit --minAlertLevel=error --glob=*.adoc" - reporter: github-pr-review - fail_on_error: false - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - REVIEWDOG_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file + # Pin the Vale CLI version for consistent results. + # Check https://github.com/errata-ai/vale-action for the latest recommended version. + version: '3.11.2' + + # Specifies where Vale will look for files to lint. + # You can specify directories, specific files, or use 'all' for the whole repo. + files: '["content", "modules"]' + # 'github-pr-check' creates a check that appears on the PR. + # 'github-pr-review' creates review comments directly on the lines. + # For detailed comments, 'github-pr-check' combined with 'reviewdog' is often best. + reporter: 'github-pr-check' + + # 'nofilter' reports errors for all files in the specified 'files' list, + # not just the changes introduced in the PR. This is often desired for initial setup. + # Other options: 'added' (default, only new/modified lines), 'diff_context', 'file'. + filter_mode: 'added' + + # If true, the action will fail if Vale reports any errors. + # This will block PR merges if branch protection rules are set. + fail_on_error: true + + # Optional: Pass additional flags to the Vale CLI. + # For example, to specify a custom config file: + # vale_flags: '--config .vale/my-custom-config.ini' + + # The GitHub token is usually automatically provided by GitHub Actions. + # You typically don't need to explicitly set it unless you have very specific needs. + # token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.vale.ini b/.vale.ini index 80ec531d8..cf7c7002f 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,10 +1,10 @@ StylesPath = .vale/styles -MinAlertLevel = suggestion +MinAlertLevel = error Packages = RedHat, AsciiDoc -Vocab = ValidatedPatternsDocs +# Vocab = ValidatedPatternsDocs #IgnoredScopes = code, tt, img, url, a, body.id