Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .config/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
profile: production
warn_list:
- galaxy[version-incorrect] # until collection gets bumped to 1.x.x
- name[casing] # https://github.com/ansible/ansible-lint/issues/4035#issuecomment-2116272270
- galaxy[version-incorrect] # until collection gets bumped to 1.x.x
- name[casing] # https://github.com/ansible/ansible-lint/issues/4035#issuecomment-2116272270
skip_list:
- role-name # Allow underscore prefix in role name for internal role
- var-naming[no-role-prefix] # https://github.com/ansible/ansible-lint/pull/3422#issuecomment-1549584988
- role-name # Allow underscore prefix in role name for internal role
- var-naming[no-role-prefix] # https://github.com/ansible/ansible-lint/pull/3422#issuecomment-1549584988
supported_ansible_also:
- "2.14"
- "2.15"
Expand Down
2 changes: 1 addition & 1 deletion .config/molecule/alternative/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ansible.builtin.file:
path: "{{ __cache_path }}"
state: directory
mode: 0755
mode: "0755"
when: __cache_path is truthy

- name: "Fetch binary"
Expand Down
66 changes: 33 additions & 33 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
---
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
name-template: "$RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
categories:
- title: 'Major Changes'
- title: "Major Changes"
labels:
- 'major' # c6476b
- title: 'Minor Changes'
- "major" # c6476b
- title: "Minor Changes"
labels:
- 'feature' # 006b75
- 'enhancement' # ededed
- 'refactoring'
- title: 'Bugfixes'
- "feature" # 006b75
- "enhancement" # ededed
- "refactoring"
- title: "Bugfixes"
labels:
- 'bug' # fbca04
- title: 'Deprecations'
- "bug" # fbca04
- title: "Deprecations"
labels:
- 'deprecated' # fef2c0
- "deprecated" # fef2c0
exclude-labels:
- 'skip-changelog'
- 'duplicate'
- "skip-changelog"
- "duplicate"
version-resolver:
major:
labels:
- 'major'
- "major"
minor:
labels:
- 'minor'
- 'feature'
- 'enhancement'
- 'refactoring'
- "minor"
- "feature"
- "enhancement"
- "refactoring"
patch:
labels:
- 'patch'
- 'bug'
- 'deprecated'
- "patch"
- "bug"
- "deprecated"
default: patch
autolabeler:
- label: 'skip-changelog'
title: '/chore/i'
- label: 'bug'
title: '/fix/i'
- label: 'enhancement'
title: '/(enhance|improve)/i'
- label: 'feature'
title: '/feature/i'
- label: 'dreprecated'
title: '/deprecat/i'
change-template: '* $TITLE by @$AUTHOR in #$NUMBER'
- label: "skip-changelog"
title: "/chore/i"
- label: "bug"
title: "/fix/i"
- label: "enhancement"
title: "/(enhance|improve)/i"
- label: "feature"
title: "/feature/i"
- label: "dreprecated"
title: "/deprecat/i"
change-template: "* $TITLE by @$AUTHOR in #$NUMBER"
template: |
What's Changed
===
Expand Down
6 changes: 3 additions & 3 deletions .github/version-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
major-labels: ['semver:major', 'major', 'breaking']
minor-labels: ['semver:minor', 'minor', 'enhancement', 'deprecated', 'removed', 'security']
patch-labels: ['semver:patch', 'bug', 'trivial', 'bugfix']
major-labels: ["semver:major", "major", "breaking"]
minor-labels: ["semver:minor", "minor", "enhancement", "deprecated", "removed", "security"]
patch-labels: ["semver:patch", "bug", "trivial", "bugfix"]
23 changes: 12 additions & 11 deletions .github/workflows/ansible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@ jobs:
ansible-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Lint collection
uses: ansible/ansible-lint@5fac056c45595896c973fbde871f01f6cb14d74c # v26.4.0
uses: ansible/ansible-lint@5fac056c45595896c973fbde871f01f6cb14d74c # v26.4.0

arguments-spec-lint:
runs-on: ubuntu-latest
container:
image: quay.io/prometheus/golang-builder:base
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Lint arguments spec
run: ./.github/scripts/lint_arguments_spec.sh

check-unused-variables:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Run action
uses: hoo29/little-timmy@c8ca5086db961499fc3d4e37637f566c3d0ec6d6 # v3-action
uses: hoo29/little-timmy@c8ca5086db961499fc3d4e37637f566c3d0ec6d6 # v3-action

