Skip to content

Commit 7433759

Browse files
authored
ci: Onboard HPC role (#3)
Signed-off-by: Sergei Petrosian <[email protected]>
1 parent af40143 commit 7433759

File tree

13 files changed

+71
-24
lines changed

13 files changed

+71
-24
lines changed

.ansible-lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ exclude_paths:
2121
- .markdownlint.yaml
2222
- examples/roles/
2323
mock_roles:
24-
- linux-system-roles.template
24+
- linux-system-roles.hpc
2525
supported_ansible_also:
2626
- "2.14.0"

.github/workflows/ansible-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install tox, tox-lsr
3333
run: |
3434
set -euxo pipefail
35-
pip3 install "git+https://github.com/linux-system-roles/[email protected].0"
35+
pip3 install "git+https://github.com/linux-system-roles/[email protected].1"
3636
3737
- name: Convert role to collection format
3838
id: collection

.github/workflows/ansible-managed-var-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install tox, tox-lsr
3131
run: |
3232
set -euxo pipefail
33-
pip3 install "git+https://github.com/linux-system-roles/[email protected].0"
33+
pip3 install "git+https://github.com/linux-system-roles/[email protected].1"
3434
3535
- name: Run ansible-plugin-scan
3636
run: |

.github/workflows/ansible-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install tox, tox-lsr
3434
run: |
3535
set -euxo pipefail
36-
pip3 install "git+https://github.com/linux-system-roles/[email protected].0"
36+
pip3 install "git+https://github.com/linux-system-roles/[email protected].1"
3737
3838
- name: Convert role to collection format
3939
run: |

.github/workflows/qemu-kvm-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
python3 -m pip install --upgrade pip
106106
sudo apt update
107107
sudo apt install -y --no-install-recommends git ansible-core genisoimage qemu-system-x86
108-
pip3 install "git+https://github.com/linux-system-roles/[email protected].0"
108+
pip3 install "git+https://github.com/linux-system-roles/[email protected].1"
109109
110110
# HACK: Drop this when moving this workflow to 26.04 LTS
111111
- name: Update podman to 5.x for compatibility with bootc-image-builder's podman 5

.github/workflows/tft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jobs:
179179
tf_scope: private
180180
api_key: ${{ secrets.TF_API_KEY_RH }}
181181
update_pull_request_status: false
182-
tmt_plan_filter: "tag:playbooks_parallel,template"
182+
tmt_plan_filter: "tag:playbooks_parallel,hpc"
183183

184184
- name: Set final commit status
185185
uses: myrotvorets/set-commit-status-action@master

.github/workflows/weekly_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Weekly CI trigger
44
on: # yamllint disable-line rule:truthy
55
workflow_dispatch:
66
schedule:
7-
- cron: 0 0 * * 6
7+
- cron: 0 11 * * 6
88
env:
99
BRANCH_NAME: weekly-ci
1010
COMMIT_MESSAGE: "ci: This PR is to trigger periodic CI testing"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Role Name
22

3-
[![ansible-lint.yml](https://github.com/linux-system-roles/template/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/template/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/ansible-test.yml) [![codespell.yml](https://github.com/linux-system-roles/template/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/template/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/markdownlint.yml) [![qemu-kvm-integration-tests.yml](https://github.com/linux-system-roles/template/actions/workflows/qemu-kvm-integration-tests.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/qemu-kvm-integration-tests.yml) [![shellcheck.yml](https://github.com/linux-system-roles/template/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/template/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/template/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/template/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/template/actions/workflows/woke.yml)
3+
[![ansible-lint.yml](https://github.com/linux-system-roles/hpc/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/hpc/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/ansible-test.yml) [![codespell.yml](https://github.com/linux-system-roles/hpc/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/hpc/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/markdownlint.yml) [![qemu-kvm-integration-tests.yml](https://github.com/linux-system-roles/hpc/actions/workflows/qemu-kvm-integration-tests.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/qemu-kvm-integration-tests.yml) [![shellcheck.yml](https://github.com/linux-system-roles/hpc/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/hpc/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/hpc/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/hpc/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/hpc/actions/workflows/woke.yml)
44

55
![template](https://github.com/linux-system-roles/template/workflows/tox/badge.svg)
66

contributing.md

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to the template Linux System Role
1+
# Contributing to the hpc Linux System Role
22

33
## Where to start
44

@@ -12,10 +12,57 @@ This has all of the common information that all role developers need:
1212
* How to create git commits and submit pull requests
1313

1414
**Bugs and needed implementations** are listed on
15-
[Github Issues](https://github.com/linux-system-roles/template/issues).
15+
[Github Issues](https://github.com/linux-system-roles/hpc/issues).
1616
Issues labeled with
17-
[**help wanted**](https://github.com/linux-system-roles/template/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
17+
[**help wanted**](https://github.com/linux-system-roles/hpc/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
1818
are likely to be suitable for new contributors!
1919

20-
**Code** is managed on [Github](https://github.com/linux-system-roles/template), using
20+
**Code** is managed on [Github](https://github.com/linux-system-roles/hpc), using
2121
[Pull Requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
22+
23+
## Running CI Tests Locally
24+
25+
### Use tox-lsr with qemu
26+
27+
The latest version of tox-lsr supports qemu testing.
28+
<https://github.com/linux-system-roles/tox-lsr#qemu-testing>
29+
30+
**Steps:**
31+
32+
1. If you are using RHEL or CentOS, enable the EPEL repository for your
33+
platform - <https://docs.fedoraproject.org/en-US/epel/>
34+
35+
2. Use yum or dnf to install `standard-test-roles-inventory-qemu`
36+
* If for some reason dnf/yum do not work, just download the script from
37+
<https://pagure.io/standard-test-roles/raw/master/f/inventory/standard-inventory-qcow2> <!--- wokeignore:rule=master -->
38+
* copy to your `$PATH`, and make sure it is executable
39+
40+
3. Install tox
41+
* Use yum/dnf to install `python3-tox` - if that does not work, then use
42+
`pip install --user tox`, then make sure `~/.local/bin` is in your `$PATH`
43+
44+
4. Install tox-lsr <https://github.com/linux-system-roles/tox-lsr#how-to-get-it>
45+
46+
```bash
47+
pip install --user git+https://github.com/linux-system-roles/tox-lsr@main
48+
```
49+
50+
5. Download the config file to `~/.config/linux-system-roles.json` from
51+
<https://github.com/linux-system-roles/linux-system-roles.github.io/blob/main/download/linux-system-roles.json>
52+
53+
6. Assuming you are in a git clone of a role repo which has a tox.ini file -
54+
you can use e.g.
55+
56+
```bash
57+
tox -e qemu-ansible-core-2.14 -- --image-name centos-9 tests/tests_default.yml
58+
```
59+
60+
There are many command line options and environment variables which can be used
61+
to control the behavior, and you can customize the testenv in tox.ini. See
62+
<https://github.com/linux-system-roles/tox-lsr#qemu-testing>
63+
64+
This method supports RHEL also - will download the latest image for a compose,
65+
and will set up the yum repos to point to internal composes.
66+
67+
See <https://linux-system-roles.github.io/contribute.html> for general
68+
development guidelines.

plans/README-plans.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction CI Testing Plans
22

3-
Linux System Roles CI runs [tmt](https://tmt.readthedocs.io/en/stable/index.html) test plans in [Testing farm](https://docs.testing-farm.io/Testing%20Farm/0.1/index.html) with the [tft.yml](https://github.com/linux-system-roles/template/blob/main/.github/workflows/tft.yml) GitHub workflow.
3+
Linux System Roles CI runs [tmt](https://tmt.readthedocs.io/en/stable/index.html) test plans in [Testing farm](https://docs.testing-farm.io/Testing%20Farm/0.1/index.html) with the [tft.yml](https://github.com/linux-system-roles/hpc/blob/main/.github/workflows/tft.yml) GitHub workflow.
44

55
The `plans/test_playbooks_parallel.fmf` plan is a test plan that runs test playbooks in parallel on multiple managed nodes.
66
`plans/test_playbooks_parallel.fmf` is generated centrally from `https://github.com/linux-system-roles/.github/`.
@@ -16,7 +16,7 @@ The `plans/test_playbooks_parallel.fmf` plan does the following steps:
1616
2. Does the required preparation on systems.
1717
3. For the given role and the given PR, runs the general test from [test.sh](https://github.com/linux-system-roles/tft-tests/blob/main/tests/general/test.sh).
1818

19-
The [tft.yml](https://github.com/linux-system-roles/template/blob/main/.github/workflows/tft.yml) workflow runs the above plan and uploads the results to our Fedora storage for public access.
19+
The [tft.yml](https://github.com/linux-system-roles/hpc/blob/main/.github/workflows/tft.yml) workflow runs the above plan and uploads the results to our Fedora storage for public access.
2020
This workflow uses Testing Farm's Github Action [Schedule tests on Testing Farm](https://github.com/marketplace/actions/schedule-tests-on-testing-farm).
2121

2222
## Running Tests
@@ -47,7 +47,7 @@ You can run tests locally with the `tmt try` cli or remotely in Testing Farm.
4747
$ TESTING_FARM_API_TOKEN=<your_api_token> \
4848
testing-farm request --pipeline-type="tmt-multihost" \
4949
--plan-filter="tag:playbooks_parallel" \
50-
--git-url "https://github.com/<my_user>/template" \
50+
--git-url "https://github.com/<my_user>/hpc" \
5151
--git-ref "<my_branch>" \
5252
--compose CentOS-Stream-9 \
5353
-e "SYSTEM_ROLES_ONLY_TESTS=tests_default.yml" \

0 commit comments

Comments
 (0)