-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1521 from Nordix/tuomo/switch-to-markdownlint-cli2
📖 switch markdownlint container to markdownlint-cli2
- Loading branch information
Showing
9 changed files
with
116 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Reference: https://github.com/DavidAnson/markdownlint-cli2#markdownlint-cli2yaml | ||
|
||
config: | ||
ul-indent: | ||
# Kramdown wanted us to have 3 earlier, tho this CLI recommends 2 or 4 | ||
indent: 3 | ||
|
||
# Don't autofix anything, we're linting here | ||
fix: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,8 +41,9 @@ Commit message should contain signed off section with full name and email. For e | |
Signed-off-by: John Doe <[email protected]> | ||
``` | ||
|
||
When making commits, include the `-s` flag and `Signed-off-by` section will be automatically | ||
added to your commit message. If you want GPG signing too, add the `-S` flag alongside `-s`. | ||
When making commits, include the `-s` flag and `Signed-off-by` section | ||
will be automatically added to your commit message. If you want GPG | ||
signing too, add the `-S` flag alongside `-s`. | ||
|
||
```bash | ||
# Signing off commit | ||
|
@@ -112,10 +113,14 @@ the ability to backport and release patch versions; | |
- The EOL date of each API Version is determined from the last release available | ||
once a new API version is published. | ||
|
||
<!-- markdownlint-disable MD013 --> | ||
|
||
| API Version | Maintained Until | | ||
| ------------ | ------------------------------------------------------------- | | ||
| **v1alpha1** | TBD (current latest) | | ||
| **v1beta1** | Upcoming (Proposal [PR](https://github.com/metal3-io/metal3-docs/pull/332)) | | ||
| **v1beta1** | Upcoming (Proposal [PR](https://github.com/metal3-io/metal3-docs/pull/332)) | | ||
|
||
<!-- markdownlint-enable MD013 --> | ||
|
||
- For the current stable API version (v1alpha1) we support the two most recent | ||
minor releases; older minor releases are immediately unsupported when a new | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# TODO: | ||
# Fix these two failures in future commit, and remove the ignore rules | ||
# | ||
# Further documentation is available for these failures: | ||
# - MD029: https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md029---ordered-list-item-prefix | ||
# - MD013: https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md013---line-length | ||
#!/bin/sh | ||
# markdownlint-cli2 has config file(s) named .markdownlint-cli2.yaml in the repo | ||
|
||
set -eux | ||
|
||
IS_CONTAINER=${IS_CONTAINER:-false} | ||
IS_CONTAINER="${IS_CONTAINER:-false}" | ||
CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-podman}" | ||
|
||
# all md files, but ignore .github | ||
if [ "${IS_CONTAINER}" != "false" ]; then | ||
TOP_DIR="${1:-.}" | ||
find "${TOP_DIR}" \ | ||
\( -path ./vendor -o -path ./.github \) \ | ||
-prune -o -name '*.md' -exec \ | ||
mdl --style all --warnings \ | ||
--rules "~MD013,~MD029" \ | ||
{} \+ | ||
markdownlint-cli2 "**/*.md" "#.github" | ||
else | ||
"${CONTAINER_RUNTIME}" run --rm \ | ||
--env IS_CONTAINER=TRUE \ | ||
--volume "${PWD}:/workdir:ro,z" \ | ||
--entrypoint sh \ | ||
--workdir /workdir \ | ||
docker.io/pipelinecomponents/markdownlint:0.13.0@sha256:9c0cdfb64fd3f1d3bdc5181629b39c2e43b6a52fc9fdc146611e1860845bbae0 \ | ||
/workdir/hack/markdownlint.sh "$@" | ||
"${CONTAINER_RUNTIME}" run --rm \ | ||
--env IS_CONTAINER=TRUE \ | ||
--volume "${PWD}:/workdir:ro,z" \ | ||
--entrypoint sh \ | ||
--workdir /workdir \ | ||
docker.io/pipelinecomponents/markdownlint-cli2:0.9.0@sha256:71370df6c967bae548b0bfd0ae313ddf44bfad87da76f88180eff55c6264098c \ | ||
/workdir/hack/markdownlint.sh "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
# Kustomizations for Ironic | ||
|
||
This folder contains kustomizations for Ironic. | ||
They are mainly used through the [deploy.sh](../tools/deploy.sh) script, which takes care of generating the necessary config for basic-auth and TLS. | ||
This folder contains kustomizations for Ironic. They are mainly used | ||
through the [deploy.sh](../tools/deploy.sh) script, which takes care of | ||
generating the necessary config for basic-auth and TLS. | ||
|
||
- **base** - This is the kustomize base that we start from. | ||
- **components** - In here you will find re-usable kustomize components for running Ironic with TLS, basic-auth, keepalived or mariadb. | ||
- **basic-auth** - Enable basic authentication. Note that the basic-auth component is missing the actual credentials. This is on purpose, to make sure that the user is setting the password. | ||
- **tls** - Enable TLS. The TLS component needs to have the proper IP/SAN set for the certificates. | ||
- **keepalived** - Add a keepalived container to the deployment. This is useful when using a VIP for exposing the Ironic endpoint, so that the IP can move with the pod. | ||
- **mariadb** - Use MariaDB instead of SQLite. TLS required for this to work. | ||
- **default** - A minimal, fully working, Ironic kustomization including configmap and password. Use only for development! The DB password is hard coded in the repo and there is no TLS or basic-auth. | ||
- **overlays** - Here you will find ready made overlays that use the above mentioned components. | ||
- **components** - In here you will find re-usable kustomize components | ||
for running Ironic with TLS, basic-auth, keepalived or mariadb. | ||
- **basic-auth** - Enable basic authentication. Note that the | ||
basic-auth component is missing the actual credentials. This is on | ||
purpose, to make sure that the user is setting the password. | ||
- **tls** - Enable TLS. The TLS component needs to have the proper | ||
IP/SAN set for the certificates. | ||
- **keepalived** - Add a keepalived container to the deployment. This | ||
is useful when using a VIP for exposing the Ironic endpoint, so | ||
that the IP can move with the pod. | ||
- **mariadb** - Use MariaDB instead of SQLite. TLS required for this | ||
to work. | ||
- **default** - A minimal, fully working, Ironic kustomization including | ||
configmap and password. Use only for development! The DB password is | ||
hard coded in the repo and there is no TLS or basic-auth. | ||
- **overlays** - Here you will find ready made overlays that use the | ||
above mentioned components. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters