saltext.bmc 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. saltext_bmc-0.0.1/.codecov.yml +25 -0
  2. saltext_bmc-0.0.1/.copier-answers.yml +23 -0
  3. saltext_bmc-0.0.1/.coveragerc +44 -0
  4. saltext_bmc-0.0.1/.envrc.example +7 -0
  5. saltext_bmc-0.0.1/.github/ISSUE_TEMPLATE/bug_report.md +48 -0
  6. saltext_bmc-0.0.1/.github/ISSUE_TEMPLATE/config.yml +14 -0
  7. saltext_bmc-0.0.1/.github/ISSUE_TEMPLATE/docs.md +23 -0
  8. saltext_bmc-0.0.1/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  9. saltext_bmc-0.0.1/.github/ISSUE_TEMPLATE/tech-debt.md +13 -0
  10. saltext_bmc-0.0.1/.github/ISSUE_TEMPLATE.md +11 -0
  11. saltext_bmc-0.0.1/.github/PULL_REQUEST_TEMPLATE.md +24 -0
  12. saltext_bmc-0.0.1/.github/actions/upload-exitstatus/action.yml +32 -0
  13. saltext_bmc-0.0.1/.github/workflows/ci.yml +45 -0
  14. saltext_bmc-0.0.1/.github/workflows/deploy-docs-action.yml +75 -0
  15. saltext_bmc-0.0.1/.github/workflows/deploy-package-action.yml +148 -0
  16. saltext_bmc-0.0.1/.github/workflows/docs-action.yml +51 -0
  17. saltext_bmc-0.0.1/.github/workflows/get-changed-files.yml +53 -0
  18. saltext_bmc-0.0.1/.github/workflows/package-action.yml +44 -0
  19. saltext_bmc-0.0.1/.github/workflows/pr.yml +23 -0
  20. saltext_bmc-0.0.1/.github/workflows/pre-commit-action.yml +49 -0
  21. saltext_bmc-0.0.1/.github/workflows/prepare-release-action.yml +95 -0
  22. saltext_bmc-0.0.1/.github/workflows/push.yml +100 -0
  23. saltext_bmc-0.0.1/.github/workflows/set-resolution-action.yml +41 -0
  24. saltext_bmc-0.0.1/.github/workflows/tag-auto.yml +107 -0
  25. saltext_bmc-0.0.1/.github/workflows/tag.yml +83 -0
  26. saltext_bmc-0.0.1/.github/workflows/test-action.yml +261 -0
  27. saltext_bmc-0.0.1/.gitignore +32 -0
  28. saltext_bmc-0.0.1/.pre-commit-config.yaml +146 -0
  29. saltext_bmc-0.0.1/.pre-commit-hooks/check-cli-examples.py +64 -0
  30. saltext_bmc-0.0.1/.pre-commit-hooks/make-autodocs.py +123 -0
  31. saltext_bmc-0.0.1/.pylintrc +694 -0
  32. saltext_bmc-0.0.1/CHANGELOG.md +21 -0
  33. saltext_bmc-0.0.1/CODE-OF-CONDUCT.md +127 -0
  34. saltext_bmc-0.0.1/CONTRIBUTING.md +14 -0
  35. saltext_bmc-0.0.1/LICENSE +201 -0
  36. saltext_bmc-0.0.1/Makefile +58 -0
  37. saltext_bmc-0.0.1/NOTICE +10 -0
  38. saltext_bmc-0.0.1/PKG-INFO +181 -0
  39. saltext_bmc-0.0.1/README.md +117 -0
  40. saltext_bmc-0.0.1/changelog/.template.jinja +15 -0
  41. saltext_bmc-0.0.1/docs/Makefile +20 -0
  42. saltext_bmc-0.0.1/docs/_ext/saltdomain.py +18 -0
  43. saltext_bmc-0.0.1/docs/_static/.gitkeep +0 -0
  44. saltext_bmc-0.0.1/docs/changelog.md +12 -0
  45. saltext_bmc-0.0.1/docs/conf.py +194 -0
  46. saltext_bmc-0.0.1/docs/index.rst +35 -0
  47. saltext_bmc-0.0.1/docs/make.bat +35 -0
  48. saltext_bmc-0.0.1/docs/ref/.gitkeep +0 -0
  49. saltext_bmc-0.0.1/docs/ref/modules/index.rst +13 -0
  50. saltext_bmc-0.0.1/docs/ref/modules/saltext.bmc.modules.bmc.rst +5 -0
  51. saltext_bmc-0.0.1/docs/ref/modules/saltext.bmc.modules.bmc_redfish.rst +5 -0
  52. saltext_bmc-0.0.1/docs/ref/states/index.rst +12 -0
  53. saltext_bmc-0.0.1/docs/ref/states/saltext.bmc.states.bmc.rst +5 -0
  54. saltext_bmc-0.0.1/docs/ref/utils/index.rst +15 -0
  55. saltext_bmc-0.0.1/docs/ref/utils/saltext.bmc.utils.backend.rst +5 -0
  56. saltext_bmc-0.0.1/docs/ref/utils/saltext.bmc.utils.boot.rst +5 -0
  57. saltext_bmc-0.0.1/docs/ref/utils/saltext.bmc.utils.ipmi.rst +5 -0
  58. saltext_bmc-0.0.1/docs/ref/utils/saltext.bmc.utils.redfish.rst +5 -0
  59. saltext_bmc-0.0.1/docs/sitevars.rst +0 -0
  60. saltext_bmc-0.0.1/docs/topics/installation.md +28 -0
  61. saltext_bmc-0.0.1/noxfile.py +530 -0
  62. saltext_bmc-0.0.1/pyproject.toml +215 -0
  63. saltext_bmc-0.0.1/setup.cfg +4 -0
  64. saltext_bmc-0.0.1/setup.py +5 -0
  65. saltext_bmc-0.0.1/src/saltext/bmc/__init__.py +17 -0
  66. saltext_bmc-0.0.1/src/saltext/bmc/modules/__init__.py +0 -0
  67. saltext_bmc-0.0.1/src/saltext/bmc/modules/bmc.py +229 -0
  68. saltext_bmc-0.0.1/src/saltext/bmc/modules/bmc_redfish.py +126 -0
  69. saltext_bmc-0.0.1/src/saltext/bmc/resources/__init__.py +0 -0
  70. saltext_bmc-0.0.1/src/saltext/bmc/resources/bmc/__init__.py +190 -0
  71. saltext_bmc-0.0.1/src/saltext/bmc/resources/bmc/modules/__init__.py +0 -0
  72. saltext_bmc-0.0.1/src/saltext/bmc/resources/bmc/modules/bmc_host.py +160 -0
  73. saltext_bmc-0.0.1/src/saltext/bmc/resources/bmc/states/__init__.py +0 -0
  74. saltext_bmc-0.0.1/src/saltext/bmc/resources/bmc/states/bmc_host.py +166 -0
  75. saltext_bmc-0.0.1/src/saltext/bmc/states/__init__.py +0 -0
  76. saltext_bmc-0.0.1/src/saltext/bmc/states/bmc.py +180 -0
  77. saltext_bmc-0.0.1/src/saltext/bmc/utils/__init__.py +0 -0
  78. saltext_bmc-0.0.1/src/saltext/bmc/utils/backend.py +437 -0
  79. saltext_bmc-0.0.1/src/saltext/bmc/utils/boot.py +47 -0
  80. saltext_bmc-0.0.1/src/saltext/bmc/utils/ipmi.py +473 -0
  81. saltext_bmc-0.0.1/src/saltext/bmc/utils/redfish.py +370 -0
  82. saltext_bmc-0.0.1/src/saltext/bmc/version.py +1 -0
  83. saltext_bmc-0.0.1/src/saltext.bmc.egg-info/PKG-INFO +181 -0
  84. saltext_bmc-0.0.1/src/saltext.bmc.egg-info/SOURCES.txt +112 -0
  85. saltext_bmc-0.0.1/src/saltext.bmc.egg-info/dependency_links.txt +1 -0
  86. saltext_bmc-0.0.1/src/saltext.bmc.egg-info/entry_points.txt +2 -0
  87. saltext_bmc-0.0.1/src/saltext.bmc.egg-info/not-zip-safe +1 -0
  88. saltext_bmc-0.0.1/src/saltext.bmc.egg-info/requires.txt +43 -0
  89. saltext_bmc-0.0.1/src/saltext.bmc.egg-info/top_level.txt +1 -0
  90. saltext_bmc-0.0.1/tests/__init__.py +0 -0
  91. saltext_bmc-0.0.1/tests/conftest.py +145 -0
  92. saltext_bmc-0.0.1/tests/functional/__init__.py +0 -0
  93. saltext_bmc-0.0.1/tests/functional/conftest.py +150 -0
  94. saltext_bmc-0.0.1/tests/integration/__init__.py +0 -0
  95. saltext_bmc-0.0.1/tests/integration/conftest.py +28 -0
  96. saltext_bmc-0.0.1/tests/unit/__init__.py +0 -0
  97. saltext_bmc-0.0.1/tests/unit/modules/__init__.py +0 -0
  98. saltext_bmc-0.0.1/tests/unit/modules/test_bmc.py +129 -0
  99. saltext_bmc-0.0.1/tests/unit/modules/test_phase_c.py +341 -0
  100. saltext_bmc-0.0.1/tests/unit/states/__init__.py +0 -0
  101. saltext_bmc-0.0.1/tests/unit/states/test_bmc.py +102 -0
  102. saltext_bmc-0.0.1/tests/unit/utils/__init__.py +0 -0
  103. saltext_bmc-0.0.1/tests/unit/utils/test_backend.py +157 -0
  104. saltext_bmc-0.0.1/tests/unit/utils/test_ipmi.py +405 -0
  105. saltext_bmc-0.0.1/tests/unit/utils/test_redfish.py +129 -0
  106. saltext_bmc-0.0.1/tools/helpers/__init__.py +0 -0
  107. saltext_bmc-0.0.1/tools/helpers/cmd.py +290 -0
  108. saltext_bmc-0.0.1/tools/helpers/copier.py +114 -0
  109. saltext_bmc-0.0.1/tools/helpers/git.py +30 -0
  110. saltext_bmc-0.0.1/tools/helpers/pre_commit.py +115 -0
  111. saltext_bmc-0.0.1/tools/helpers/prompt.py +54 -0
  112. saltext_bmc-0.0.1/tools/helpers/venv.py +108 -0
  113. saltext_bmc-0.0.1/tools/initialize.py +26 -0
  114. saltext_bmc-0.0.1/tools/version.py +92 -0
