Skip to content

Commit

Permalink
docs: Make badges consistent, run markdownlint on all .md files (#347)
Browse files Browse the repository at this point in the history
- Consistently generate badges for GH workflows in roles RHELPLAN-146921
- Run markdownlint on all .md files
- Rename woke action to Woke for a pretty badge
- Use woke from linux-system-roles/lsr-woke-action

Signed-off-by: Sergei Petrosian <[email protected]>
  • Loading branch information
spetrosi authored Aug 24, 2023
1 parent f058beb commit b77ec1c
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 25 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Lint README.md
# CHANGELOG.md is generated automatically from PR titles and descriptions
# It might have issues but they are not critical
- name: Lint all markdown files except for CHANGELOG.md
uses: docker://avtodev/markdown-lint:master
with:
args: README.md
args: >-
--ignore=CHANGELOG.md
**/*.md
config: .markdownlint.yaml
11 changes: 6 additions & 5 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# yamllint disable rule:line-length
name: Check for non-inclusive language
name: Woke
on: # yamllint disable-line rule:truthy
- pull_request
jobs:
woke:
name: woke
name: Detect non-inclusive language
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: woke
uses: get-woke/woke-action@v0
- name: Run lsr-woke-action
# Originally, uses: get-woke/woke-action@v0
uses: linux-system-roles/lsr-woke-action@main
with:
woke-args: "-c https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/config_files/woke.yml"
woke-args: "-c https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/config_files/woke.yml --count-only-error-for-failure"
# Cause the check to fail on any broke rules
fail-on-error: true
3 changes: 1 addition & 2 deletions README-ansible.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Introduction to Ansible for Linux System Roles
==============================================
# Introduction to Ansible for Linux System Roles

If you are not familiar with Ansible, please see
[Introduction to Ansible for Linux System Roles](https://linux-system-roles.github.io/documentation/intro-to-ansible-for-system-roles.html),
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# logging

![CI Testing](https://github.com/linux-system-roles/logging/workflows/tox/badge.svg)
[![ansible-lint.yml](https://github.com/linux-system-roles/logging/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/logging/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/logging/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/logging/actions/workflows/ansible-test.yml) [![markdownlint.yml](https://github.com/linux-system-roles/logging/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/logging/actions/workflows/markdownlint.yml) [![woke.yml](https://github.com/linux-system-roles/logging/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/logging/actions/workflows/woke.yml)

---

## Background

Expand Down
7 changes: 2 additions & 5 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Contributing to the logging Linux System Role
=============================================
# Contributing to the logging Linux System Role

Where to start
--------------
## Where to start

The first place to go is [Contribute](https://linux-system-roles.github.io/contribute.html).
This has all of the common information that all role developers need:
Expand All @@ -21,4 +19,3 @@ are likely to be suitable for new contributors!

**Code** is managed on [Github](https://github.com/linux-system-roles/logging), using
[Pull Requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).

2 changes: 1 addition & 1 deletion roles/rsyslog/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Rsyslog Provider
# Rsyslog Provider

This sub-tree contains the rsyslog implementation.

Expand Down
26 changes: 17 additions & 9 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
CI tests
========
# CI tests

The tests are implemented in tests/tests_*.yml.

Rough naming convention of the tests - tests_inputname[_outputname].conf.

Tests are divided in to these groups.

- basics input - input from imjournal or imuxsock, and output to omfile or omfwd
- tests_basics_files.yml
- tests_basics_forwards.yml
- tests_imuxsock_files.yml
- files input - input from imfile and output to omfile
- tests_files_files.yml
- combination - input from imjournal and imfile, and output to omfile or omfwd
- combination - input from imjournal and imfile, and output to omfile or omfwd
- tests_combination.yml
- files_elasticsearch - input from imfile, and output to elasticsearch, including key/certs set up
- tests_files_elasticsearch.yml
Expand All @@ -31,22 +32,29 @@ The CI tests are triggered when a pull request is submitted. Each tests_testname
The tests are used in the upstream as well as the downstream CI testing.

You can manually run the tests, as well.
1. Download CentOS qcow2 image from https://cloud.centos.org/centos/.

1. Download CentOS qcow2 image from <https://cloud.centos.org/centos/>.
2. Make sure standard-test-roles-inventory-qemu package is installed.
3. Run the following command from the `tests` directory, which spawns an openshift node locally and runs the test yml on it.
```

```bash
TEST_SUBJECTS=/path/to/downloaded_your_CentOS_7_or_8_image.qcow2 ansible-playbook [-vvvv] -i /usr/share/ansible/inventory/standard-inventory-qcow2 tests_testname.yml
```

When the test is done, the test environment is cleaned up.
4. If the test fails and you need to debug it, add `TEST_DEBUG=true` prior to `ansible-playbook`, which leaves the test environment.
5. Once the ansible-playbook is finished, you can ssh to the node as follows:
```

```bash
ssh -p PID -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /tmp/inventory-cloudRANDOMSTR/identity [email protected]
```

The PID is returned from the following command line.
```

```bash
ps -ef | grep "linux-system-roles.logging.tests" | egrep -v grep | awk '{print $28}' | awk -F':' '{print $3}' | awk -F'-' '{print $1}'
```
5. When the debugging is done, run `ps -ef | grep standard-inventory-qcow2` and kill the pid to clean up the node.

For more details, see also https://github.com/linux-system-roles/test-harness.
6. When the debugging is done, run `ps -ef | grep standard-inventory-qcow2` and kill the pid to clean up the node.

For more details, see also <https://github.com/linux-system-roles/test-harness>.

0 comments on commit b77ec1c

Please sign in to comment.