Skip to content

Commit

Permalink
Merge pull request #667 from Checkmk/devel
Browse files Browse the repository at this point in the history
Release 5.3.0
  • Loading branch information
robin-checkmk authored Oct 9, 2024
2 parents 1c9f628 + eb87803 commit 20d6d7a
Show file tree
Hide file tree
Showing 105 changed files with 4,670 additions and 249 deletions.
2 changes: 1 addition & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exclude_paths:
# requirements, like avoiding python identifiers. To disable add `var-naming`
# to skip_list.
# var_naming_pattern: "^[a-z_][a-z0-9_]*$"
var_naming_pattern: "^checkmk_(server|agent|var)_.*$"
var_naming_pattern: "^(__)?checkmk_(server|agent|var)_.*$"

use_default_rules: true
# Load custom rules from this specific folder
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-activation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:
push:
paths:
- 'plugins/modules/activation.py'
- '.github/workflows/ans-int-test-activation.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-bakery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/bakery.py'
- '.github/workflows/ans-int-test-bakery.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-contact_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/contact_group.py'
- '.github/workflows/ans-int-test-contact_group.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-discovery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/discovery.py'
- '.github/workflows/ans-int-test-discovery.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-downtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/downtime.py'
- '.github/workflows/ans-int-test-downtime.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-folder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/folder.py'
- '.github/workflows/ans-int-test-folder.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/host.py'
- '.github/workflows/ans-int-test-host.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-host_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/host_group.py'
- '.github/workflows/ans-int-test-host_group.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-lkp-bakery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/lookup/bakery.py'
- '.github/workflows/ans-int-test-lkp-bakery.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-lkp-folder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
push:
paths:
- 'plugins/lookup/folder.py'
- '.github/workflows/ans-int-test-lkp-folder.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-lkp-folders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
push:
paths:
- 'plugins/lookup/folders.py'
- '.github/workflows/ans-int-test-lkp-folders.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-lkp-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
push:
paths:
- 'plugins/lookup/host.py'
- '.github/workflows/ans-int-test-lkp-host.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-lkp-hosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
push:
paths:
- 'plugins/lookup/hosts.py'
- '.github/workflows/ans-int-test-lkp-hosts.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-lkp-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
paths:
- 'plugins/lookup/rule.py'
- 'plugins/lookup/rules.py'
- '.github/workflows/ans-int-test-lkp-rules.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-lkp-rulesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
paths:
- 'plugins/lookup/ruleset.py'
- 'plugins/lookup/rulesets.py'
- '.github/workflows/ans-int-test-lkp-rulesets.yaml'

jobs:

Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/ans-int-test-lkp-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# README:
# - When changing the module name, it needs to be changed in 'env:MODULE_NAME' and in 'on:pull_requests:path'!
#
# Resources:
# - Template for this file: https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml
# - About Ansible integration tests: https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html

env:
NAMESPACE: checkmk
COLLECTION_NAME: general
MODULE_NAME: lookup_site

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

name: Ansible Integration Tests for Site Lookup Module
on:
workflow_dispatch:
pull_request:
branches:
- main
- devel
paths:
- 'plugins/lookup/site.py'
push:
paths:
- 'plugins/lookup/site.py'
- '.github/workflows/ans-int-test-lkp-site.yaml'

jobs:

integration:
runs-on: ubuntu-22.04
name: Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.15
- stable-2.16
- stable-2.17
- devel
python:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
exclude:
# Exclude unsupported sets.
- ansible: stable-2.15
python: '3.12'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Provide secrets file
run: echo "${{ secrets.CHECKMK_DOWNLOAD_PW }}" > ./tests/integration/files/.dl-secret
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
env:
CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }}

- name: Run integration test
run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
76 changes: 76 additions & 0 deletions .github/workflows/ans-int-test-lkp-sites.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# README:
# - When changing the module name, it needs to be changed in 'env:MODULE_NAME' and in 'on:pull_requests:path'!
#
# Resources:
# - Template for this file: https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml
# - About Ansible integration tests: https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html

env:
NAMESPACE: checkmk
COLLECTION_NAME: general
MODULE_NAME: lookup_sites

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

name: Ansible Integration Tests for Sites Lookup Module
on:
workflow_dispatch:
pull_request:
branches:
- main
- devel
paths:
- 'plugins/lookup/sites.py'
push:
paths:
- 'plugins/lookup/sites.py'
- '.github/workflows/ans-int-test-lkp-sites.yaml'

jobs:

integration:
runs-on: ubuntu-22.04
name: Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.15
- stable-2.16
- stable-2.17
- devel
python:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
exclude:
# Exclude unsupported sets.
- ansible: stable-2.15
python: '3.12'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Provide secrets file
run: echo "${{ secrets.CHECKMK_DOWNLOAD_PW }}" > ./tests/integration/files/.dl-secret
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
env:
CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }}

- name: Run integration test
run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-lkp-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/lookup/version.py'
- '.github/workflows/ans-int-test-lkp-version.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-password.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/password.py'
- '.github/workflows/ans-int-test-password.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/rule.py'
- '.github/workflows/ans-int-test-rule.yaml'

jobs:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ans-int-test-service_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
push:
paths:
- 'plugins/modules/service_group.py'
- '.github/workflows/ans-int-test-service_group.yaml'

jobs:

Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/ans-int-test-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# README:
# - When changing the module name, it needs to be changed in 'env:MODULE_NAME' and in 'on:pull_requests:path'!
#
# Resources:
# - Template for this file: https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml
# - About Ansible integration tests: https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html

env:
NAMESPACE: checkmk
COLLECTION_NAME: general
MODULE_NAME: site

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

name: Ansible Integration Tests for Site Management Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
- devel
paths:
- 'plugins/modules/site.py'
push:
paths:
- 'plugins/modules/site.py'
- '.github/workflows/ans-int-test-site.yaml'

jobs:

integration:
runs-on: ubuntu-22.04
name: Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.15
- stable-2.16
- stable-2.17
- devel
python:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
exclude:
# Exclude unsupported sets.
- ansible: stable-2.15
python: '3.12'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Provide secrets file
run: echo "${{ secrets.CHECKMK_DOWNLOAD_PW }}" > ./tests/integration/files/.dl-secret
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
env:
CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }}

- name: Run integration test
run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
Loading

0 comments on commit 20d6d7a

Please sign in to comment.