@@ -0,0 +1,25 @@
1
+ ---
2
+ coverage:
3
+ status:
4
+ project:
5
+ default: false
6
+ app:
7
+ informational: true
8
+ paths:
9
+ - src/
10
+ tests:
11
+ informational: true
12
+ paths:
13
+ - tests/
14
+ patch:
15
+ default: false
16
+ app:
17
+ informational: true
18
+ paths:
19
+ - src/
20
+ tests:
21
+ informational: true
22
+ paths:
23
+ - tests/
24
+ github_checks:
25
+ annotations: false
@@ -0,0 +1,23 @@
1
+ # Autogenerated. Do not edit this by hand, use `copier update`.
2
+ ---
3
+ _commit: 048c9ea
4
+ _src_path: gh:salt-extensions/salt-extension-copier
5
+ author: Daniel A. Wozniak
6
+ author_email: dwozniak@broadcom.com
7
+ copyright_begin: 2026
8
+ integration_name: Baseboard Management Controllers
9
+ license: apache
10
+ loaders:
11
+ - module
12
+ - state
13
+ max_python_minor: 14
14
+ max_salt_version: '3008'
15
+ package_name: bmc
16
+ project_name: bmc
17
+ python_requires: '3.10'
18
+ salt_version: '3008'
19
+ source_url: https://github.com/salt-extensions/saltext-bmc
20
+ summary: 'Salt extension for out-of-band server management via Redfish (with IPMI fallback): power, boot-device override, inventory, and sensors.'
21
+ test_containers: false
22
+ tracker_url: https://github.com/salt-extensions/saltext-bmc/issues
23
+ url: https://github.com/salt-extensions/saltext-bmc
@@ -0,0 +1,44 @@
1
+ [run]
2
+ branch = True
3
+ cover_pylib = False
4
+ relative_files = True
5
+ parallel = True
6
+ concurrency = multiprocessing
7
+
8
+ omit =
9
+ .nox/*
10
+ setup.py
11
+
12
+ [report]
13
+ # Regexes for lines to exclude from consideration
14
+ exclude_also =
15
+ # Don't complain about missing debug-only code:
16
+ def __repr__
17
+
18
+ # Don't complain if tests don't hit defensive assertion code:
19
+ raise AssertionError
20
+ raise NotImplementedError
21
+
22
+ # Don't complain if non-runnable code isn't run:
23
+ if 0:
24
+ if False:
25
+ if __name__ == .__main__.:
26
+ if TYPE_CHECKING:
27
+ @(abc\.)?abstractmethod
28
+
29
+ # Add markers which exclude statements in between.
30
+ # Requires coverage>=7.6.0.
31
+ no cover: start(?s:.)*?no cover: stop
32
+
33
+ omit =
34
+ .nox/*
35
+ setup.py
36
+
37
+ ignore_errors = True
38
+
39
+ [paths]
40
+ source =
41
+ saltext/bmc
42
+ src/saltext/bmc
43
+ testsuite =
44
+ tests/
@@ -0,0 +1,7 @@
1
+ layout_saltext() {
2
+ VIRTUAL_ENV="$(python3 tools/initialize.py --print-venv)"
3
+ PATH_add "$VIRTUAL_ENV/bin"
4
+ export VIRTUAL_ENV
5
+ }
6
+
7
+ layout_saltext
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: "[BUG]"
5
+ labels: bug, needs-triage
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Description**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **Setup**
14
+ (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
15
+
16
+ Please be as specific as possible and give set-up details.
17
+
18
+ - [ ] on-prem machine
19
+ - [ ] VM (Virtualbox, KVM, etc. please specify)
20
+ - [ ] VM running on a cloud service, please be explicit and add details
21
+ - [ ] container (Kubernetes, Docker, containerd, etc. please specify)
22
+ - [ ] or a combination, please be explicit
23
+ - [ ] jails if it is FreeBSD
24
+ - [ ] classic packaging
25
+ - [ ] onedir packaging
26
+ - [ ] used bootstrap to install
27
+
28
+
29
+ **Steps to Reproduce the behavior**
30
+ (Include debug logs if possible and relevant)
31
+
32
+ **Expected behavior**
33
+ A clear and concise description of what you expected to happen.
34
+
35
+ **Screenshots**
36
+ If applicable, add screenshots to help explain your problem.
37
+
38
+ **Versions Report**
39
+ <details><summary>salt --versions-report</summary>
40
+ (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
41
+
42
+ ```yaml
43
+ PASTE HERE
44
+ ```
45
+ </details>
46
+
47
+ **Additional context**
48
+ Add any other context about the problem here.
@@ -0,0 +1,14 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Salt Community Slack
4
+ url: https://saltstackcommunity.slack.com/
5
+ about: Please ask and answer questions here.
6
+ - name: Salt-Users Forum
7
+ url: https://groups.google.com/forum/#!forum/salt-users
8
+ about: Please ask and answer questions here.
9
+ - name: Salt on LiberaChat
10
+ url: https://web.libera.chat/#salt
11
+ about: Please ask and answer questions here.
12
+ - name: Security vulnerabilities
13
+ email: saltproject-security.pdl@broadcom.com
14
+ about: Please report security vulnerabilities here.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Docs
3
+ about: Issue related to Salt Documentation
4
+ title: "[DOCS]"
5
+ labels: documentation, needs-triage
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Description**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Suggested Fix**
14
+ What did you expect to see in the documentation that is missing or needs updating?
15
+
16
+ **Type of documentation**
17
+ This could be module documentation or a guide.
18
+
19
+ **Location or format of documentation**
20
+ Insert page URL if applicable.
21
+
22
+ **Additional context**
23
+ Add any other context or screenshots here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: "[FEATURE REQUEST]"
5
+ labels: feature, needs-triage
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: Tech Debt
3
+ about: Issue is related to tech debt. This includes compatibility changes for newer versions of software and OSes that salt interacts with.
4
+ title: "[TECH DEBT]"
5
+ labels: tech-debt
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ### Description of the tech debt to be addressed, include links and screenshots
11
+
12
+ ### Versions Report
13
+ (Provided by running `salt --versions-report`. Please also mention any differences in master/minion versions.)
@@ -0,0 +1,11 @@
1
+ ### Description of Issue
2
+ <!-- Note: Please direct questions to the salt-users google group, Slack, IRC, etc. Only post issues and feature requests here -->
3
+
4
+ ### Setup
5
+ (Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
6
+
7
+ ### Steps to Reproduce Issue
8
+ (Include debug logs if possible and relevant.)
9
+
10
+ ### Versions Report
11
+ (Provided by running `salt --versions-report`. Please also mention any differences in master/minion versions.)
@@ -0,0 +1,24 @@
1
+ ### What does this PR do?
2
+
3
+ ### What issues does this PR fix or reference?
4
+ Fixes:
5
+
6
+ ### Previous Behavior
7
+ Remove this section if not relevant
8
+
9
+ ### New Behavior
10
+ Remove this section if not relevant
11
+
12
+ ### Merge requirements satisfied?
13
+ **[NOTICE] Bug fixes or new features require tests.**
14
+ <!-- Please review the [salt-extensions](https://salt-extensions.github.io/salt-extension-copier/topics/testing/writing.html) and [Salt test documentation](https://docs.saltproject.io/en/master/topics/tutorials/writing_tests.html) for details on how to implement tests for your changes. -->
15
+ - [ ] Docs
16
+ - [ ] Changelog - https://salt-extensions.github.io/salt-extension-copier/topics/documenting/changelog.html#procedure
17
+ - [ ] Tests written/updated
18
+
19
+ ### Commits signed with GPG?
20
+ Yes/No
21
+
22
+ Please review [Salt's Contributing Guide](https://docs.saltproject.io/en/master/topics/development/contributing.html) for best practices.
23
+
24
+ See GitHub's [page on GPG signing](https://help.github.com/articles/signing-commits-using-gpg/) for more information about signing commits with GPG.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: upload-exitstatus
3
+ description: Upload a job's status as an artifact
4
+ inputs:
5
+ artifact_prefix:
6
+ required: false
7
+ default: exitstatus-
8
+ name:
9
+ required: false
10
+ default: ''
11
+
12
+ runs:
13
+ using: composite
14
+
15
+ steps:
16
+
17
+ - name: Set Exit Status
18
+ if: always()
19
+ env:
20
+ OUTFILE: exitstatus/${{ inputs.name == '' && github.job || inputs.name }}
21
+ shell: bash
22
+ run: |
23
+ mkdir exitstatus
24
+ echo "${{ job.status }}" > "$OUTFILE"
25
+
26
+ - name: Upload Exit Status
27
+ if: always()
28
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
29
+ with:
30
+ name: ${{ inputs.artifact_prefix }}${{ inputs.name == '' && github.job || inputs.name }}
31
+ path: exitstatus
32
+ if-no-files-found: error
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: CI
3
+
4
+ on:
5
+ workflow_call:
6
+
7
+ jobs:
8
+ get-changed-files:
9
+ name: Get Changed Files
10
+ uses: ./.github/workflows/get-changed-files.yml
11
+ permissions:
12
+ contents: read
13
+ pull-requests: read # for dorny/paths-filter to read pull requests
14
+
15
+ pre-commit:
16
+ name: Pre-Commit
17
+ needs:
18
+ - get-changed-files
19
+ uses: ./.github/workflows/pre-commit-action.yml
20
+ with:
21
+ changed-files: ${{ needs.get-changed-files.outputs.changed-files }}
22
+ permissions:
23
+ contents: read
24
+
25
+ test:
26
+ name: Test
27
+ needs:
28
+ - pre-commit
29
+ uses: ./.github/workflows/test-action.yml
30
+
31
+ docs:
32
+ name: Docs
33
+ needs:
34
+ - pre-commit
35
+ uses: ./.github/workflows/docs-action.yml
36
+ permissions:
37
+ contents: read
38
+
39
+ build-python-package:
40
+ name: Python Package
41
+ needs:
42
+ - pre-commit
43
+ uses: ./.github/workflows/package-action.yml
44
+ permissions:
45
+ contents: read
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: Publish Documentation
3
+
4
+ on:
5
+ workflow_call:
6
+ inputs:
7
+ # This is the name of the regular artifact that should
8
+ # be transformed into a GitHub Pages deployment.
9
+ artifact-name:
10
+ type: string
11
+ required: false
12
+ default: html-docs
13
+
14
+
15
+ permissions:
16
+ actions: read # For downloading artifacts of other runs when called via workflow_run trigger
17
+ pages: write
18
+ id-token: write
19
+
20
+ jobs:
21
+
22
+ # The released docs are not versioned currently, only the latest ones are deployed.
23
+ #
24
+ # Versioning support would require either (better):
25
+ # * Rebuilding docs for all versions when a new release is made
26
+ # * Version selector support in `furo`: https://github.com/pradyunsg/furo/pull/500
27
+ #
28
+ # or (more basic):
29
+ # * using the `gh-pages` branch and peaceiris/actions-gh-pages
30
+ # to be able to deploy to subdirectories. The implementation via
31
+ # actions/deploy-pages always replaces the directory root.
32
+
33
+ Deploy-Docs-GH-Pages:
34
+ name: Publish Docs to GitHub Pages
35
+
36
+ environment:
37
+ name: github-pages
38
+ url: ${{ steps.deployment.outputs.page_url }}
39
+
40
+ runs-on: ubuntu-24.04
41
+
42
+ steps:
43
+
44
+ - name: Download built docs
45
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
46
+ with:
47
+ name: ${{ inputs.artifact-name }}
48
+ path: html-docs
49
+ github-token: ${{ github.token }}
50
+ run-id: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || github.run_id }}
51
+
52
+ - name: Upload GitHub Pages artifact
53
+ uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
54
+ with:
55
+ name: html-docs-pages
56
+ path: html-docs
57
+
58
+ - name: Deploy to GitHub Pages
59
+ id: deployment
60
+ uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
61
+ with:
62
+ artifact_name: html-docs-pages
63
+
64
+ - name: Delete GitHub Pages artifact
65
+ if: always()
66
+ uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0
67
+ with:
68
+ name: html-docs-pages
69
+ failOnError: false
70
+
71
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
72
+
73
+ - name: Upload Exit Status
74
+ if: always()
75
+ uses: ./.github/actions/upload-exitstatus
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: Release Salt Extension Python Package
3
+
4
+ on:
5
+ workflow_run:
6
+ types:
7
+ - completed
8
+ workflows:
9
+ - Auto PR Releases
10
+ - Tagged Releases
11
+
12
+ jobs:
13
+ get_version:
14
+ name: Get package version
15
+ runs-on: ubuntu-24.04
16
+ if: github.event.workflow_run.conclusion == 'success'
17
+ permissions:
18
+ actions: read
19
+ outputs:
20
+ version: ${{ steps.extract-version.outputs.version }}
21
+
22
+ steps:
23
+ - name: Download expected version
24
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
25
+ with:
26
+ name: version.txt
27
+ path: ${{ runner.temp }}
28
+ github-token: ${{ secrets.GITHUB_TOKEN }}
29
+ run-id: ${{ github.event.workflow_run.id }}
30
+
31
+ - name: Download Python Package Artifacts
32
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
33
+ with:
34
+ name: salt-extension-packages
35
+ path: dist
36
+ github-token: ${{ secrets.GITHUB_TOKEN }}
37
+ run-id: ${{ github.event.workflow_run.id }}
38
+
39
+ - name: Extract and verify package version
40
+ id: extract-version
41
+ run: |-
42
+ wheel_file="$(find dist -name '*.whl' | head -n 1)"
43
+ test -n "$wheel_file" || exit 1
44
+ unzip "$wheel_file" -d "$RUNNER_TEMP/extract"
45
+ dist_info="$(find "$RUNNER_TEMP/extract" -type d -name '*.dist-info' | head -n 1)"
46
+ test -n "$dist_info" || exit 1
47
+ package_version="$(sed -n 's/^Version:\s*\(\S*\)$/\1/p' "$dist_info/METADATA")"
48
+ test -n "$package_version" || exit 1
49
+ expected_version="$(cat "$RUNNER_TEMP/version.txt" | head -n 1)"
50
+ echo "Detected package version: $package_version"
51
+ echo "Expected version: $expected_version"
52
+ test "$package_version" = "$expected_version" || exit 1
53
+ echo "version=$expected_version" >> "$GITHUB_OUTPUT"
54
+
55
+ test_release:
56
+ name: Publish Python Package to Test PyPI
57
+ runs-on: ubuntu-24.04
58
+ needs:
59
+ - get_version
60
+ permissions:
61
+ actions: read
62
+ id-token: write
63
+
64
+ steps:
65
+ - name: Download Python Package Artifacts
66
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
67
+ with:
68
+ name: salt-extension-packages
69
+ path: dist
70
+ github-token: ${{ secrets.GITHUB_TOKEN }}
71
+ run-id: ${{ github.event.workflow_run.id }}
72
+
73
+ - name: Publish distribution to Test PyPI
74
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
75
+ with:
76
+ attestations: ${{ secrets.TEST_PYPI_API_TOKEN == '' }}
77
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
78
+ repository-url: https://test.pypi.org/legacy/
79
+ verbose: ${{ runner.debug == '1' }}
80
+
81
+ pypi_release:
82
+ name: Publish Python Package to PyPI
83
+ runs-on: ubuntu-24.04
84
+ needs:
85
+ - test_release
86
+ permissions:
87
+ actions: read
88
+ id-token: write
89
+ environment:
90
+ name: release
91
+ url: https://pypi.org/p/saltext.bmc
92
+
93
+ steps:
94
+ - name: Download Python Package Artifacts
95
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
96
+ with:
97
+ name: salt-extension-packages
98
+ path: dist
99
+ github-token: ${{ secrets.GITHUB_TOKEN }}
100
+ run-id: ${{ github.event.workflow_run.id }}
101
+
102
+ - name: Publish distribution to PyPI
103
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
104
+ with:
105
+ attestations: ${{ secrets.PYPI_API_TOKEN == '' }}
106
+ password: ${{ secrets.PYPI_API_TOKEN }}
107
+ verbose: ${{ runner.debug == '1' }}
108
+
109
+ docs_release:
110
+ name: Deploy Docs
111
+ uses: ./.github/workflows/deploy-docs-action.yml
112
+ needs:
113
+ - pypi_release
114
+ - get_version
115
+ permissions:
116
+ actions: read
117
+ pages: write
118
+ id-token: write
119
+
120
+ gh_release:
121
+ name: Create GitHub release
122
+ runs-on: ubuntu-24.04
123
+ needs:
124
+ - pypi_release
125
+ - get_version
126
+ permissions:
127
+ actions: read
128
+ contents: write
129
+
130
+ steps:
131
+ - name: Download Python Package Artifacts
132
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
133
+ with:
134
+ name: salt-extension-packages
135
+ path: dist
136
+ github-token: ${{ secrets.GITHUB_TOKEN }}
137
+ run-id: ${{ github.event.workflow_run.id }}
138
+
139
+ - name: Create GitHub Release
140
+ env:
141
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142
+ VERSION: ${{ needs.get_version.outputs.version }}
143
+ run: |
144
+ gh release create "v$VERSION" \
145
+ --repo="$GITHUB_REPOSITORY" \
146
+ --title="${GITHUB_REPOSITORY#*/} $VERSION" \
147
+ --generate-notes \
148
+ dist/*
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: Build Documentation
3
+
4
+ on:
5
+ workflow_call:
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ Docs:
12
+ runs-on: ubuntu-24.04
13
+ timeout-minutes: 10
14
+
15
+ steps:
16
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Set up Python 3.14 For Nox
21
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
22
+ with:
23
+ python-version: "3.14"
24
+
25
+ - name: Install Nox
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ pip install "nox==$NOX_VERSION" "uv==$UV_VERSION"
29
+ env:
30
+ NOX_VERSION: '2026.4.10'
31
+ UV_VERSION: '0.11.7'
32
+
33
+ - name: Install Doc Requirements
34
+ run: |
35
+ nox --force-color -e docs --install-only
36
+
37
+ - name: Build Docs
38
+ env:
39
+ SKIP_REQUIREMENTS_INSTALL: true
40
+ run: |
41
+ nox --force-color -e docs
42
+
43
+ - name: Upload built docs as artifact
44
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
45
+ with:
46
+ name: html-docs
47
+ path: docs/_build/html
48
+
49
+ - name: Upload Exit Status
50
+ if: always()
51
+ uses: ./.github/actions/upload-exitstatus
@@ -0,0 +1,53 @@
1
+ ---
2
+ on:
3
+ workflow_call:
4
+ outputs:
5
+ changed-files:
6
+ description: "Changed file JSON output from dorny/paths-filter"
7
+ value: ${{ jobs.get-changed-files.outputs.changed-files }}
8
+
9
+ permissions:
10
+ contents: read # for dorny/paths-filter to fetch a list of changed files
11
+ pull-requests: read # for dorny/paths-filter to read pull requests
12
+
13
+ jobs:
14
+ get-changed-files:
15
+ name: Get Changed Files
16
+ runs-on: ubuntu-24.04
17
+ outputs:
18
+ changed-files: ${{ toJSON(steps.changed-files.outputs) }}
19
+
20
+ steps:
21
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22
+
23
+ - name: Get Changed Files
24
+ id: changed-files
25
+ uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
26
+ with:
27
+ token: ${{ github.token }}
28
+ list-files: escape
29
+ filters: |-
30
+ repo:
31
+ - added|modified:
32
+ - '**'
33
+ deleted:
34
+ - deleted:
35
+ - '**'
36
+ pre-commit:
37
+ - added|modified|deleted:
38
+ - .pre-commit-hooks/**
39
+ - .pre-commit-config.y?(a)ml
40
+ - .pylintrc
41
+ - pyproject.toml
42
+ # If files in this filter change, a test release to TestPyPI
43
+ # should be attempted. This is currently not implemented yet.
44
+ release:
45
+ - added|modified|deleted:
46
+ - .copier-answers.y?(a)ml
47
+ - .github/workflows/**
48
+ - CHANGELOG.md
49
+ - pyproject.toml
50
+ - setup.py
51
+
52
+ - name: Echo Changed Files Output
53
+ run: echo "${{ toJSON(steps.changed-files.outputs) }}"