discover-ansible-versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.supported-ansible-versions.outputs.result }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Get Ansible versions that the collection supports
id: supported-ansible-versions
Expand All @@ -72,13 +72,13 @@ jobs:
integration-tests: ${{ steps.set-integration-tests.outputs.tests }}
ansible-roles: ${{ steps.set-ansible-roles.outputs.roles }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0

- name: Fetch current PR labels
id: fetch-labels
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const { owner, repo } = context.repo;
Expand Down Expand Up @@ -114,8 +114,9 @@ jobs:
needs:
- discover-ansible-tests
- discover-ansible-versions
if: needs.discover-ansible-tests.outputs.ansible-roles != '[]' &&
needs.discover-ansible-tests.outputs.ansible-roles != ''
if: |
needs.discover-ansible-tests.outputs.ansible-roles != '[]' &&
needs.discover-ansible-tests.outputs.ansible-roles != ''
with:
role: ${{ matrix.role }}
ansible-core-versions: ${{ needs.discover-ansible-versions.outputs.versions }}
Expand All @@ -129,7 +130,7 @@ jobs:
needs:
- discover-ansible-tests
- discover-ansible-versions
if:
if: |
needs.discover-ansible-tests.outputs.integration-tests != '[]' &&
needs.discover-ansible-tests.outputs.integration-tests != ''
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ansible-test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ jobs:
name: "${{ matrix.targets.name }}-${{ matrix.ansible-core-versions }}"
steps:
- name: "Perform ${{ matrix.targets.test }} integration test with ansible-test"
uses: ansible-community/ansible-test-gh-action@6ded727edb598e670ac056a8e680ca4050bac0a3 # v1.18.0
uses: ansible-community/ansible-test-gh-action@6ded727edb598e670ac056a8e680ca4050bac0a3 # v1.18.0
with:
ansible-core-version: ${{ matrix.ansible-core-versions }}
target-python-version: ${{ matrix.target-python-versions }}
controller-python-version: auto
docker-image: "--docker-privileged" # Workaround because ansible-test action doesn't support setting privileged flag
docker-image: "--docker-privileged" # Workaround because ansible-test action doesn't support setting privileged flag
testing-type: integration
target: ${{ matrix.targets.test }}
coverage: ${{ inputs.coverage }}
ansible-core-github-repository-slug: ${{ contains(fromJson('["stable-2.9", "stable-2.10", "stable-2.11"]'), matrix.ansible-core-versions) &&
'ansible-community/eol-ansible' || 'ansible/ansible' }}
ansible-core-github-repository-slug: ${{ contains(fromJson('["stable-2.9", "stable-2.10", "stable-2.11"]'), matrix.ansible-core-versions) && 'ansible-community/eol-ansible' ||
'ansible/ansible' }}
test-deps: ${{ inputs.test-deps }}
pre-test-cmd: |-
printf '%s\n' '${{ matrix.ansible-core-versions }}' > .ansible-test-core-ref
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ansible-test-molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

name: "${{ inputs.role }}-discover-molecule-scenarios"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0

Expand All @@ -35,8 +35,9 @@ jobs:
uses: ./.github/workflows/ansible-test-integration.yml
needs:
- discover-molecule-scenarios
if: needs.discover-molecule-scenarios.outputs.molecule-tests != '[]' &&
needs.discover-molecule-scenarios.outputs.molecule-tests != ''
if: |
needs.discover-molecule-scenarios.outputs.molecule-tests != '[]' &&
needs.discover-molecule-scenarios.outputs.molecule-tests != ''
with:
targets: ${{ needs.discover-molecule-scenarios.outputs.molecule-tests }}
ansible-core-versions: ${{ inputs.ansible-core-versions }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ansible-test-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
name: "sanity-${{ matrix.ansible-core-versions }}"
steps:
- name: "Perform sanity test with ansible-test"
uses: ansible-community/ansible-test-gh-action@6ded727edb598e670ac056a8e680ca4050bac0a3 # v1.18.0
uses: ansible-community/ansible-test-gh-action@6ded727edb598e670ac056a8e680ca4050bac0a3 # v1.18.0
with:
ansible-core-version: ${{ matrix.ansible-core-versions }}
testing-type: sanity
ansible-core-github-repository-slug: ${{ contains(fromJson('["stable-2.9", "stable-2.10", "stable-2.11"]'), matrix.ansible-core-versions) &&
'ansible-community/eol-ansible' || 'ansible/ansible' }}
ansible-core-github-repository-slug: ${{ contains(fromJson('["stable-2.9", "stable-2.10", "stable-2.11"]'), matrix.ansible-core-versions) && 'ansible-community/eol-ansible' ||
'ansible/ansible' }}
12 changes: 5 additions & 7 deletions .github/workflows/conventional-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ jobs:
- name: "Confirm correct pull request title"
uses: deepakputhraya/action-pr-title@077bddd7bdabd0d2b1b25ed0754c7e62e184d7ee
with:
allowed_prefixes: "breaking,chore,feat,feature,fix,major,minor,enhancement,\
deprecated,removed,security,bug,bugfix,docs,packaging,\
test,refactor,refactoring,skip-release,skip_changelog,patch"
allowed_prefixes: "breaking,chore,feat,feature,fix,major,minor,enhancement,deprecated,removed,security,bug,bugfix,docs,packaging,test,refactor,refactoring,skip-release,skip_changelog,patch"

- name: "Apply label"
if: github.event.pull_request.labels.length == 0
uses: bcoe/conventional-release-labels@886f696738527c7be444262c327c89436dfb95a8 # v1.3.1
uses: bcoe/conventional-release-labels@886f696738527c7be444262c327c89436dfb95a8 # v1.3.1
with:
type_labels: |
{
{
"feature": "enhancement",
"feat": "enhancement",
"fix": "bugfix",
Expand All @@ -47,7 +45,7 @@ jobs:
"skip_changelog": "skip_changelog",
"patch": "trivial",
"chore": "trivial"
}
}

role-label:
runs-on: ubuntu-latest
Expand All @@ -56,7 +54,7 @@ jobs:
pull-requests: write
steps:
- name: Add changed roles labels
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const prNumber = context.issue.number;
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
name: Collection Docs (PR)

concurrency:
group: docs-pr-${{ github.head_ref }}
cancel-in-progress: true

on:
pull_request_target:
types: [opened, synchronize, reopened, closed]
Expand All @@ -18,7 +20,7 @@ jobs:
steps:
- name: Get the latest tag
id: get-latest-tag
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const latestTag = await github.rest.repos.listTags({
Expand All @@ -45,9 +47,7 @@ jobs:
init-html-short-title: Prometheus.Prometheus Collection Docs
init-extra-html-theme-options: |
documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/tag/${{ needs.get-tags.outputs.latest }}
render-file-line:
'> * `$<status>`
[$<path_tail>](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$<path_tail>)'
render-file-line: "> * `$<status>` [$<path_tail>](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$<path_tail>)"

publish-docs-gh-pages:
# for now we won't run this on forks
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- name: PR comment
uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main
with:
body-includes: '## Docs Build'
body-includes: "## Docs Build"
action: ${{ needs.build-docs.outputs.changed != 'true' && 'remove' || '' }}
on-closed-body: |
## Docs Build 📝
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docs-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ on:
branches:
- main
tags:
- '*'
- "*"
# Run CI once per day (at 06:00 UTC)
schedule:
- cron: '0 6 * * *'
- cron: "0 6 * * *"
# Allow manual trigger (for newer antsibull-docs, sphinx-ansible-theme, ... versions)
workflow_dispatch:

jobs:
get-tags:
runs-on: ubuntu-latest
Expand All @@ -23,7 +22,7 @@ jobs:
steps:
- name: Get the latest tag
id: get-latest-tag
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const latestTag = await github.rest.repos.listTags({
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ name: Ansible collection publish
on:
push:
tags:
- '*'
- "*"
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: "Build the collection"
id: build-collection
uses: ansible-community/github-action-build-collection@main

- name: "Upload built collection to release"
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.build-collection.outputs.artifact-filename }}
Expand All @@ -26,6 +25,6 @@ jobs:
overwrite: true

- name: "Publish collection on galaxy"
uses: ansible/ansible-publish-action@a56a0328c92c1d4feedf5bd7f7cf7ec7a4ae3f09 # v1.0.0
uses: ansible/ansible-publish-action@a56a0328c92c1d4feedf5bd7f7cf7ec7a4ae3f09 # v1.0.0
with:
api_key: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
Loading
Loading