Skip to content

Commit

Permalink
Add linkchecker + fix all broken links (#469)
Browse files Browse the repository at this point in the history
* Add linkchecker + fix all broken links
Fixes #468

* Fix links!
  • Loading branch information
julienduchesne committed Apr 28, 2022
1 parent 975d1df commit 3b68019
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 20 deletions.
9 changes: 9 additions & 0 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local grafanaVersions = ['8.5.0', '8.4.7', '8.3.7', '8.2.7', '7.5.15'];
local images = {
go: 'golang:1.18',
python: 'python:3.9-alpine',
lint: 'golangci/golangci-lint',
grafana(version): 'grafana/grafana:' + version,
};
Expand Down Expand Up @@ -68,6 +69,14 @@ local pipeline(name, steps, services=[]) = {
'fi',
],
},
{
name: 'check for broken links',
image: images.python,
commands: [
'pip3 install linkchecker',
'linkchecker --config ./.linkcheckerrc docs/',
],
},
]
),

Expand Down
7 changes: 6 additions & 1 deletion .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ steps:
- fi
image: golang:1.18
name: check for drift
- commands:
- pip3 install linkchecker
- linkchecker --config ./.linkcheckerrc docs/
image: python:3.9-alpine
name: check for broken links
trigger:
branch:
- master
Expand Down Expand Up @@ -308,6 +313,6 @@ workspace:
path: /drone/terraform-provider-grafana
---
kind: signature
hmac: 2525048a966617acb86ea8f67062ceed15fb03290ebfc01f2f089447dbcee09d
hmac: 39c0a8d2ccf04e5464b044ebf859ff6455638cb5e40dd3ad152c5d4c4fb78862

...
5 changes: 5 additions & 0 deletions .linkcheckerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[filtering]
checkextern=1

[MarkdownCheck]
filename_re=.*\.md
3 changes: 3 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ drone:
drone lint .drone/drone.yml
drone sign --save grafana/terraform-provider-grafana .drone/drone.yml

linkcheck:
docker run -it --entrypoint sh -v "$$PWD:$$PWD" -w "$$PWD" python:3.9-alpine -c "pip3 install linkchecker && linkchecker --config .linkcheckerrc docs"

build:
go build -o ${BINARY}

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
page_title: "grafana_user Data Source - terraform-provider-grafana"
subcategory: ""
description: |-
Official documentation https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-users/HTTP API https://grafana.com/docs/grafana/latest/http_api/user/
Official documentation https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/HTTP API https://grafana.com/docs/grafana/latest/http_api/user/
This data source uses Grafana's admin APIs for reading users which
does not currently work with API Tokens. You must use basic auth.
---

# grafana_user (Data Source)

