Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: checks markdown for bad links #212

Merged
merged 4 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test_markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yamllint --format github .github/workflows/test_markdown.yml
---
name: test_markdown

on: # yamllint disable-line rule:truthy
Copy link
Member Author

@codefromthecrypt codefromthecrypt Jan 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL why on: was making truthy warnings.. here are some details @openzipkin/devops-tooling adrienverge/yamllint#430

now, finally we have one workflow that has no lint output

push: # non-tagged pushes to master
branches:
- master
tags-ignore:
- '*'
paths:
- '**/*.md'
- ./build-bin/mlc_config.json
pull_request: # pull requests targeted at the master branch.
branches:
- master
paths:
- '**/*.md'
- ./build-bin/mlc_config.json

jobs:
test-markdown:
name: Test Markdown
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
# skip commits made by the release plugin
if: "!contains(github.event.head_commit.message, 'maven-release-plugin')"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: './build-bin/mlc_config.json'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Api and all collector components.

| Storage | Description |
|--------------------------------------------|-----------------------------|
| [Stackdriver Trace](./storage/stackdriver) | Free cloud service provider |
| [Stackdriver Trace](./storage-stackdriver) | Free cloud service provider |

## Server integration
In order to integrate with zipkin-server, you need to use properties
Expand Down Expand Up @@ -79,7 +79,7 @@ $ STORAGE_TYPE=stackdriver STACKDRIVER_PROJECT_ID=zipkin-demo \
If you cannot use our [Docker image](./docker/README.md), you can still integrate
yourself by downloading a couple jars.

[Here's an example](autoconfigure/storage-stackdriver#quick-start) of
[Here's an example](module/README.md#quick-start) of
integrating Stackdriver storage.

## Troubleshooting
Expand Down
11 changes: 9 additions & 2 deletions build-bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ This is a Maven+Docker project, which uses standard conventions for test and dep
The Docker image for zipkin-gcp is a layer over zipkin, including only the [../module] and
configuration settings.

[docker-compose-zipkin-gcp.xml] ensures GCP authentication works. It is not run on pull request, as
the required secure variable is only available on master push.
[docker-compose-zipkin-gcp.xml](docker-compose-zipkin-gcp.yml) ensures GCP authentication works.
It is not run on pull request, as the required secure variable is only available on master push.

[mlc_config.json](mlc_config.json) is run by GitHub Action, but you can also run it locally,
assuming you installed markdown-link-check via NPM.

```bash
$ find . -name \*.md |xargs markdown-link-check -c ./build-bin/mlc_config.json
```

[//]: # (Below here should be standard for all projects)

Expand Down
10 changes: 10 additions & 0 deletions build-bin/mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "https://oss.sonatype.org/content/repositories/snapshots"
},
{
"pattern": "http://localhost:9411/api/v[12]/spans"
}
]
}
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ In docker, the following can also be set:

### Stackdriver

Stackdriver Configuration variables are detailed [here](../module/storage-stackdriver#configuration).
Stackdriver Configuration variables are detailed [here](../module/README.md#configuration).

## Building

Expand Down
2 changes: 1 addition & 1 deletion module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The Zipkin server can be further configured as described in the

Configuration can be applied either through environment variables or an external Zipkin
configuration file. The module includes default configuration that can be used as a
[reference](https://github.com/openzipkin/zipkin-gcp/tree/master/autoconfigure/storage-stackdriver/src/main/resources/zipkin-server-stackdriver.yml)
[reference](./src/main/resources/zipkin-server-gcp.yml)
for users that prefer a file based approach.

#### Environment Variables
Expand Down