Skip to content

Commit

Permalink
Fix check links and make it simpler (#2172)
Browse files Browse the repository at this point in the history
* Fix check links and make it simpler

* Apply suggestions from code review

* Update .github/workflows/check-links-in-prod.yaml

Co-authored-by: Marian Steinbach <marian@giantswarm.io>

* Try to acumulate errors

* fix report

* Simplify the checks

* Try another thing

* Make it solid

* Fix syntax

---------

Co-authored-by: Marian Steinbach <marian@giantswarm.io>
  • Loading branch information
pipo02mix and marians authored Apr 10, 2024
1 parent 629a773 commit c8159f6
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 30 deletions.
89 changes: 79 additions & 10 deletions .github/workflows/check-links-in-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# docs site. It has to be triggered manually.
name: Check links

on:
on:
workflow_dispatch:

jobs:
Expand All @@ -12,15 +12,84 @@ jobs:
- name: Pull images
run: docker pull ghcr.io/linkchecker/linkchecker:latest

- name: Check links
- name: check-links-in-overview-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/ \
--check-extern \
-t 1 \
--ignore-url="^https://github.com/giantswarm/docs/.*" \
--ignore-url="^https://.*example\.com/.*" \
--ignore-url="^https://my-org\.github\.com/.*" \
--ignore-url="^https://github\.com/giantswarm/giantswarm/.*" \
--ignore-url=".*gigantic\.io.*"
https://docs.giantswarm.io/overview/ \
--check-extern \
-t 1 -r 2 || echo "failed1=true" >> "$GITHUB_ENV"
continue-on-error: true

- name: check-links-in-getting-started-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/getting-started/ \
--check-extern \
-t 1 -r 2 || echo "failed2=true" >> "$GITHUB_ENV"
continue-on-error: true

- name: check-links-in-tutorials-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/tutorials/ \
--check-extern \
-t 1 -r 2 || echo "failed3=true" >> "$GITHUB_ENV"
continue-on-error: true

- name: check-links-in-reference-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/reference/ \
--check-extern \
-t 1 -r 2 || echo "failed4=true" >> "$GITHUB_ENV"
continue-on-error: true

- name: check-links-in-support-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/support/ \
--check-extern \
-t 1 -r 2 || echo "failed5=true" >> "$GITHUB_ENV"
continue-on-error: true

- name: check-links-in-changelogs
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/changes/ \
-t 1 -r 2 \
--ignore-url="^https://github.com/giantswarm/docs/.*" \
--ignore-url="^https://.*example\.com/.*" \
--ignore-url="^https://my-org\.github\.com/.*" \
--ignore-url="^https://github\.com/giantswarm/giantswarm/.*" \
--ignore-url=".*gigantic\.io.*" || echo "failed6=true" >> "$GITHUB_ENV"
continue-on-error: true

- name: Report errors
run: |
if [[ $failed1 == "true" ]]; then
echo "There has been some errors in overview checks, please check the step."
fi
if [[ $failed2 == "true" ]]; then
echo "There has been some errors in getting started checks, please check the step."
fi
if [[ $failed3 == "true" ]]; then
echo "There has been some errors in tutorials checks, please check the step."
fi
if [[ $failed4 == "true" ]]; then
echo "There has been some errors in reference checks, please check the step."
fi
if [[ $failed5 == "true" ]]; then
echo "There has been some errors in support checks, please check the step."
fi
if [[ $failed6 "true" ]]; then
echo "There has been some errors in changelogs checks, please check the step."
fi
if [[ $failed1 == "true" ]] || [[ $failed2 == "true" ]] || [[ $failed3 == "true" ]] || [[ $failed4 == "true" ]] || [[ $failed5 == "true" ]] || [[ $failed6 "true" ]]; then
exit 1
fi
2 changes: 1 addition & 1 deletion src/content/changes/highlights/2021-11-05.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ owner:

- A new article on [managing workload clusters with GitOps](https://docs.giantswarm.io/advanced/gitops/), explaining how to use Flux in our management clusters.
- Added documentation for handling [cloud provider credentials](https://docs.giantswarm.io/use-the-api/management-api/credentials/) via the Management API (for AWS).
- If you've been trying to figure out how to use `kubectl gs login` with workload clusters, the [docs article](https://docs.giantswarm.io/use-the-api/kubectl-gs/login/) now provides more detailed information and better examples.
- If you've been trying to figure out how to use `kubectl gs login` with workload clusters, the [docs article](https://docs.giantswarm.io/vintage/use-the-api/kubectl-gs/login/) now provides more detailed information and better examples.

## User interfaces

Expand Down
2 changes: 1 addition & 1 deletion src/content/changes/highlights/2021-11-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ owner:

In the web UI, we now display if a cluster has upgrades scheduled.

`kubectl gs login` has been improved in several ways. Most importantly, the command now also supports using a service account token for authentication via the `--token` flag. This facilitates creation of workload cluster client certificates especially in automation. ([Docs](https://docs.giantswarm.io/use-the-api/kubectl-gs/login/))
`kubectl gs login` has been improved in several ways. Most importantly, the command now also supports using a service account token for authentication via the `--token` flag. This facilitates creation of workload cluster client certificates especially in automation. ([Docs](https://docs.giantswarm.io/vintage/use-the-api/kubectl-gs/login/))

Additionally, when creating a client certificate for a workload cluster, the flag `--organization` is now optional as long as the workload cluster name is unique.

Expand Down
2 changes: 1 addition & 1 deletion src/content/changes/highlights/2022-02-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ owner:
## Documentation

- As our next releases for AWS and Azure will provide cgroups v2, which is known to conflict with some applications (especially older Java runtime environments), we provide documentation on [how to activate cgroups v1 in selected node pools](https://docs.giantswarm.io/advanced/forcing-cgroupsv1/).
- We extended our documentation for the [`kubectl gs login`](https://docs.giantswarm.io/use-the-api/kubectl-gs/login/#workload-cluster) command to provide more information for accessing workload clusters.
- We extended our documentation for the [`kubectl gs login`](https://docs.giantswarm.io/vintage/use-the-api/kubectl-gs/login/#workload-cluster) command to provide more information for accessing workload clusters.
- We improved the [GitOps documentation](https://docs.giantswarm.io/advanced/gitops/#setting-up-sources) around Role-Based Access and how it ties in to Management API.
2 changes: 1 addition & 1 deletion src/content/changes/highlights/2022-07-08.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ This week we have updated cert-manager and added OIDC support on workload cluste
- [cert-manager](https://github.com/giantswarm/cert-manager-app) version [v2.15.1](https://github.com/giantswarm/cert-manager-app/blob/master/CHANGELOG.md#2151---2022-07-07) Upgrades to upstream image [`v1.7.3`](https://github.com/jetstack/cert-manager/releases/tag/v1.7.3) which increases some hard-coded timeouts for certain ACME issuers (ZeroSSL and Sectigo) ([#243](https://github.com/giantswarm/cert-manager-app/pull/243)) and updates kubectl container version to `1.24.2` ([#243](https://github.com/giantswarm/cert-manager-app/pull/243))

## User interfaces
`kubectl gs login` now supports OIDC on workload clusters via `dex` and `athena`. Please check [the documentation on workload cluster OIDC configuration](https://docs.giantswarm.io/advanced/access-management/configure-dex-in-your-cluster/) as well as [the login command reference](https://docs.giantswarm.io/use-the-api/kubectl-gs/login/) to find out more.
`kubectl gs login` now supports OIDC on workload clusters via `dex` and `athena`. Please check [the documentation on workload cluster OIDC configuration](https://docs.giantswarm.io/advanced/access-management/configure-dex-in-your-cluster/) as well as [the login command reference](https://docs.giantswarm.io/vintage/use-the-api/kubectl-gs/login/) to find out more.

6 changes: 3 additions & 3 deletions src/content/changes/highlights/2024-02-15.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ owner:
---
## Apps

- [dex-k8s-authenticator](https://github.com/giantswarm/dex-k8s-authenticator) component is now deprecated and disabled by default due to the upstream project no longer being maintained. We advise switching to use [kubectl gs login](https://docs.giantswarm.io/use-the-api/kubectl-gs/login/) for access. Please reach out if you need any support regarding the access mechanism.
- [dex-k8s-authenticator](https://github.com/giantswarm/dex-k8s-authenticator) component is now deprecated and disabled by default due to the upstream project no longer being maintained. We advise switching to use [kubectl gs login](https://docs.giantswarm.io/vintage/use-the-api/kubectl-gs/login/) for access. Please reach out if you need any support regarding the access mechanism.
- [external-dns-app](https://github.com/giantswarm/external-dns-app) version [v.3.1.0](https://github.com/giantswarm/external-dns-app/releases/tag/v3.1.0) removes the default namespace filter configuration. This was an relict from times where nginx-ingress was bound the the kube-system namespace and now got lifted.
- [flux-app](https://github.com/giantswarm/flux-app) version [v1.3.1](https://github.com/giantswarm/flux-app/releases/tag/v1.3.1) corrects installation issues from the v1.2.0 release where in certain scenarios controllers were unable to start due to PSPs still being available on the clusters. This version of the app also improves monitoring of the flux controllers. Customers who are using the [v1.2.0](https://github.com/giantswarm/flux-app/releases/tag/v1.2.0) release should upgrade to this new version at the earliest convenience. Please reach out if you need any support regarding the upgrade.
- [flux-app](https://github.com/giantswarm/flux-app) version [v1.3.1](https://github.com/giantswarm/flux-app/releases/tag/v1.3.1) corrects installation issues from the v1.2.0 release where in certain scenarios controllers were unable to start due to PSPs still being available on the clusters. This version of the app also improves monitoring of the flux controllers. Customers who are using the [v1.2.0](https://github.com/giantswarm/flux-app/releases/tag/v1.2.0) release should upgrade to this new version at the earliest convenience. Please reach out if you need any support regarding the upgrade.

## Docs

- [Now we explain how to solve the problem when users get GitHub API rate limiting issues](https://docs.giantswarm.io/use-the-api/kubectl-gs/faq/#why-do-i-see-api-rate-limit-exceeded-errors).
- [Now we explain how to solve the problem when users get GitHub API rate limiting issues](https://docs.giantswarm.io/vintage/use-the-api/kubectl-gs/faq/#why-do-i-see-api-rate-limit-exceeded-errors).
- [We have added some new domains to our list of outbound connections required](https://github.com/giantswarm/docs/pull/2120/files).
Loading

0 comments on commit c8159f6

Please sign in to comment.