* [Official documentation](https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-users/)
* [Official documentation](https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/)
* [HTTP API](https://grafana.com/docs/grafana/latest/http_api/user/)

This data source uses Grafana's admin APIs for reading users which
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ This can be a Grafana API key, basic auth `username:password`, or a

### `cloud_api_key`

An API key created on the [Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/cloud-portal/create-api-key/).
An API key created on the [Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/reference/create-api-key/).

### `sm_access_token`

Expand All @@ -208,7 +208,7 @@ curl \
```

`GRAFANA_CLOUD_API_KEY` is an API key created on the
[Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/cloud-portal/create-api-key/).
[Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/reference/create-api-key/).
It must have the `MetricsPublisher` role.

`SM_API_URL` is the URL of the Synthetic Monitoring API.
Expand Down
3 changes: 1 addition & 2 deletions docs/resources/oncall_route.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
page_title: "grafana_oncall_route Resource - terraform-provider-grafana"
subcategory: ""
description: |-
Official documentation https://grafana.com/docs/grafana-cloud/oncall/routes/HTTP API https://grafana.com/docs/grafana-cloud/oncall/oncall-api-reference/routes/
HTTP API https://grafana.com/docs/grafana-cloud/oncall/oncall-api-reference/routes/
---

# grafana_oncall_route (Resource)

* [Official documentation](https://grafana.com/docs/grafana-cloud/oncall/routes/)
* [HTTP API](https://grafana.com/docs/grafana-cloud/oncall/oncall-api-reference/routes/)

## Example Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "grafana_organization Resource - terraform-provider-grafana"
subcategory: ""
description: |-
Official documentation https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-orgs/HTTP API https://grafana.com/docs/grafana/latest/http_api/org/
Official documentation https://grafana.com/docs/grafana/latest/administration/manage-organizations/HTTP API https://grafana.com/docs/grafana/latest/http_api/org/
---

# grafana_organization (Resource)

* [Official documentation](https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-orgs/)
* [Official documentation](https://grafana.com/docs/grafana/latest/administration/manage-organizations/)
* [HTTP API](https://grafana.com/docs/grafana/latest/http_api/org/)

## Example Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "grafana_team Resource - terraform-provider-grafana"
subcategory: ""
description: |-
Official documentation https://grafana.com/docs/grafana/latest/manage-users/manage-teams/HTTP API https://grafana.com/docs/grafana/latest/http_api/team/
Official documentation https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-teams/HTTP API https://grafana.com/docs/grafana/latest/http_api/team/
---

# grafana_team (Resource)

* [Official documentation](https://grafana.com/docs/grafana/latest/manage-users/manage-teams/)
* [Official documentation](https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-teams/)
* [HTTP API](https://grafana.com/docs/grafana/latest/http_api/team/)

## Example Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
page_title: "grafana_user Resource - terraform-provider-grafana"
subcategory: ""
description: |-
Official documentation https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-users/HTTP API https://grafana.com/docs/grafana/latest/http_api/user/
Official documentation https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/HTTP API https://grafana.com/docs/grafana/latest/http_api/user/
This resource uses Grafana's admin APIs for creating and updating users which
does not currently work with API Tokens. You must use basic auth.
---

# grafana_user (Resource)

* [Official documentation](https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-users/)
* [Official documentation](https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/)
* [HTTP API](https://grafana.com/docs/grafana/latest/http_api/user/)

This resource uses Grafana's admin APIs for creating and updating users which
Expand Down
2 changes: 1 addition & 1 deletion grafana/data_source_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func DatasourceUser() *schema.Resource {
return &schema.Resource{
Description: `
* [Official documentation](https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-users/)
* [Official documentation](https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/)
* [HTTP API](https://grafana.com/docs/grafana/latest/http_api/user/)
This data source uses Grafana's admin APIs for reading users which
Expand Down
1 change: 0 additions & 1 deletion grafana/resource_oncall_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
func ResourceOnCallRoute() *schema.Resource {
return &schema.Resource{
Description: `
* [Official documentation](https://grafana.com/docs/grafana-cloud/oncall/routes/)
* [HTTP API](https://grafana.com/docs/grafana-cloud/oncall/oncall-api-reference/routes/)
`,
Create: ResourceOnCallRouteCreate,
Expand Down
2 changes: 1 addition & 1 deletion grafana/resource_organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func ResourceOrganization() *schema.Resource {
return &schema.Resource{

Description: `
* [Official documentation](https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-orgs/)
* [Official documentation](https://grafana.com/docs/grafana/latest/administration/manage-organizations/)
* [HTTP API](https://grafana.com/docs/grafana/latest/http_api/org/)
`,

Expand Down
2 changes: 1 addition & 1 deletion grafana/resource_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func ResourceTeam() *schema.Resource {
return &schema.Resource{

Description: `
* [Official documentation](https://grafana.com/docs/grafana/latest/manage-users/manage-teams/)
* [Official documentation](https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-teams/)
* [HTTP API](https://grafana.com/docs/grafana/latest/http_api/team/)
`,

Expand Down
2 changes: 1 addition & 1 deletion grafana/resource_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func ResourceUser() *schema.Resource {
return &schema.Resource{

Description: `
* [Official documentation](https://grafana.com/docs/grafana/latest/manage-users/server-admin/server-admin-manage-users/)
* [Official documentation](https://grafana.com/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/)
* [HTTP API](https://grafana.com/docs/grafana/latest/http_api/user/)
This resource uses Grafana's admin APIs for creating and updating users which
Expand Down
4 changes: 2 additions & 2 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This can be a Grafana API key, basic auth `username:password`, or a

### `cloud_api_key`

An API key created on the [Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/cloud-portal/create-api-key/).
An API key created on the [Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/reference/create-api-key/).

### `sm_access_token`

Expand All @@ -59,7 +59,7 @@ curl \
```

`GRAFANA_CLOUD_API_KEY` is an API key created on the
[Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/cloud-portal/create-api-key/).
[Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/reference/create-api-key/).
It must have the `MetricsPublisher` role.

`SM_API_URL` is the URL of the Synthetic Monitoring API.
Expand Down

0 comments on commit 3b68019

Please sign in to comment.