-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Added Ansible Sanity best practices (#26)
* feat: Applied Ansible best practices * Fix: Applied several Ansible sanity best practices * fix: Added ansible-test.sanity
- Loading branch information
Showing
141 changed files
with
4,744 additions
and
3,542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: sanity | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sanity: | ||
timeout-minutes: 30 | ||
name: Sanity (Ⓐ$${{ matrix.versions.ansible }}) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
versions: | ||
- ansible: stable-2.15 | ||
python: "3.10" | ||
- ansible: stable-2.16 | ||
python: "3.11" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Perform testing | ||
uses: ansible-community/ansible-test-gh-action@release/v1 | ||
with: | ||
ansible-core-version: ${{ matrix.versions.ansible }} | ||
origin-python-version: ${{ matrix.versions.python }} | ||
target-python-version: ${{ matrix.versions.python }} | ||
testing-type: sanity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
- name: Install pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ansible | ||
- name: Create release artifacts | ||
run: | | ||
ansible-galaxy collection build | ||
ansible-galaxy collection publish *.tar.gz --api-key ${{ secrets.GALAXY_API_KEY }} | ||
- name: Release artifacts to GitHub | ||
run: | | ||
gh release upload $TAG ./zscaler-ziacloud*.tar.gz | ||
env: | ||
TAG: ${{ github.event.release.tag_name }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload to Ansible Automation Hub | ||
run: | | ||
cat << EOF > ansible.cfg | ||
[galaxy] | ||
server_list = automation_hub | ||
[galaxy_server.automation_hub] | ||
url=https://console.redhat.com/api/automation-hub/content/inbound-zscaler/ | ||
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token | ||
token=$AAP_KEY | ||
EOF | ||
ansible-galaxy collection publish ./zscaler-ziacloud*.tar.gz | ||
env: | ||
AAP_KEY: ${{ secrets.AAP_KEY }} |
Oops, something went wrong.