Skip to content

Commit

Permalink
fix: Fixed Policy access timeout resource (#32)
Browse files Browse the repository at this point in the history
* fix: Fixed Policy access timeout resource
* fix: Fixed Integration tests and GitHub Workflow
  • Loading branch information
willguibr authored Apr 26, 2024
1 parent 6e6be50 commit 22f485d
Show file tree
Hide file tree
Showing 82 changed files with 610 additions and 816 deletions.
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing

At this time we are not accepting contributions, but we welcome suggestions on how to improve this Collection and feature requests, which can then be added in future releases. These suggestions must be submitted via support ticket using Zscaler support.

~> **NOTE** Pull Requests submitted via this repository will not be responded.

## Zscaler Support

-> **Disclaimer:** Please refer to our [General Support Statement](https://zscaler.github.io/zpacloud-ansible/support.html) before proceeding with the use of this collection. You can also refer to our [troubleshooting guide](https://zscaler.github.io/zpacloud-ansible/troubleshooting.html) for guidance on typical problems.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ jobs:
EOF
shell: bash

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Create release and publish
id: release
uses: cycjimmy/semantic-release-action@v4
Expand All @@ -128,6 +135,7 @@ jobs:
@semantic-release/git@^9.0.0
@semantic-release/exec@^5.0.0
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Store built collection
Expand Down
138 changes: 99 additions & 39 deletions .github/workflows/zpa-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- master
schedule:
- cron: '0 14 * * 1-5' # UTC
- cron: '0 15 * * 1-5' # UTC
workflow_dispatch:

jobs:
Expand All @@ -26,24 +26,42 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry
- name: Install Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: 1.8.2

- name: Get poetry cache directory
id: poetry-cache
run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_OUTPUT

- name: Cache poetry dependencies
uses: actions/cache@v4
with:
path: ${{ steps.poetry-cache.outputs.dir }}
key:
${{ runner.os }}-poetry-${{ matrix.python-version }}-${{
hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-${{ matrix.python-version }}-
- name: Install dependencies
run: poetry install

- name: Install Ansible
run: pip install ansible

- name: Install collection from Galaxy
run: ansible-galaxy collection install zscaler.zpacloud

- name: Install dependencies
run: poetry install

- name: Run tests with retry
uses: nick-fields/retry@v3
with:
Expand All @@ -70,14 +88,35 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry
- name: Install Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: 1.8.2

- name: Get poetry cache directory
id: poetry-cache
run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_OUTPUT

- name: Cache poetry dependencies
uses: actions/cache@v4
with:
path: ${{ steps.poetry-cache.outputs.dir }}
key:
${{ runner.os }}-poetry-${{ matrix.python-version }}-${{
hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-${{ matrix.python-version }}-
- name: Install dependencies
run: poetry install

- name: Install Ansible
run: pip install ansible
Expand Down Expand Up @@ -114,39 +153,60 @@ jobs:
- ZPA_PROD_TENANT01
environment: ${{ matrix.environment }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry
uses: Gr1N/setup-poetry@v9

- name: Install Ansible
run: pip install ansible

- name: Install collection from Galaxy
run: ansible-galaxy collection install zscaler.zpacloud

- name: Install dependencies
run: poetry install

- name: Run tests with retry
uses: nick-fields/retry@v3
with:
max_attempts: 3
timeout_minutes: 30
command: poetry run ansible-playbook tests/integration/run_all_tests.yml
env:
ZPA_CLIENT_ID: ${{ secrets.ZPA_CLIENT_ID }}
ZPA_CLIENT_SECRET: ${{ secrets.ZPA_CLIENT_SECRET }}
ZPA_CUSTOMER_ID: ${{ secrets.ZPA_CUSTOMER_ID }}
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }}
OKTA_CLIENT_ORGURL: ${{ secrets.OKTA_CLIENT_ORGURL }}
OKTA_CLIENT_TOKEN: ${{ secrets.OKTA_CLIENT_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: Gr1N/setup-poetry@v9
with:
poetry-version: 1.8.2

- name: Get poetry cache directory
id: poetry-cache
run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_OUTPUT

- name: Cache poetry dependencies
uses: actions/cache@v4
with:
path: ${{ steps.poetry-cache.outputs.dir }}
key:
${{ runner.os }}-poetry-${{ matrix.python-version }}-${{
hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-${{ matrix.python-version }}-
- name: Install dependencies
run: poetry install

- name: Install Ansible
run: pip install ansible

- name: Install collection from Galaxy
run: ansible-galaxy collection install zscaler.zpacloud

- name: Install dependencies
run: poetry install

- name: Run tests with retry
uses: nick-fields/retry@v3
with:
max_attempts: 3
timeout_minutes: 30
command: poetry run ansible-playbook tests/integration/run_all_tests.yml
env:
ZPA_CLIENT_ID: ${{ secrets.ZPA_CLIENT_ID }}
ZPA_CLIENT_SECRET: ${{ secrets.ZPA_CLIENT_SECRET }}
ZPA_CUSTOMER_ID: ${{ secrets.ZPA_CUSTOMER_ID }}
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }}
OKTA_CLIENT_ORGURL: ${{ secrets.OKTA_CLIENT_ORGURL }}
OKTA_CLIENT_TOKEN: ${{ secrets.OKTA_CLIENT_TOKEN }}
needs:
- zpa-qa1-tenants
- zpa-beta-tenants
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ python_version := $(shell \
docs: ## Build collection documentation
rm -rf antsibull
mkdir antsibull
poetry add sphinx_ansible_theme
poetry run pip install -r docs/dev_requirements.txt
poetry run antsibull-docs collection --use-current --dest-dir antsibull --no-indexes zscaler.zpacloud
mkdir -p docs/source/modules
mv antsibull/collections/zscaler/zpacloud/* docs/source/modules
Expand Down Expand Up @@ -98,7 +98,6 @@ reqs: ## Recreate the requirements.txt file

install:
rm -f zscaler*
pip3 install -r requirements.txt
ansible-galaxy collection build . --force
ansible-galaxy collection install zscaler* --force
rm -f zscaler*
Expand Down
144 changes: 0 additions & 144 deletions docs/contributing.md

This file was deleted.

Loading

0 comments on commit 22f485d

Please sign in to comment.