From bbe54a6f1ee799907a4ada50ad52c485b7b14e3b Mon Sep 17 00:00:00 2001 From: Ahmad Abdalla <28486158+ahmadabdalla@users.noreply.github.com> Date: Wed, 8 Dec 2021 10:00:37 +1100 Subject: [PATCH 1/5] Users/ahmad/links (#15) --- .github/workflows/linter.yml | 15 +---------- .github/workflows/platform.linkcheck.yml | 33 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/platform.linkcheck.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 7fbd58562d..1284dbd68c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,6 +1,6 @@ name: '.Platform: Linter' -on: workflow_dispatch +on: [pull_request] jobs: build: @@ -27,16 +27,3 @@ jobs: DEFAULT_BRANCH: ${{ github.base_ref }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FILTER_REGEX_EXCLUDE: '[global.module.tests.ps1|Get\-ModulesAsMarkdownTable.ps1]' - - - name: Link Checker - if: always() - id: checker - uses: lycheeverse/lychee-action@v1.1.1 - with: - args: --verbose --no-progress **/docs/**/*.md --accept 200,201,403,429 - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - - name: Link Checker Results - if: always() - run: exit ${{ steps.checker.outputs.exit_code }} diff --git a/.github/workflows/platform.linkcheck.yml b/.github/workflows/platform.linkcheck.yml new file mode 100644 index 0000000000..1af93b9dd8 --- /dev/null +++ b/.github/workflows/platform.linkcheck.yml @@ -0,0 +1,33 @@ +name: '.Platform: Links Check' + +on: + push: + branches: + - main + paths: + - 'docs/wiki/**' + workflow_dispatch: + +jobs: + build: + name: Linter + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + - name: Link Checker + if: always() + id: checker + uses: lycheeverse/lychee-action@v1.1.1 + with: + args: --verbose --no-progress **/docs/**/*.md --accept 200,201,403,429 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Link Checker Results + if: always() + run: exit ${{ steps.checker.outputs.exit_code }} From 11d50baa7e49731af61128d6f9d3b0fadc9c8274 Mon Sep 17 00:00:00 2001 From: Ahmad Abdalla <28486158+ahmadabdalla@users.noreply.github.com> Date: Wed, 8 Dec 2021 10:22:26 +1100 Subject: [PATCH 2/5] Users/ahmad/links (#16) --- .github/workflows/platform.linkcheck.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/platform.linkcheck.yml b/.github/workflows/platform.linkcheck.yml index 1af93b9dd8..e134d292d6 100644 --- a/.github/workflows/platform.linkcheck.yml +++ b/.github/workflows/platform.linkcheck.yml @@ -1,16 +1,16 @@ -name: '.Platform: Links Check' +name: '.Platform: Broken Links Check' on: - push: + workflow_dispatch: + pull_request: branches: - main paths: - 'docs/wiki/**' - workflow_dispatch: jobs: build: - name: Linter + name: Broken Links Check runs-on: ubuntu-latest steps: - name: Checkout Code @@ -19,7 +19,7 @@ jobs: # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 - - name: Link Checker + - name: Check Broken Links if: always() id: checker uses: lycheeverse/lychee-action@v1.1.1 @@ -28,6 +28,6 @@ jobs: env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Link Checker Results + - name: Publish Results if: always() run: exit ${{ steps.checker.outputs.exit_code }} From d0576b1dac669b49c373d7631f2bacd542142bc8 Mon Sep 17 00:00:00 2001 From: Ahmad Abdalla <28486158+ahmadabdalla@users.noreply.github.com> Date: Wed, 8 Dec 2021 10:27:21 +1100 Subject: [PATCH 3/5] test broken link --- docs/wiki/PipelinesDesign.md | 2 +- docs/wiki/TestingDesign.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/wiki/PipelinesDesign.md b/docs/wiki/PipelinesDesign.md index 4d00b20b09..78cdff111b 100644 --- a/docs/wiki/PipelinesDesign.md +++ b/docs/wiki/PipelinesDesign.md @@ -159,7 +159,7 @@ Dynamic parameters that do not need to be hardcoded in the parameter file, and t For example, some modules require referencing Azure resources with the Resource ID. This ID typically contains the `subscriptionId` in the format of `/subscriptions/<>/...`. This task substitutes the `<>` with the correct value, based on the different token types. -Please review the Parameter File Tokens [Design](./ParameterFileTokens.md) for more details on the different token types and how you can use them to remove hardcoded values from your parameter files. +Please review the Parameter File Tokens [Design](./ParameterFileTokens.mdx) for more details on the different token types and how you can use them to remove hardcoded values from your parameter files. --- diff --git a/docs/wiki/TestingDesign.md b/docs/wiki/TestingDesign.md index 5b09fbab31..cd8747a8d8 100644 --- a/docs/wiki/TestingDesign.md +++ b/docs/wiki/TestingDesign.md @@ -39,7 +39,7 @@ Tests falls into four categories: # Static code validation -All Module Unit tests are performed with the help of [Pester](https://github.com/pester/Pester) and are required to have consistent, clean and syntactically correct tests to ensure that our modules are configured correctly, documentation is up to date, and modules don't turn stale. +All Module Unit tests are performed with the help of [Pester](https://github.com/pester/Pesterx) and are required to have consistent, clean and syntactically correct tests to ensure that our modules are configured correctly, documentation is up to date, and modules don't turn stale. The following activities are run executing the `arm/.global/global.module.tests.ps1` script. From 7802376abe5614f4efb19c75ce251ac3a3a679f4 Mon Sep 17 00:00:00 2001 From: Ahmad Abdalla <28486158+ahmadabdalla@users.noreply.github.com> Date: Wed, 8 Dec 2021 10:31:27 +1100 Subject: [PATCH 4/5] test removing failure --- .github/workflows/platform.linkcheck.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/platform.linkcheck.yml b/.github/workflows/platform.linkcheck.yml index e134d292d6..2498198305 100644 --- a/.github/workflows/platform.linkcheck.yml +++ b/.github/workflows/platform.linkcheck.yml @@ -27,7 +27,3 @@ jobs: args: --verbose --no-progress **/docs/**/*.md --accept 200,201,403,429 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - - name: Publish Results - if: always() - run: exit ${{ steps.checker.outputs.exit_code }} From 2db7e093517102240f07d572106892abe698f403 Mon Sep 17 00:00:00 2001 From: Ahmad Abdalla <28486158+ahmadabdalla@users.noreply.github.com> Date: Wed, 8 Dec 2021 10:34:58 +1100 Subject: [PATCH 5/5] restore --- .github/workflows/platform.linkcheck.yml | 4 ++++ docs/wiki/PipelinesDesign.md | 2 +- docs/wiki/TestingDesign.md | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/platform.linkcheck.yml b/.github/workflows/platform.linkcheck.yml index 2498198305..e134d292d6 100644 --- a/.github/workflows/platform.linkcheck.yml +++ b/.github/workflows/platform.linkcheck.yml @@ -27,3 +27,7 @@ jobs: args: --verbose --no-progress **/docs/**/*.md --accept 200,201,403,429 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Publish Results + if: always() + run: exit ${{ steps.checker.outputs.exit_code }} diff --git a/docs/wiki/PipelinesDesign.md b/docs/wiki/PipelinesDesign.md index 78cdff111b..4d00b20b09 100644 --- a/docs/wiki/PipelinesDesign.md +++ b/docs/wiki/PipelinesDesign.md @@ -159,7 +159,7 @@ Dynamic parameters that do not need to be hardcoded in the parameter file, and t For example, some modules require referencing Azure resources with the Resource ID. This ID typically contains the `subscriptionId` in the format of `/subscriptions/<>/...`. This task substitutes the `<>` with the correct value, based on the different token types. -Please review the Parameter File Tokens [Design](./ParameterFileTokens.mdx) for more details on the different token types and how you can use them to remove hardcoded values from your parameter files. +Please review the Parameter File Tokens [Design](./ParameterFileTokens.md) for more details on the different token types and how you can use them to remove hardcoded values from your parameter files. --- diff --git a/docs/wiki/TestingDesign.md b/docs/wiki/TestingDesign.md index cd8747a8d8..5b09fbab31 100644 --- a/docs/wiki/TestingDesign.md +++ b/docs/wiki/TestingDesign.md @@ -39,7 +39,7 @@ Tests falls into four categories: # Static code validation -All Module Unit tests are performed with the help of [Pester](https://github.com/pester/Pesterx) and are required to have consistent, clean and syntactically correct tests to ensure that our modules are configured correctly, documentation is up to date, and modules don't turn stale. +All Module Unit tests are performed with the help of [Pester](https://github.com/pester/Pester) and are required to have consistent, clean and syntactically correct tests to ensure that our modules are configured correctly, documentation is up to date, and modules don't turn stale. The following activities are run executing the `arm/.global/global.module.tests.ps1` script.