Skip to content

Commit c47a8a8

Browse files
authored
Merge pull request #172 from opsmill/develop
Pre-release 1.4.0
2 parents f6b4727 + 7851148 commit c47a8a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2654
-2685
lines changed

.ansible-lint

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
---
2+
profile: production
3+
24
exclude_paths:
3-
- .github/
4-
- changelogs/changelog.yaml
5+
- .cache/ # implicit unless exclude_paths is defined in config
6+
- .venv/
7+
- .github/
8+
- tests/
9+
- docs/node_modules/
10+
11+
skip_list:
12+
- args[module]
13+
- no-handler
14+
- yaml[key-duplicates]
15+
- yaml[line-length]
16+
17+
offline: false

.github/workflows/trigger-pr-develop.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ jobs:
1414
linter:
1515
uses: ./.github/workflows/workflow-linter.yml
1616

17-
tests:
18-
needs: ["linter"]
19-
uses: ./.github/workflows/workflow-tests.yml
17+
ansible_linter_and_tests:
18+
uses: ./.github/workflows/workflow-ansible-linter-and-tests.yml

.github/workflows/trigger-pr-stable.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ jobs:
1111
linter:
1212
uses: ./.github/workflows/workflow-linter.yml
1313

14-
tests:
15-
needs: ["linter"]
16-
uses: ./.github/workflows/workflow-tests.yml
14+
ansible_linter_and_tests:
15+
uses: ./.github/workflows/workflow-ansible-linter-and-tests.yml
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
# yamllint disable rule:truthy
3+
name: "Push Docs on stable"
4+
5+
on:
6+
push:
7+
branches:
8+
- stable
9+
paths:
10+
- 'docs/docs/**'
11+
- 'docs/sidebars.ts'
12+
13+
jobs:
14+
sync_docs:
15+
uses: ./.github/workflows/workflow-sync-docs.yml
16+
secrets: inherit

.github/workflows/trigger-push-stable.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
- stable
99
paths-ignore:
1010
- 'docs/**'
11-
- 'CHANGELOG.rst'
12-
- 'changelogs/**'
1311

1412
jobs:
1513
check_commit:
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# yamllint disable rule:truthy
3+
name: "Run Sanity, Unit & Integration Tests"
4+
on:
5+
workflow_call:
6+
inputs:
7+
runs-on:
8+
description: "The OS to run the job on"
9+
required: false
10+
default: "ubuntu-22.04"
11+
type: string
12+
13+
workflow_dispatch:
14+
inputs:
15+
runs-on:
16+
description: "The OS to run the job on"
17+
required: false
18+
default: "ubuntu-22.04"
19+
type: string
20+
21+
schedule:
22+
- cron: '0 0 * * *'
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}-ansible
26+
cancel-in-progress: true
27+
28+
jobs:
29+
build-import:
30+
uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main
31+
ansible-lint:
32+
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
33+
sanity:
34+
uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
35+
# unit-galaxy:
36+
# uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
37+
# unit-source:
38+
# uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
39+
# with:
40+
# collection_pre_install: >-
41+
# git+https://github.com/ansible-collections/ansible.utils.git
42+
43+
all_green:
44+
if: ${{ always() }}
45+
needs:
46+
- sanity
47+
- ansible-lint
48+
# - unit-galaxy
49+
# - unit-source
50+
runs-on: ubuntu-22.04
51+
steps:
52+
- run: >-
53+
python -c "assert 'failure' not in
54+
set([
55+
'${{ needs.sanity.result }}',
56+
'${{ needs.ansible-lint.result }}'
57+
])"

.github/workflows/workflow-changelog-and-docs.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# yamllint disable rule:truthy
3-
name: "Update Changelog & Documentation"
3+
name: "Update Documentation"
44

55
on:
66
workflow_call:
@@ -10,9 +10,9 @@ on:
1010
type: string
1111

1212
jobs:
13-
generate_changelog:
13+
generate_docs:
1414
runs-on: "ubuntu-22.04"
15-
name: "Create Changelog and Docs"
15+
name: "Create Docs"
1616
steps:
1717
- uses: actions/checkout@v4
1818
with:
@@ -24,33 +24,26 @@ jobs:
2424
with:
2525
python-version: "3.11"
2626

27-
- name: Install antsibull-changelog, antsichaut
28-
run: python -m pip install toml invoke --disable-pip-version-check
27+
- name: "Install Poetry"
28+
uses: "snok/install-poetry@v1"
29+
with:
30+
version: 1.8.5
31+
virtualenvs-create: true
32+
virtualenvs-in-project: true
33+
installer-parallel: true
34+
35+
- name: Install dependencies
36+
run: poetry install --with dev
2937

3038
- name: "Generate Docs"
3139
run: "invoke generate-doc"
3240

33-
- name: Sync folders
34-
run: |
35-
rm -rf target-repo/docs/docs-ansible/*
36-
rm -f target-repo/docs/sidebars-ansible.ts
37-
cp -r source-repo/docs/docs/* target-repo/docs/docs-ansible/
38-
cp source-repo/docs/sidebars.ts target-repo/docs/sidebars-ansible.ts
39-
cd target-repo
40-
git config user.name github-actions
41-
git config user.email [email protected]
42-
git add .
43-
if ! (git diff --quiet && git diff --staged --quiet); then
44-
git commit -m "Sync docs from infrahub-ansible repo"
45-
git push
46-
fi
47-
48-
- name: commit changelog and docs
41+
- name: commit docs
4942
uses: github-actions-x/[email protected]
5043
with:
5144
github-token: ${{ secrets.GH_INFRAHUB_BOT_TOKEN }}
5245
push-branch: 'stable'
53-
commit-message: 'chore: update changelog & docs'
46+
commit-message: 'chore: update docs'
5447
files: docs/
5548
name: opsmill-bot
5649

.github/workflows/workflow-linter.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
type: string
1212

1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
14+
group: ${{ github.workflow }}-${{ github.ref }}-linter
1515
cancel-in-progress: true
1616

1717
env:
@@ -45,14 +45,6 @@ jobs:
4545
steps:
4646
- name: "Check out repository code"
4747
uses: "actions/checkout@v4"
48-
- name: "Identify which files have changed"
49-
uses: dorny/paths-filter@v3
50-
id: changes
51-
with:
52-
filters: |
53-
src:
54-
- '**.yml'
55-
- '**.yaml'
5648
- name: "Setup environment"
5749
run: "pip install yamllint==${{ env.YAMLLINT_VERSION }}"
5850
- name: "Linting: yamllint"
@@ -96,23 +88,12 @@ jobs:
9688
- name: "Linting: ruff format"
9789
run: "poetry run ruff format --check --diff ."
9890

99-
ansible-lint:
100-
name: ansible-lint
101-
runs-on: "ubuntu-22.04"
102-
steps:
103-
- uses: actions/checkout@v4
104-
with:
105-
fetch-depth: 0
106-
107-
- name: Run ansible-lint
108-
uses: ansible/ansible-lint-action@v6
109-
11091
documentation-lint:
11192
defaults:
11293
run:
11394
working-directory: ./docs
11495
if: needs.files-changed.outputs.documentation == 'true'
115-
needs: ["files-changed", "yaml-lint", "python-lint"]
96+
needs: ["files-changed", "python-lint"]
11697
runs-on: "ubuntu-22.04"
11798
timeout-minutes: 5
11899
steps:
@@ -134,7 +115,7 @@ jobs:
134115
run: "invoke docusaurus"
135116

136117
validate-documentation-style:
137-
needs: ["files-changed", "yaml-lint", "python-lint"]
118+
needs: ["files-changed", "python-lint"]
138119
runs-on: "ubuntu-22.04"
139120
timeout-minutes: 5
140121
steps:

.github/workflows/sync-docs.yml renamed to .github/workflows/workflow-sync-docs.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
# yamllint disable rule:truthy rule:truthy rule:line-length
33
name: Sync Docs Folders
44
on:
5-
push:
6-
branches:
7-
- stable
8-
paths:
9-
- 'docs/docs/**'
10-
- 'docs/sidebars.ts'
5+
workflow_call:
6+
inputs:
7+
version:
8+
required: true
9+
type: string
1110

1211
jobs:
1312
sync:

.github/workflows/workflow-tests.yml

Lines changed: 0 additions & 114 deletions
This file was deleted.

.yamllint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
extends: default
33

4-
ignore: |
5-
/.venv
6-
/examples
7-
/tests/**
4+
ignore:
5+
- .venv
6+
- examples
7+
- tests/**
8+
- docs/node_modules/**
89

910
rules:
10-
new-lines: disable
1111
comments-indentation: disable
1212
comments:
1313
# Changed this to stop a mess between linters from Prettier (vscode) to yamllint

0 commit comments

Comments
 (0)