From 6b3d9843c66cad6ec7a5a2b48b36a2755aadaeb6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 24 Sep 2024 11:48:06 +0000 Subject: [PATCH 001/125] chore(release): 2.20.0 ## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-24) ### Features * Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) * Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) ### Bug Fixes * Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) * new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) * requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) * **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) * **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) --- CHANGELOG.md | 17 +++++++++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9677e6ede..a045e4060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-24) + + +### Features + +* Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) +* Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) + + +### Bug Fixes + +* Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) +* new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) +* requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) +* **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) +* **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) + ### [2.21.2](https://github.com/PaloAltoNetworks/pan-os-ansible/compare/v2.21.1...v2.21.2) (2024-09-19) diff --git a/docs/source/index.rst b/docs/source/index.rst index 326740995..e6532a4bc 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.21.2 +Version: 2.20.0 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index 964d6271a..de3d4e5e7 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.21.2 +version: 2.20.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From 046d6559d9deb875d22d129c2fc5026bc2dc868f Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 07:59:34 +0300 Subject: [PATCH 002/125] ci: disable galaxy release for testing --- .github/do-release.sh | 4 ++-- .github/workflows/ci.yml | 48 ++++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/do-release.sh b/.github/do-release.sh index 37156abef..6bece72cf 100755 --- a/.github/do-release.sh +++ b/.github/do-release.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash ansible-galaxy collection build -ansible-galaxy collection publish paloaltonetworks-panos-* --server release_galaxy -ansible-galaxy collection publish paloaltonetworks-panos-* --server automation_hub \ No newline at end of file +# ansible-galaxy collection publish paloaltonetworks-panos-* --server release_galaxy +# ansible-galaxy collection publish paloaltonetworks-panos-* --server automation_hub diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90747566e..3231a92ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,30 +144,30 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # This task could be removed once the task below is confirmed working - - name: Set up Galaxy auth - run: | - mkdir -p ~/.ansible - echo "token: $GALAXY_API_KEY" > ~/.ansible/galaxy_token - env: - GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }} - shell: bash - - # New task for combined Galaxy and AutomationHub publishing - - name: Set up Automation Hub and Galaxy ansible.cfg file - run: | - cat << EOF > ansible.cfg - [galaxy] - server_list = automation_hub, release_galaxy - [galaxy_server.automation_hub] - url=${{ secrets.AUTOMATION_HUB_URL }} - auth_url=${{ secrets.AUTOMATION_HUB_SSO_URL }} - token=${{ secrets.AUTOMATION_HUB_API_TOKEN }} - [galaxy_server.release_galaxy] - url=https://galaxy.ansible.com/ - token=${{ secrets.GALAXY_API_KEY }} - EOF - shell: bash + # # This task could be removed once the task below is confirmed working + # - name: Set up Galaxy auth + # run: | + # mkdir -p ~/.ansible + # echo "token: $GALAXY_API_KEY" > ~/.ansible/galaxy_token + # env: + # GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }} + # shell: bash + + # # New task for combined Galaxy and AutomationHub publishing + # - name: Set up Automation Hub and Galaxy ansible.cfg file + # run: | + # cat << EOF > ansible.cfg + # [galaxy] + # server_list = automation_hub, release_galaxy + # [galaxy_server.automation_hub] + # url=${{ secrets.AUTOMATION_HUB_URL }} + # auth_url=${{ secrets.AUTOMATION_HUB_SSO_URL }} + # token=${{ secrets.AUTOMATION_HUB_API_TOKEN }} + # [galaxy_server.release_galaxy] + # url=https://galaxy.ansible.com/ + # token=${{ secrets.GALAXY_API_KEY }} + # EOF + # shell: bash - name: Create release and publish id: release From bad2a9617cba43088947ba9cccfe4091bab85686 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 08:01:22 +0300 Subject: [PATCH 003/125] ci: ansible ee image --- .github/workflows/ee.yml | 171 +++++++++++++++++++++++++++++++++++++++ pyproject.toml | 7 ++ 2 files changed, 178 insertions(+) create mode 100644 .github/workflows/ee.yml diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml new file mode 100644 index 000000000..0f53604d8 --- /dev/null +++ b/.github/workflows/ee.yml @@ -0,0 +1,171 @@ +name: Ansible EE Image + +on: + workflow_dispatch: + # push: + # branches: + # - develop + # tags: + # - 'v*' + release: + types: [published] # TODO need to replace with push tag 'v*' as docker image metadata semver relies on this + # TODO do similar to upgrade assurance, check CI workflow and if release is success.. + +env: + NAMESPACE: paloaltonetworks + COLLECTION_NAME: panos + PYTHON_VERSION: 3.9 + + +jobs: + build: + name: Build and Publish Ansible EE + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: check out code + uses: actions/checkout@v4 + with: + path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + - name: discover Python version + id: pyversion + uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + - name: install Python + uses: actions/setup-python@v4 + with: + python-version: ${{ steps.pyversion.outputs.pyversion }} + cache: pip + + - name: install Poetry + uses: Gr1N/setup-poetry@v8 + + - name: prep Poetry venv + run: | + poetry env use ${{ steps.pyversion.outputs.pyversion }} + poetry lock + poetry install --with ansible-ee --without dev --no-root + working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + - name: set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # TODO might need to use the ref or edge type as well for develop branch tagging.. + # TODO latest should only be tagged for release versions + - name: determine docker tags and labels + id: meta + uses: docker/metadata-action@v5 + with: + context: git # this ensures to reference the current git context instead of workflow context (context info ref/sha) + images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + tags: | + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} + + # TODO we should take pan-os-ansible from galaxy for a release BUT what about develop branch?? + # https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 + # TRY OUT dynamically creating EE. Or we can make dynamic for develop and use static file for release? + - name: Build collection + run: | + ansible-galaxy collection build --output-path ../../../ + working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + - name: Create files for building execution environment + run: | + COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)" + + # EE config + cat > execution-environment.yml <=2.15.0rc2,<2.16 + ansible_runner: + package_pip: ansible-runner + system: | + git-core [platform:rpm] + python3.9-devel [platform:rpm compile] + libcurl-devel [platform:rpm compile] + sshpass [platform:rpm] + rsync [platform:rpm] + epel-release [platform:rpm] + unzip [platform:rpm] + galaxy: requirements.yml + python: requirements.txt + + additional_build_files: + - src: ${COLLECTION_FILENAME} + dest: src + - src: requirements.txt + dest: src + + additional_build_steps: + append_base: + - RUN $PYCMD -m pip install -U pip + append_final: + # SymLink `python` -> `python3.9` + - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 + EOF + echo "::group::execution-environment.yml" + cat execution-environment.yml + echo "::endgroup::" + + # Collection Requirements + cat > requirements.yml < requirements.txt <=0.12"] build-backend = "poetry.masonry.api" \ No newline at end of file From e2742b35bead88d29055b9b546c2159b599c728c Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 08:15:06 +0300 Subject: [PATCH 004/125] ci: ee default working dir --- .github/workflows/ee.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 0f53604d8..3723a9aff 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -24,6 +24,11 @@ jobs: permissions: contents: read packages: write + + defaults: + run: + working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + steps: - name: check out code uses: actions/checkout@v4 @@ -33,7 +38,7 @@ jobs: - name: discover Python version id: pyversion uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 - working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: install Python uses: actions/setup-python@v4 @@ -49,7 +54,7 @@ jobs: poetry env use ${{ steps.pyversion.outputs.pyversion }} poetry lock poetry install --with ansible-ee --without dev --no-root - working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -73,7 +78,7 @@ jobs: - name: Build collection run: | ansible-galaxy collection build --output-path ../../../ - working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: Create files for building execution environment run: | @@ -146,12 +151,14 @@ jobs: echo "::group::requirements.txt" cat requirements.txt echo "::endgroup::" + working-directory: . - name: create execution env context run: | poetry run ansible-builder create -v 3 --output-filename Dockerfile # poetry run ansible-builder create -f meta/execution-environment.yml -v 3 --output-filename Dockerfile ls -l ./context/ + working-directory: . - name: login to GHCR uses: docker/login-action@v3 From b9834c0f68aadae5fdd60962572f28bd83f159d7 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 08:38:15 +0300 Subject: [PATCH 005/125] ci: ee discover python locally --- .github/workflows/ee.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 3723a9aff..2e72ce397 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -37,8 +37,12 @@ jobs: - name: discover Python version id: pyversion - uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 - # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + shell: bash + run: | + PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') + echo "pyver=$PYVER" >> $GITHUB_OUTPUT + # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline - name: install Python uses: actions/setup-python@v4 From eb56c7d5e07430bf05a62a521d9e2d6bc971d859 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 08:41:37 +0300 Subject: [PATCH 006/125] ci: ee fix pyversion output --- .github/workflows/ee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 2e72ce397..8d865fc8d 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -40,7 +40,7 @@ jobs: shell: bash run: | PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') - echo "pyver=$PYVER" >> $GITHUB_OUTPUT + echo "pyversion=$PYVER" >> $GITHUB_OUTPUT # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline From 976e1c406c66e81cdec2350f97c6105835175bff Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 08:56:13 +0300 Subject: [PATCH 007/125] ci: docker context --- .github/workflows/ee.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 8d865fc8d..352c6fbc2 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -14,7 +14,7 @@ on: env: NAMESPACE: paloaltonetworks COLLECTION_NAME: panos - PYTHON_VERSION: 3.9 + PYTHON_VERSION: 3.9 # TODO do we need this, as we take it from pyproject.yml ? jobs: @@ -69,7 +69,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - context: git # this ensures to reference the current git context instead of workflow context (context info ref/sha) + context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible tags: | type=semver,pattern=v{{version}} From fc2abe4a6921b7f5a4c8de93082ef054e2631e90 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 09:26:37 +0300 Subject: [PATCH 008/125] ci: ansible build context --- .github/workflows/ee.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 352c6fbc2..9b9aad4b3 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -159,7 +159,7 @@ jobs: - name: create execution env context run: | - poetry run ansible-builder create -v 3 --output-filename Dockerfile + poetry run -C ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} ansible-builder create -v 3 --output-filename Dockerfile # poetry run ansible-builder create -f meta/execution-environment.yml -v 3 --output-filename Dockerfile ls -l ./context/ working-directory: . @@ -174,7 +174,7 @@ jobs: - name: build and publish uses: docker/build-push-action@v5 with: - context: "./context/" + context: "../../../context/" push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 53e205728db55c184737611c42a6da745d88ff2b Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 10:12:21 +0300 Subject: [PATCH 009/125] ci: docker image ref tag --- .github/workflows/ee.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 9b9aad4b3..665ca8c33 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -75,6 +75,8 @@ jobs: type=semver,pattern=v{{version}} type=semver,pattern=v{{major}}.{{minor}} type=semver,pattern=v{{major}} + type=ref,event=branch + type=ref,event=tag # TODO we should take pan-os-ansible from galaxy for a release BUT what about develop branch?? # https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 From fe7984d9363bd5472b7d5064751871c4b3da9c4a Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 10:23:51 +0300 Subject: [PATCH 010/125] ci: docker set context --- .github/workflows/ee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 665ca8c33..bb5bcd84d 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -176,7 +176,7 @@ jobs: - name: build and publish uses: docker/build-push-action@v5 with: - context: "../../../context/" + context: "./context/" push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From bc5a9ee674edeb03007e1193f10f363520f511ff Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 10:43:06 +0300 Subject: [PATCH 011/125] ci: ee yml bash escape PYCMD --- .github/workflows/ee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index bb5bcd84d..467a091cf 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -126,7 +126,7 @@ jobs: additional_build_steps: append_base: - - RUN $PYCMD -m pip install -U pip + - RUN \$PYCMD -m pip install -U pip append_final: # SymLink `python` -> `python3.9` - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 From d7880000ad06fdff14b6064e39a02573b6f3dd7d Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 11:29:36 +0300 Subject: [PATCH 012/125] ci: ee fix requirements format and debugging --- .github/workflows/ee.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 467a091cf..a92d1865c 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -150,7 +150,6 @@ jobs: # Python Requirements cat > requirements.txt < Date: Wed, 25 Sep 2024 11:50:45 +0300 Subject: [PATCH 013/125] ci: ee debugging build requirements.txt --- .github/workflows/ee.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index a92d1865c..8e92b41eb 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -164,6 +164,7 @@ jobs: # poetry run ansible-builder create -f meta/execution-environment.yml -v 3 --output-filename Dockerfile ls -l ./context/ ls -l ./context/_build/src/ + cat ./context/_build/src/requirements.txt cat ./context/Dockerfile working-directory: . From 334b1aebafd3e1b86dc0f87e7328426ded991bca Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 11:57:33 +0300 Subject: [PATCH 014/125] ci: ee debugging build requirements.txt --- .github/workflows/ee.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 8e92b41eb..5ef035b9e 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -89,6 +89,7 @@ jobs: - name: Create files for building execution environment run: | COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)" + COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" # EE config cat > execution-environment.yml < Date: Wed, 25 Sep 2024 12:15:15 +0300 Subject: [PATCH 015/125] ci: ee prepend builder copy requirements.txt --- .github/workflows/ee.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 5ef035b9e..e49f53549 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -128,6 +128,8 @@ jobs: additional_build_steps: append_base: - RUN \$PYCMD -m pip install -U pip + prepend_builder: + - COPY _build/src/requirements.txt src/requirements.txt append_final: # SymLink `python` -> `python3.9` - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 From db7f91e71f18e2b1b1127ea52e9f7aa300076d52 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 12:51:17 +0300 Subject: [PATCH 016/125] ci: ee run on push to develop --- .github/workflows/ee.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index e49f53549..04961d412 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -2,9 +2,9 @@ name: Ansible EE Image on: workflow_dispatch: - # push: - # branches: - # - develop + push: + branches: + - develop # tags: # - 'v*' release: @@ -63,7 +63,6 @@ jobs: - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 - # TODO might need to use the ref or edge type as well for develop branch tagging.. # TODO latest should only be tagged for release versions - name: determine docker tags and labels id: meta From b13d36493291f79552dcc375467e03384eca8a61 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 12:57:14 +0300 Subject: [PATCH 017/125] chore: commit to trigger EE --- .github/workflows/ee.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 04961d412..07c975af7 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -163,7 +163,6 @@ jobs: - name: create execution env context run: | poetry run -C ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} ansible-builder create -v 3 --output-filename Dockerfile - # poetry run ansible-builder create -f meta/execution-environment.yml -v 3 --output-filename Dockerfile ls -l ./context/ ls -l ./context/_build/src/ cat ./context/_build/src/requirements.txt From 6a5d76084a9600fbf6005630a943a4552965c057 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 14:20:58 +0300 Subject: [PATCH 018/125] ci: release image build job --- .github/workflows/ee.yml | 191 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 177 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 07c975af7..849ad02f5 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -2,14 +2,16 @@ name: Ansible EE Image on: workflow_dispatch: - push: - branches: - - develop + # push: + # branches: + # - develop # tags: # - 'v*' - release: - types: [published] # TODO need to replace with push tag 'v*' as docker image metadata semver relies on this - # TODO do similar to upgrade assurance, check CI workflow and if release is success.. + # release: + # types: [published] + workflow_run: + workflows: ['CI'] + types: completed env: NAMESPACE: paloaltonetworks @@ -19,8 +21,10 @@ env: jobs: build: - name: Build and Publish Ansible EE + name: Build and Publish Ansible EE for development runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'refs/heads/develop' + permissions: contents: read packages: write @@ -63,27 +67,22 @@ jobs: - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 - # TODO latest should only be tagged for release versions - - name: determine docker tags and labels + - name: determine docker tags and labels for development image id: meta uses: docker/metadata-action@v5 with: context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible tags: | - type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} - type=semver,pattern=v{{major}} type=ref,event=branch type=ref,event=tag # TODO we should take pan-os-ansible from galaxy for a release BUT what about develop branch?? # https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 # TRY OUT dynamically creating EE. Or we can make dynamic for develop and use static file for release? - - name: Build collection + - name: Build collection from development branch run: | ansible-galaxy collection build --output-path ../../../ - # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: Create files for building execution environment run: | @@ -185,3 +184,167 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + + + release_build: + name: Build and Publish Ansible EE for release + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.jobs[*].name, 'release') + # (( github.event.workflow_run.head_branch == 'refs/heads/develop') || + # contains(github.event.workflow_run.jobs[*].name, 'release')) + # NOTE what if we make a release from develop branch? dont worry it would make both develop and alpha images I suppose..:) + + permissions: + contents: read + packages: write + + defaults: + run: + working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + steps: + - name: check out code + uses: actions/checkout@v4 + with: + path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + - name: discover Python version + id: pyversion + shell: bash + run: | + PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') + echo "pyversion=$PYVER" >> $GITHUB_OUTPUT + # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline + + - name: install Python + uses: actions/setup-python@v4 + with: + python-version: ${{ steps.pyversion.outputs.pyversion }} + cache: pip + + - name: install Poetry + uses: Gr1N/setup-poetry@v8 + + - name: prep Poetry venv + run: | + poetry env use ${{ steps.pyversion.outputs.pyversion }} + poetry lock + poetry install --with ansible-ee --without dev --no-root + + - name: set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: get version for release image + id: tag + run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + + # TODO latest should only be tagged for release versions + - name: determine docker tags and labels for release image + id: meta + uses: docker/metadata-action@v5 + with: + context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) + images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + tags: | + type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + + - name: Create files for building execution environment + run: | + COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" + + # EE config + cat > execution-environment.yml <=2.15.0rc2,<2.16 + ansible_runner: + package_pip: ansible-runner + system: | + git-core [platform:rpm] + python3.9-devel [platform:rpm compile] + libcurl-devel [platform:rpm compile] + sshpass [platform:rpm] + rsync [platform:rpm] + epel-release [platform:rpm] + unzip [platform:rpm] + galaxy: requirements.yml + python: requirements.txt + + additional_build_files: + - src: ${COLLECTION_PIP_REQUIREMENTS} + dest: src + + additional_build_steps: + append_base: + - RUN \$PYCMD -m pip install -U pip + prepend_builder: + - COPY _build/src/requirements.txt src/requirements.txt + append_final: + # SymLink `python` -> `python3.9` + - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 + EOF + echo "::group::execution-environment.yml" + cat execution-environment.yml + echo "::endgroup::" + + # Collection Requirements + cat > requirements.yml < requirements.txt < Date: Wed, 25 Sep 2024 15:45:10 +0300 Subject: [PATCH 019/125] ci: debug workflow_run gh event --- .github/workflows/ee.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 849ad02f5..d79c7f73b 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -9,7 +9,7 @@ on: # - 'v*' # release: # types: [published] - workflow_run: + workflow_run: # NOTE workflow runs from default branch.. workflows: ['CI'] types: completed @@ -23,7 +23,7 @@ jobs: build: name: Build and Publish Ansible EE for development runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'refs/heads/develop' + # if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'refs/heads/develop' permissions: contents: read @@ -34,6 +34,14 @@ jobs: working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: + - name: debug github event + id: tag + run: | + echo "github event: ${{ github.event }}" + echo "github event workflow_run: ${{github.event.workflow_run}}" + echo "github event workflow_run head: ${{github.event.workflow_run.head_branch}}" + exit 1 + - name: check out code uses: actions/checkout@v4 with: From e6a7af02cc3ef4be488d08c03cc129d275999feb Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 15:58:02 +0300 Subject: [PATCH 020/125] ci: debug workflow_run gh event --- .github/workflows/ee.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index d79c7f73b..40a35e4ed 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -23,7 +23,7 @@ jobs: build: name: Build and Publish Ansible EE for development runs-on: ubuntu-latest - # if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'refs/heads/develop' + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'develop' permissions: contents: read @@ -34,13 +34,13 @@ jobs: working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: - - name: debug github event - id: tag - run: | - echo "github event: ${{ github.event }}" - echo "github event workflow_run: ${{github.event.workflow_run}}" - echo "github event workflow_run head: ${{github.event.workflow_run.head_branch}}" - exit 1 + # - name: debug github event + # id: tag + # run: | + # echo "github event: ${{ github.event }}" + # echo "github event workflow_run: ${{github.event.workflow_run}}" + # echo "github event workflow_run head: ${{github.event.workflow_run.head_branch}}" + # exit 1 - name: check out code uses: actions/checkout@v4 From 40a3922b2a61faba9692df52472d72c14bfb1ff5 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 16:16:37 +0300 Subject: [PATCH 021/125] ci: ee disable provenance --- .github/workflows/ee.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 40a35e4ed..041e2de20 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -192,6 +192,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + provenance: false release_build: From 97c31ba43cba71ee3d695ccac698d3beed01bf2c Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 16:25:44 +0300 Subject: [PATCH 022/125] feat: ee ci for development --- .github/workflows/ee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 041e2de20..ddc308f33 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -192,7 +192,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - provenance: false + provenance: false # disabled to keep number of images low for development branches release_build: From c3d2498fc3aa08aee64e43bc05aa38b942c7ad7d Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 25 Sep 2024 13:36:53 +0000 Subject: [PATCH 023/125] chore(release): 2.20.0 ## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-25) ### Features * Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) * Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) * ee ci for development ([97c31ba](https://github.com/alperenkose/pan-os-ansible/commit/97c31ba43cba71ee3d695ccac698d3beed01bf2c)) ### Bug Fixes * Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) * new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) * requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) * **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) * **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a045e4060..075a854db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-25) + + +### Features + +* Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) +* Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) +* ee ci for development ([97c31ba](https://github.com/alperenkose/pan-os-ansible/commit/97c31ba43cba71ee3d695ccac698d3beed01bf2c)) + + +### Bug Fixes + +* Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) +* new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) +* requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) +* **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) +* **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) + ## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-24) From 0542e564acbc2acd01dd20e9e2da83f1eee8501c Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 16:42:37 +0300 Subject: [PATCH 024/125] feat: test ee ci for release --- SUPPORT.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SUPPORT.md b/SUPPORT.md index 874c2abf1..ce311f954 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -6,3 +6,4 @@ As of version 2.12.2, this Collection of Ansible Modules for PAN-OS is [certified on Ansible Automation Hub](https://console.redhat.com/ansible/automation-hub/repo/published/paloaltonetworks/panos) and officially supported for Ansible subscribers. Ansible subscribers can engage for support through their usual route towards Red Hat. + From a7605af5ffb09e3a7ddf2f564deaef727c2fcded Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 16:42:37 +0300 Subject: [PATCH 025/125] feat: test ee ci for release --- SUPPORT.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SUPPORT.md b/SUPPORT.md index 874c2abf1..ce311f954 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -6,3 +6,4 @@ As of version 2.12.2, this Collection of Ansible Modules for PAN-OS is [certified on Ansible Automation Hub](https://console.redhat.com/ansible/automation-hub/repo/published/paloaltonetworks/panos) and officially supported for Ansible subscribers. Ansible subscribers can engage for support through their usual route towards Red Hat. + From 1caaec087ae2758d2ee9e35ec71599c4c28dce24 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 25 Sep 2024 13:48:41 +0000 Subject: [PATCH 026/125] chore(release): 2.20.0 ## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-25) ### Features * Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) * Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) * ee ci for development ([97c31ba](https://github.com/alperenkose/pan-os-ansible/commit/97c31ba43cba71ee3d695ccac698d3beed01bf2c)) * test ee ci for release ([a7605af](https://github.com/alperenkose/pan-os-ansible/commit/a7605af5ffb09e3a7ddf2f564deaef727c2fcded)) ### Bug Fixes * Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) * new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) * requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) * **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) * **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 075a854db..b85697125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,25 @@ ## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-25) +### Features + +* Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) +* Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) +* ee ci for development ([97c31ba](https://github.com/alperenkose/pan-os-ansible/commit/97c31ba43cba71ee3d695ccac698d3beed01bf2c)) +* test ee ci for release ([a7605af](https://github.com/alperenkose/pan-os-ansible/commit/a7605af5ffb09e3a7ddf2f564deaef727c2fcded)) + + +### Bug Fixes + +* Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) +* new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) +* requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) +* **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) +* **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) + +## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-25) + + ### Features * Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) From d79a97b240e13a8af91f685790bec0676ef7bb2b Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 17:13:45 +0300 Subject: [PATCH 027/125] fix: temp disable sanity tests --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3231a92ea..bbcf2fa3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,10 +24,10 @@ jobs: include: - ansible: "2.15" python_ver: "3.11" - - ansible: "2.16" - python_ver: "3.11" - - ansible: "2.17" - python_ver: "3.11" + # - ansible: "2.16" TODO temp disabled to speed up testing + # python_ver: "3.11" + # - ansible: "2.17" + # python_ver: "3.11" runs-on: ubuntu-latest defaults: run: From aa86c1db84e1a5cf835d3671ee2d73e536af2e31 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 25 Sep 2024 14:27:22 +0000 Subject: [PATCH 028/125] chore(release): 2.23.0 ## [2.23.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.22.0...v2.23.0) (2024-09-25) ### Features * test ee ci for release ([0542e56](https://github.com/alperenkose/pan-os-ansible/commit/0542e564acbc2acd01dd20e9e2da83f1eee8501c)) ### Bug Fixes * temp disable sanity tests ([d79a97b](https://github.com/alperenkose/pan-os-ansible/commit/d79a97b240e13a8af91f685790bec0676ef7bb2b)) --- CHANGELOG.md | 12 ++++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b85697125..3e1564404 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## [2.23.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.22.0...v2.23.0) (2024-09-25) + + +### Features + +* test ee ci for release ([0542e56](https://github.com/alperenkose/pan-os-ansible/commit/0542e564acbc2acd01dd20e9e2da83f1eee8501c)) + + +### Bug Fixes + +* temp disable sanity tests ([d79a97b](https://github.com/alperenkose/pan-os-ansible/commit/d79a97b240e13a8af91f685790bec0676ef7bb2b)) + ## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-25) diff --git a/docs/source/index.rst b/docs/source/index.rst index e6532a4bc..a85d58704 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.20.0 +Version: 2.23.0 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index de3d4e5e7..7f0652395 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.20.0 +version: 2.23.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From 9c92e00661a162d7f80684ab26916b5fc99894cf Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 25 Sep 2024 18:42:10 +0300 Subject: [PATCH 029/125] fix: debug release image --- .github/workflows/ee.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index ddc308f33..88a6b2e86 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -198,7 +198,7 @@ jobs: release_build: name: Build and Publish Ansible EE for release runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.jobs[*].name, 'release') + # if: github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.jobs[*].name, 'release') # (( github.event.workflow_run.head_branch == 'refs/heads/develop') || # contains(github.event.workflow_run.jobs[*].name, 'release')) # NOTE what if we make a release from develop branch? dont worry it would make both develop and alpha images I suppose..:) @@ -212,6 +212,12 @@ jobs: working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: + # TODO DEBUG github.event.workflow_run.jobs[*].name + - name: Echo workflow_run attributes + run: | + echo "workflow_run attributes: ${{ toJSON(github.event.workflow_run) }}" + exit 1 + - name: check out code uses: actions/checkout@v4 with: From 6871fc3c1d21215c939de806a448b93c8529e960 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 11:27:38 +0300 Subject: [PATCH 030/125] fix: check release job for release build --- .github/workflows/ee.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 88a6b2e86..9f04ec11d 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -198,9 +198,7 @@ jobs: release_build: name: Build and Publish Ansible EE for release runs-on: ubuntu-latest - # if: github.event.workflow_run.conclusion == 'success' && contains(github.event.workflow_run.jobs[*].name, 'release') - # (( github.event.workflow_run.head_branch == 'refs/heads/develop') || - # contains(github.event.workflow_run.jobs[*].name, 'release')) + if: github.event.workflow_run.conclusion == 'success' # NOTE what if we make a release from develop branch? dont worry it would make both develop and alpha images I suppose..:) permissions: @@ -212,11 +210,21 @@ jobs: working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: - # TODO DEBUG github.event.workflow_run.jobs[*].name + - name: Echo workflow_run attributes run: | echo "workflow_run attributes: ${{ toJSON(github.event.workflow_run) }}" - exit 1 + + - name: Proceed if release job from CI workflow succeeded + run: | + curl -L \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + ${{ github.event.workflow_run.jobs_url }} > jobs.json + conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') + echo ${conclusion} + [[ ${conclusion} == "success" ]] - name: check out code uses: actions/checkout@v4 From 60c83245afd1cdd79fc74924d16383f2e5959e4d Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 11:32:20 +0300 Subject: [PATCH 031/125] fix: remove debug --- .github/workflows/ee.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 9f04ec11d..e866fb83f 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -211,10 +211,6 @@ jobs: steps: - - name: Echo workflow_run attributes - run: | - echo "workflow_run attributes: ${{ toJSON(github.event.workflow_run) }}" - - name: Proceed if release job from CI workflow succeeded run: | curl -L \ From 14db5fde5d9679ffce09fac89e3528d7321c7049 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 26 Sep 2024 08:35:09 +0000 Subject: [PATCH 032/125] chore(release): 2.23.1 ### [2.23.1](https://github.com/alperenkose/pan-os-ansible/compare/v2.23.0...v2.23.1) (2024-09-26) ### Bug Fixes * check release job for release build ([6871fc3](https://github.com/alperenkose/pan-os-ansible/commit/6871fc3c1d21215c939de806a448b93c8529e960)) * debug release image ([9c92e00](https://github.com/alperenkose/pan-os-ansible/commit/9c92e00661a162d7f80684ab26916b5fc99894cf)) * remove debug ([60c8324](https://github.com/alperenkose/pan-os-ansible/commit/60c83245afd1cdd79fc74924d16383f2e5959e4d)) --- CHANGELOG.md | 9 +++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e1564404..5dc5864dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +### [2.23.1](https://github.com/alperenkose/pan-os-ansible/compare/v2.23.0...v2.23.1) (2024-09-26) + + +### Bug Fixes + +* check release job for release build ([6871fc3](https://github.com/alperenkose/pan-os-ansible/commit/6871fc3c1d21215c939de806a448b93c8529e960)) +* debug release image ([9c92e00](https://github.com/alperenkose/pan-os-ansible/commit/9c92e00661a162d7f80684ab26916b5fc99894cf)) +* remove debug ([60c8324](https://github.com/alperenkose/pan-os-ansible/commit/60c83245afd1cdd79fc74924d16383f2e5959e4d)) + ## [2.23.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.22.0...v2.23.0) (2024-09-25) diff --git a/docs/source/index.rst b/docs/source/index.rst index a85d58704..10d1c183c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.23.0 +Version: 2.23.1 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index 7f0652395..7547535f3 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.23.0 +version: 2.23.1 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From cb10ef9f3703aec013655aec787d67c97f5d8956 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 11:48:29 +0300 Subject: [PATCH 033/125] fix: work dir --- .github/workflows/ee.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index e866fb83f..870ae2f51 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -221,6 +221,7 @@ jobs: conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') echo ${conclusion} [[ ${conclusion} == "success" ]] + working-directory: . - name: check out code uses: actions/checkout@v4 From 5503279edc3acba8417acd47dea8019e17a10e09 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 13:34:02 +0300 Subject: [PATCH 034/125] feat: new ee ci --- .github/workflows/ee.yml | 78 ++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 870ae2f51..cf1294bb4 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -2,16 +2,16 @@ name: Ansible EE Image on: workflow_dispatch: - # push: - # branches: - # - develop + push: + branches: + - develop # tags: # - 'v*' - # release: - # types: [published] - workflow_run: # NOTE workflow runs from default branch.. - workflows: ['CI'] - types: completed + release: + types: [published] + # workflow_run: # NOTE workflow runs from default branch.. + # workflows: ['CI'] + # types: completed env: NAMESPACE: paloaltonetworks @@ -19,11 +19,38 @@ env: PYTHON_VERSION: 3.9 # TODO do we need this, as we take it from pyproject.yml ? + # one job can run on push to develop branch or on manual workflow_dispatch ? + # and other job can run on release published (hoping release happens after being published to galaxy..) + jobs: - build: - name: Build and Publish Ansible EE for development + + rc: + name: check if we have a change that requires an EE + runs-on: ubuntu-latest + if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' + outputs: + rc: ${{ steps.rc.outputs.new_release_published }} + + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: rc check + id: rc + uses: cycjimmy/semantic-release-action@v4 + with: + dry_run: true + semantic_version: 17.1.1 + extra_plugins: | + conventional-changelog-conventionalcommits@^4.4.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build_dev_ee: + name: Development Ansible EE runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'develop' + needs: rc + if: needs.rc.outputs.rc == 'true' permissions: contents: read @@ -194,11 +221,10 @@ jobs: cache-to: type=gha,mode=max provenance: false # disabled to keep number of images low for development branches - - release_build: - name: Build and Publish Ansible EE for release + build_release_ee: + name: Release Ansible EE runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' + if: github.event_name == 'release' && github.event.action == 'published' # NOTE what if we make a release from develop branch? dont worry it would make both develop and alpha images I suppose..:) permissions: @@ -211,17 +237,17 @@ jobs: steps: - - name: Proceed if release job from CI workflow succeeded - run: | - curl -L \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - ${{ github.event.workflow_run.jobs_url }} > jobs.json - conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') - echo ${conclusion} - [[ ${conclusion} == "success" ]] - working-directory: . + # - name: Proceed if release job from CI workflow succeeded + # run: | + # curl -L \ + # -H "Accept: application/vnd.github+json" \ + # -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + # -H "X-GitHub-Api-Version: 2022-11-28" \ + # ${{ github.event.workflow_run.jobs_url }} > jobs.json + # conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') + # echo ${conclusion} + # [[ ${conclusion} == "success" ]] + # working-directory: . - name: check out code uses: actions/checkout@v4 From 18f0103cd604030c468d56e0440819470609bade Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 13:38:00 +0300 Subject: [PATCH 035/125] fix: new ee ci --- .github/workflows/ee.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index cf1294bb4..46ccaba38 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -43,6 +43,7 @@ jobs: semantic_version: 17.1.1 extra_plugins: | conventional-changelog-conventionalcommits@^4.4.0 + @semantic-release/git@^9.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9b3d9e463cef4cad91ce5d2216e0af2da2921705 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:02:51 +0300 Subject: [PATCH 036/125] feat: refactor ee ci --- .github/workflows/ci.yml | 39 +++++++++++++++++++++ .github/workflows/ee.yml | 73 +++++++++++++++++++++++----------------- 2 files changed, 82 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbcf2fa3f..825ac25bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -257,3 +257,42 @@ jobs: branch: gh-pages folder: docs/html clean: true + + rc: + name: check if we have a change that requires an EE + runs-on: ubuntu-latest + needs: [sanity, tox, lint, format] + if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') + outputs: + rc: ${{ steps.rc.outputs.new_release_published }} + + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: rc check + id: rc + uses: cycjimmy/semantic-release-action@v4 + with: + dry_run: true + semantic_version: 17.1.1 + extra_plugins: | + conventional-changelog-conventionalcommits@^4.4.0 + @semantic-release/git@^9.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build_dev_ee: + name: Development Ansible EE + runs-on: ubuntu-latest + needs: rc + if: needs.rc.outputs.rc == 'true' + uses: ./.github/workflows/ee.yml + + build_prod_ee: + name: Release Ansible EE + runs-on: ubuntu-latest + needs: release + uses: ./.github/workflows/ee.yml + with: + release: true diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 46ccaba38..9c9da6455 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -1,14 +1,25 @@ name: Ansible EE Image on: + workflow_call: + inputs: + release: + description: EE for a release or development + type: boolean + default: false workflow_dispatch: - push: - branches: - - develop + inputs: + release: + description: EE for a release or development + type: boolean + default: false + # push: + # branches: + # - develop # tags: # - 'v*' - release: - types: [published] + # release: + # types: [published] # workflow_run: # NOTE workflow runs from default branch.. # workflows: ['CI'] # types: completed @@ -24,34 +35,35 @@ env: jobs: - rc: - name: check if we have a change that requires an EE - runs-on: ubuntu-latest - if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' - outputs: - rc: ${{ steps.rc.outputs.new_release_published }} - - steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: rc check - id: rc - uses: cycjimmy/semantic-release-action@v4 - with: - dry_run: true - semantic_version: 17.1.1 - extra_plugins: | - conventional-changelog-conventionalcommits@^4.4.0 - @semantic-release/git@^9.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # rc: + # name: check if we have a change that requires an EE + # runs-on: ubuntu-latest + # if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' + # outputs: + # rc: ${{ steps.rc.outputs.new_release_published }} + + # steps: + # - name: checkout code + # uses: actions/checkout@v4 + + # - name: rc check + # id: rc + # uses: cycjimmy/semantic-release-action@v4 + # with: + # dry_run: true + # semantic_version: 17.1.1 + # extra_plugins: | + # conventional-changelog-conventionalcommits@^4.4.0 + # @semantic-release/git@^9.0.0 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build_dev_ee: name: Development Ansible EE runs-on: ubuntu-latest - needs: rc - if: needs.rc.outputs.rc == 'true' + if: !inputs.release + # needs: rc + # if: needs.rc.outputs.rc == 'true' permissions: contents: read @@ -225,7 +237,8 @@ jobs: build_release_ee: name: Release Ansible EE runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' + if: inputs.release + # if: github.event_name == 'release' && github.event.action == 'published' # NOTE what if we make a release from develop branch? dont worry it would make both develop and alpha images I suppose..:) permissions: From a6459cb6f26a7095088d8dd63a250f7378fd2a00 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:09:14 +0300 Subject: [PATCH 037/125] fix: refactor ee ci --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 825ac25bf..6facd14f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -259,7 +259,7 @@ jobs: clean: true rc: - name: check if we have a change that requires an EE + name: Check rc EE runs-on: ubuntu-latest needs: [sanity, tox, lint, format] if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') @@ -283,15 +283,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build_dev_ee: - name: Development Ansible EE - runs-on: ubuntu-latest + name: dev_ee needs: rc if: needs.rc.outputs.rc == 'true' uses: ./.github/workflows/ee.yml build_prod_ee: - name: Release Ansible EE - runs-on: ubuntu-latest + name: release_ee needs: release uses: ./.github/workflows/ee.yml with: From fee0c4b8164d2dddc63f309eb00fe943c4622fc7 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:14:15 +0300 Subject: [PATCH 038/125] fix: refactor ee ci --- .github/workflows/ee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 9c9da6455..2f30b3019 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -61,7 +61,7 @@ jobs: build_dev_ee: name: Development Ansible EE runs-on: ubuntu-latest - if: !inputs.release + if: inputs.release == 'false' # needs: rc # if: needs.rc.outputs.rc == 'true' From 20c6b9743815bbefd4ed75188888e27a1f3f38c3 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:20:37 +0300 Subject: [PATCH 039/125] fix: refactor ee ci --- .github/workflows/ci.yml | 10 +++++++--- .github/workflows/ee.yml | 23 ----------------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6facd14f7..5f4a1510d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -275,10 +275,14 @@ jobs: uses: cycjimmy/semantic-release-action@v4 with: dry_run: true - semantic_version: 17.1.1 + semantic_version: 19.0 extra_plugins: | - conventional-changelog-conventionalcommits@^4.4.0 - @semantic-release/git@^9.0.0 + conventional-changelog-conventionalcommits@^5.0.0 + @semantic-release/git@^10.0.1 + # semantic_version: 17.1.1 + # extra_plugins: | + # conventional-changelog-conventionalcommits@^4.4.0 + # @semantic-release/git@^9.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 2f30b3019..af9de0354 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -35,29 +35,6 @@ env: jobs: - # rc: - # name: check if we have a change that requires an EE - # runs-on: ubuntu-latest - # if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' - # outputs: - # rc: ${{ steps.rc.outputs.new_release_published }} - - # steps: - # - name: checkout code - # uses: actions/checkout@v4 - - # - name: rc check - # id: rc - # uses: cycjimmy/semantic-release-action@v4 - # with: - # dry_run: true - # semantic_version: 17.1.1 - # extra_plugins: | - # conventional-changelog-conventionalcommits@^4.4.0 - # @semantic-release/git@^9.0.0 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - build_dev_ee: name: Development Ansible EE runs-on: ubuntu-latest From 760462ec6ec3bd94f8ce8e01f2e043bb1ba7ddc2 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:46:45 +0300 Subject: [PATCH 040/125] fix: refactor ee ci --- .github/workflows/ci.yml | 12 +- .github/workflows/ee.yml | 473 +++++++++++++++++++++++++-------------- 2 files changed, 306 insertions(+), 179 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f4a1510d..c286bed14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -275,14 +275,12 @@ jobs: uses: cycjimmy/semantic-release-action@v4 with: dry_run: true - semantic_version: 19.0 + semantic_version: 17.1.1 extra_plugins: | - conventional-changelog-conventionalcommits@^5.0.0 - @semantic-release/git@^10.0.1 - # semantic_version: 17.1.1 - # extra_plugins: | - # conventional-changelog-conventionalcommits@^4.4.0 - # @semantic-release/git@^9.0.0 + conventional-changelog-conventionalcommits@^4.4.0 + @semantic-release/changelog@^5.0.1 + @semantic-release/git@^9.0.0 + @semantic-release/exec@^5.0.00 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index af9de0354..b863d9fe3 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -35,12 +35,10 @@ env: jobs: - build_dev_ee: - name: Development Ansible EE + build_ee: + name: Ansible EE runs-on: ubuntu-latest - if: inputs.release == 'false' - # needs: rc - # if: needs.rc.outputs.rc == 'true' + # if: inputs.release == 'false' permissions: contents: read @@ -87,7 +85,6 @@ jobs: poetry env use ${{ steps.pyversion.outputs.pyversion }} poetry lock poetry install --with ansible-ee --without dev --no-root - # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -101,20 +98,35 @@ jobs: tags: | type=ref,event=branch type=ref,event=tag + if: ${{ inputs.release == 'false' }} - # TODO we should take pan-os-ansible from galaxy for a release BUT what about develop branch?? - # https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 - # TRY OUT dynamically creating EE. Or we can make dynamic for develop and use static file for release? + - name: get version for release image + id: tag + run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + if: inputs.release + + # TODO latest should only be tagged for release versions + - name: determine docker tags and labels for release image + id: meta + uses: docker/metadata-action@v5 + with: + context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) + images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + tags: | + type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + if: inputs.release + + # NOTE we should take pan-os-ansible from galaxy for a release, but use build for develop + # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 - name: Build collection from development branch run: | ansible-galaxy collection build --output-path ../../../ + if: ${{ inputs.release == 'false' }} - - name: Create files for building execution environment + - name: create base EE file run: | - COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)" - COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" - - # EE config cat > execution-environment.yml < `python3.9` - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 + + EOF + working-directory: . + + - name: append build files to EE file for development + run: | + COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)" + COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" + + # append to existing EE file + cat >> execution-environment.yml < requirements.yml < requirements.txt < jobs.json - # conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') - # echo ${conclusion} - # [[ ${conclusion} == "success" ]] - # working-directory: . - - - name: check out code - uses: actions/checkout@v4 - with: - path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - - - name: discover Python version - id: pyversion - shell: bash - run: | - PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') - echo "pyversion=$PYVER" >> $GITHUB_OUTPUT - # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 - # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline - - - name: install Python - uses: actions/setup-python@v4 - with: - python-version: ${{ steps.pyversion.outputs.pyversion }} - cache: pip - - - name: install Poetry - uses: Gr1N/setup-poetry@v8 - - - name: prep Poetry venv - run: | - poetry env use ${{ steps.pyversion.outputs.pyversion }} - poetry lock - poetry install --with ansible-ee --without dev --no-root - - - name: set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: get version for release image - id: tag - run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - - # TODO latest should only be tagged for release versions - - name: determine docker tags and labels for release image - id: meta - uses: docker/metadata-action@v5 - with: - context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) - images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible - tags: | - type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} - - - name: Create files for building execution environment + - name: append build files to EE file for release run: | COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" - # EE config - cat > execution-environment.yml <=2.15.0rc2,<2.16 - ansible_runner: - package_pip: ansible-runner - system: | - git-core [platform:rpm] - python3.9-devel [platform:rpm compile] - libcurl-devel [platform:rpm compile] - sshpass [platform:rpm] - rsync [platform:rpm] - epel-release [platform:rpm] - unzip [platform:rpm] - galaxy: requirements.yml - python: requirements.txt - + # append to existing EE file + cat >> execution-environment.yml < `python3.9` - - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 EOF echo "::group::execution-environment.yml" cat execution-environment.yml @@ -349,7 +223,11 @@ jobs: echo "::group::requirements.yml" cat requirements.yml echo "::endgroup::" + if: inputs.release + working-directory: . + - name: create requirements.txt + run: | # Python Requirements cat > requirements.txt < execution-environment.yml <=2.15.0rc2,<2.16 + # ansible_runner: + # package_pip: ansible-runner + # system: | + # git-core [platform:rpm] + # python3.9-devel [platform:rpm compile] + # libcurl-devel [platform:rpm compile] + # sshpass [platform:rpm] + # rsync [platform:rpm] + # epel-release [platform:rpm] + # unzip [platform:rpm] + # galaxy: requirements.yml + # python: requirements.txt + + # additional_build_files: + # - src: ${COLLECTION_FILENAME} + # dest: src + # - src: ${COLLECTION_PIP_REQUIREMENTS} + # dest: src + + # additional_build_steps: + # append_base: + # - RUN \$PYCMD -m pip install -U pip + # prepend_builder: + # - COPY _build/src/requirements.txt src/requirements.txt + # append_final: + # # SymLink `python` -> `python3.9` + # - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 + # EOF + # echo "::group::execution-environment.yml" + # cat execution-environment.yml + # echo "::endgroup::" + + # # Collection Requirements + # cat > requirements.yml < requirements.txt < jobs.json + # # conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') + # # echo ${conclusion} + # # [[ ${conclusion} == "success" ]] + # # working-directory: . + + # - name: check out code + # uses: actions/checkout@v4 + # with: + # path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + # - name: discover Python version + # id: pyversion + # shell: bash + # run: | + # PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') + # echo "pyversion=$PYVER" >> $GITHUB_OUTPUT + # # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + # # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline + + # - name: install Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ steps.pyversion.outputs.pyversion }} + # cache: pip + + # - name: install Poetry + # uses: Gr1N/setup-poetry@v8 + + # - name: prep Poetry venv + # run: | + # poetry env use ${{ steps.pyversion.outputs.pyversion }} + # poetry lock + # poetry install --with ansible-ee --without dev --no-root + + # - name: set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + + # - name: get version for release image + # id: tag + # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + + # # TODO latest should only be tagged for release versions + # - name: determine docker tags and labels for release image + # id: meta + # uses: docker/metadata-action@v5 + # with: + # context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) + # images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + # tags: | + # type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} + # type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} + # type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + + # - name: Create files for building execution environment + # run: | + # COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" + + # # EE config + # cat > execution-environment.yml <=2.15.0rc2,<2.16 + # ansible_runner: + # package_pip: ansible-runner + # system: | + # git-core [platform:rpm] + # python3.9-devel [platform:rpm compile] + # libcurl-devel [platform:rpm compile] + # sshpass [platform:rpm] + # rsync [platform:rpm] + # epel-release [platform:rpm] + # unzip [platform:rpm] + # galaxy: requirements.yml + # python: requirements.txt + + # additional_build_files: + # - src: ${COLLECTION_PIP_REQUIREMENTS} + # dest: src + + # additional_build_steps: + # append_base: + # - RUN \$PYCMD -m pip install -U pip + # prepend_builder: + # - COPY _build/src/requirements.txt src/requirements.txt + # append_final: + # # SymLink `python` -> `python3.9` + # - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 + # EOF + # echo "::group::execution-environment.yml" + # cat execution-environment.yml + # echo "::endgroup::" + + # # Collection Requirements + # cat > requirements.yml < requirements.txt < Date: Thu, 26 Sep 2024 14:53:31 +0300 Subject: [PATCH 041/125] fix: merge docker meta --- .github/workflows/ee.yml | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index b863d9fe3..9d7463115 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -96,27 +96,30 @@ jobs: context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible tags: | + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} type=ref,event=branch type=ref,event=tag - if: ${{ inputs.release == 'false' }} - - - name: get version for release image - id: tag - run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - if: inputs.release + # if: ${{ inputs.release == 'false' }} - # TODO latest should only be tagged for release versions - - name: determine docker tags and labels for release image - id: meta - uses: docker/metadata-action@v5 - with: - context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) - images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible - tags: | - type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} - if: inputs.release + # - name: get version for release image + # id: tag + # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + # if: inputs.release + + # # TODO latest should only be tagged for release versions + # - name: determine docker tags and labels for release image + # id: meta + # uses: docker/metadata-action@v5 + # with: + # context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) + # images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + # tags: | + # type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} + # type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} + # type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + # if: inputs.release # NOTE we should take pan-os-ansible from galaxy for a release, but use build for develop # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 From 24d17ea1f31121e191045d1c916b3aeeea2ec3b8 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:21:03 +0300 Subject: [PATCH 042/125] fix: trick semantic --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c286bed14..66fff6cd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -270,20 +270,39 @@ jobs: - name: checkout code uses: actions/checkout@v4 - - name: rc check - id: rc - uses: cycjimmy/semantic-release-action@v4 + - name: setup node.js + uses: actions/setup-node@v2 with: - dry_run: true - semantic_version: 17.1.1 - extra_plugins: | - conventional-changelog-conventionalcommits@^4.4.0 - @semantic-release/changelog@^5.0.1 - @semantic-release/git@^9.0.0 - @semantic-release/exec@^5.0.00 + node-version: 'lts/*' + + - name: install dependencies + run: npm ci + + - name: trick semantic check + id: rc + run: | + # Trick semantic-release into thinking we're not in a CI environment + unset GITHUB_ACTIONS + unset GITHUB_EVENT_NAME + + npx semantic-release --dry-run --no-ci --branches $GITHUB_HEAD_REF env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: rc check + # id: rc + # uses: cycjimmy/semantic-release-action@v4 + # with: + # dry_run: true + # semantic_version: 17.1.1 + # extra_plugins: | + # conventional-changelog-conventionalcommits@^4.4.0 + # @semantic-release/changelog@^5.0.1 + # @semantic-release/git@^9.0.0 + # @semantic-release/exec@^5.0.00 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build_dev_ee: name: dev_ee needs: rc From 4a01120db43a18804d2b02573290afab93326351 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:26:42 +0300 Subject: [PATCH 043/125] fix: trick semantic --- .github/workflows/ci.yml | 124 ++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 61 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66fff6cd0..a77236f66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,64 +14,64 @@ env: jobs: - ## Sanity is required: - # - # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html - sanity: - name: Sanity (Ⓐ${{ matrix.ansible }}) - strategy: - matrix: - include: - - ansible: "2.15" - python_ver: "3.11" - # - ansible: "2.16" TODO temp disabled to speed up testing - # python_ver: "3.11" - # - ansible: "2.17" - # python_ver: "3.11" - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - steps: - - uses: actions/checkout@v4 - with: - path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python_ver }} - - - name: Install Poetry - uses: Gr1N/setup-poetry@v8 - #with: - # poetry-version: 1.0.10 - - # Install the head of the given branch (devel, stable-2.10) - - name: Install ansible-base (${{ matrix.ansible }}) - run: poetry run pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible }}.tar.gz --disable-pip-version-check - - - name: Create lock file - run: poetry lock - - #- name: Cache poetry dependencies - # uses: actions/cache@v2 - # with: - # #path: ~/.cache/pypoetry/virtualenvs - # #key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} - # ##restore-keys: | - # ## ${{ runner.os }}-poetry-${{ matrix.python-version }}- - # path: ${{ steps.poetry-cache.outputs.dir }} - # key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} - # restore-keys: | - # ${{ runner.os }}-poetry- - - - name: Install dependencies - run: poetry install - - - name: Run sanity tests - timeout-minutes: 8 - run: poetry run make new-sanity + # ## Sanity is required: + # # + # # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html + # sanity: + # name: Sanity (Ⓐ${{ matrix.ansible }}) + # strategy: + # matrix: + # include: + # - ansible: "2.15" + # python_ver: "3.11" + # - ansible: "2.16" + # python_ver: "3.11" + # - ansible: "2.17" + # python_ver: "3.11" + # runs-on: ubuntu-latest + # defaults: + # run: + # working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + # steps: + # - uses: actions/checkout@v4 + # with: + # path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + # - name: Setup Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python_ver }} + + # - name: Install Poetry + # uses: Gr1N/setup-poetry@v8 + # #with: + # # poetry-version: 1.0.10 + + # # Install the head of the given branch (devel, stable-2.10) + # - name: Install ansible-base (${{ matrix.ansible }}) + # run: poetry run pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible }}.tar.gz --disable-pip-version-check + + # - name: Create lock file + # run: poetry lock + + # #- name: Cache poetry dependencies + # # uses: actions/cache@v2 + # # with: + # # #path: ~/.cache/pypoetry/virtualenvs + # # #key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + # # ##restore-keys: | + # # ## ${{ runner.os }}-poetry-${{ matrix.python-version }}- + # # path: ${{ steps.poetry-cache.outputs.dir }} + # # key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} + # # restore-keys: | + # # ${{ runner.os }}-poetry- + + # - name: Install dependencies + # run: poetry install + + # - name: Run sanity tests + # timeout-minutes: 8 + # run: poetry run make new-sanity # Ansible-lint is a requirement for certification, and was added to the # certification pipeline 20 June 2023 per Ansible Partner Engineering @@ -137,7 +137,8 @@ jobs: release: name: release if: github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: [sanity, tox, lint, format] + # needs: [sanity, tox, lint, format] TEMP + needs: [tox, lint, format] runs-on: ubuntu-latest steps: @@ -261,7 +262,8 @@ jobs: rc: name: Check rc EE runs-on: ubuntu-latest - needs: [sanity, tox, lint, format] + # needs: [sanity, tox, lint, format] TEMP + needs: [tox, lint, format] if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') outputs: rc: ${{ steps.rc.outputs.new_release_published }} @@ -271,7 +273,7 @@ jobs: uses: actions/checkout@v4 - name: setup node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: 'lts/*' From 0436ce5e9ad55553609d6dc7df080d1bad3112cd Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:33:19 +0300 Subject: [PATCH 044/125] fix: trick semantic --- .github/workflows/ci.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a77236f66..c8103ab58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,7 +138,7 @@ jobs: name: release if: github.event_name == 'push' && github.ref == 'refs/heads/main' # needs: [sanity, tox, lint, format] TEMP - needs: [tox, lint, format] + needs: [tox] runs-on: ubuntu-latest steps: @@ -263,7 +263,7 @@ jobs: name: Check rc EE runs-on: ubuntu-latest # needs: [sanity, tox, lint, format] TEMP - needs: [tox, lint, format] + needs: [tox] if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') outputs: rc: ${{ steps.rc.outputs.new_release_published }} @@ -272,10 +272,15 @@ jobs: - name: checkout code uses: actions/checkout@v4 - - name: setup node.js - uses: actions/setup-node@v4 + # - name: setup node.js + # uses: actions/setup-node@v4 + # with: + # node-version: 'lts/*' + + - uses: actions/setup-node@v4 with: - node-version: 'lts/*' + node-version: 20 + cache: 'npm' - name: install dependencies run: npm ci From d11007d74c249f6973a47a3aeec6e3561e0e72e5 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:38:37 +0300 Subject: [PATCH 045/125] fix: trick semantic --- .github/workflows/ci.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8103ab58..323a7b8d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -272,18 +272,20 @@ jobs: - name: checkout code uses: actions/checkout@v4 - # - name: setup node.js - # uses: actions/setup-node@v4 - # with: - # node-version: 'lts/*' - - - uses: actions/setup-node@v4 + - name: setup node.js + uses: actions/setup-node@v4 with: - node-version: 20 - cache: 'npm' + node-version: 'lts/*' + + # - uses: actions/setup-node@v4 + # with: + # node-version: 20 + # cache: 'npm' - name: install dependencies - run: npm ci + run: | + npm install + npm ci - name: trick semantic check id: rc From fd3232df21b9224e9a95c0478e1bced3af01b533 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:42:53 +0300 Subject: [PATCH 046/125] fix: trick semantic --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 323a7b8d5..6b11b21ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -284,8 +284,9 @@ jobs: - name: install dependencies run: | - npm install - npm ci + npx semantic-release + # npm install + # npm ci - name: trick semantic check id: rc From d4894a5438536b9b8aa5860b451564f8eb20985d Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:46:18 +0300 Subject: [PATCH 047/125] fix: trick semantic --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b11b21ce..b2ff6b909 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -284,7 +284,8 @@ jobs: - name: install dependencies run: | - npx semantic-release + npm install --save-dev semantic-release + # npx semantic-release # npm install # npm ci From 30e6a1fa01109e257ce9e39abc855fecea3c2ad0 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:48:14 +0300 Subject: [PATCH 048/125] fix: trick semantic --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2ff6b909..91d9aca77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -285,6 +285,7 @@ jobs: - name: install dependencies run: | npm install --save-dev semantic-release + npm install @semantic-release/exec -D # npx semantic-release # npm install # npm ci From 7fe91d0012becfebaa79ca3770021a5d00601c3a Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:53:09 +0300 Subject: [PATCH 049/125] fix: trick semantic --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91d9aca77..720ec3c04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -286,6 +286,8 @@ jobs: run: | npm install --save-dev semantic-release npm install @semantic-release/exec -D + npm install @semantic-release/changelog -D + npm install @semantic-release/git -D # npx semantic-release # npm install # npm ci From 4959ed4c287a1170778e16bb855cc965eefc4b95 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:56:27 +0300 Subject: [PATCH 050/125] fix: trick semantic --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 720ec3c04..5dbb6b2d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -299,9 +299,11 @@ jobs: unset GITHUB_ACTIONS unset GITHUB_EVENT_NAME - npx semantic-release --dry-run --no-ci --branches $GITHUB_HEAD_REF + npx semantic-release --dry-run --no-ci --branches '${HEAD_REF}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HEAD_REF: ${{ github.head_ref }} + # - name: rc check # id: rc From e3f4400443dfd3e7efb9113966d98aca8457493b Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:59:12 +0300 Subject: [PATCH 051/125] fix: trick semantic --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dbb6b2d0..bcd91f8d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -298,6 +298,7 @@ jobs: # Trick semantic-release into thinking we're not in a CI environment unset GITHUB_ACTIONS unset GITHUB_EVENT_NAME + echo "headref is: $HEAD_REF" npx semantic-release --dry-run --no-ci --branches '${HEAD_REF}' env: From 119e8723f320cb47d1e156b60c6c8fe8f0a3dc7b Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:02:05 +0300 Subject: [PATCH 052/125] fix: trick semantic --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcd91f8d3..f7a2b21c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -303,7 +303,7 @@ jobs: npx semantic-release --dry-run --no-ci --branches '${HEAD_REF}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HEAD_REF: ${{ github.head_ref }} + HEAD_REF: ${{ github.ref }} # - name: rc check From 0cf6feb1fe38b2640a7ffe54b8206d1f1fde307b Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:07:02 +0300 Subject: [PATCH 053/125] fix: trick semantic --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7a2b21c6..e583e65ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -300,12 +300,11 @@ jobs: unset GITHUB_EVENT_NAME echo "headref is: $HEAD_REF" - npx semantic-release --dry-run --no-ci --branches '${HEAD_REF}' + npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HEAD_REF: ${{ github.ref }} - # - name: rc check # id: rc # uses: cycjimmy/semantic-release-action@v4 From dc88640535a449a5d1cda5e9b10884d3a37a9935 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:11:39 +0300 Subject: [PATCH 054/125] fix: trick semantic --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e583e65ec..f6212c67e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -296,11 +296,12 @@ jobs: id: rc run: | # Trick semantic-release into thinking we're not in a CI environment - unset GITHUB_ACTIONS - unset GITHUB_EVENT_NAME - echo "headref is: $HEAD_REF" - - npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}' + OUTPUT="$(bash -c "unset GITHUB_ACTIONS && unset GITHUB_EVENT_NAME && npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}'")" + echo "$OUTPUT" + # echo "headref is: $HEAD_REF" + # unset GITHUB_ACTIONS + # unset GITHUB_EVENT_NAME + # npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HEAD_REF: ${{ github.ref }} From 533acc31ba2a6269b33794a124f7b2ed5ba113db Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:14:21 +0300 Subject: [PATCH 055/125] fix: trick semantic --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6212c67e..434dce93d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -285,9 +285,10 @@ jobs: - name: install dependencies run: | npm install --save-dev semantic-release - npm install @semantic-release/exec -D + npm install @semantic-release/commit-analyzer -D npm install @semantic-release/changelog -D npm install @semantic-release/git -D + npm install @semantic-release/exec -D # npx semantic-release # npm install # npm ci From ee52c05acf4214a728afa563f70020e5600db353 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:17:36 +0300 Subject: [PATCH 056/125] fix: trick semantic --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 434dce93d..318aca8aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -286,6 +286,7 @@ jobs: run: | npm install --save-dev semantic-release npm install @semantic-release/commit-analyzer -D + npm install conventional-changelog-conventionalcommits -D npm install @semantic-release/changelog -D npm install @semantic-release/git -D npm install @semantic-release/exec -D From c84f73300359bcb659288b0d0e96564e4e0496ce Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:48:41 +0300 Subject: [PATCH 057/125] fix: trick semantic --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 318aca8aa..422198d4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -267,6 +267,7 @@ jobs: if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') outputs: rc: ${{ steps.rc.outputs.new_release_published }} + new_release_version: ${{ steps.rc.outputs.new_release_version }} steps: - name: checkout code @@ -299,7 +300,15 @@ jobs: run: | # Trick semantic-release into thinking we're not in a CI environment OUTPUT="$(bash -c "unset GITHUB_ACTIONS && unset GITHUB_EVENT_NAME && npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}'")" - echo "$OUTPUT" + # NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(\d+\.\d+\.\d+)') + NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?') + echo "new_release_version=$NEW_RELEASE_VERSION" >> "$GITHUB_OUTPUT" + + if [ -z "$NEW_RELEASE_VERSION" ]; then + echo "new_release_published=false" >> "$GITHUB_OUTPUT" + else + echo "new_release_published=true" >> "$GITHUB_OUTPUT" + fi # echo "headref is: $HEAD_REF" # unset GITHUB_ACTIONS # unset GITHUB_EVENT_NAME From 518419f656fd9a0e45f8ee79dfb1b0714b8e9955 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:59:38 +0300 Subject: [PATCH 058/125] fix: trick semantic --- .github/workflows/ee.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 9d7463115..30c000d85 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -89,7 +89,7 @@ jobs: - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: determine docker tags and labels for development image + - name: determine docker tags and labels id: meta uses: docker/metadata-action@v5 with: @@ -126,7 +126,7 @@ jobs: - name: Build collection from development branch run: | ansible-galaxy collection build --output-path ../../../ - if: ${{ inputs.release == 'false' }} + if: ${{ inputs.release == false }} - name: create base EE file run: | @@ -197,7 +197,7 @@ jobs: echo "::group::requirements.yml" cat requirements.yml echo "::endgroup::" - if: ${{ inputs.release == 'false' }} + if: ${{ inputs.release == false }} working-directory: . - name: append build files to EE file for release From 0907bcc076d496f22354408ac215efbf45dc1d3f Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 17:11:17 +0300 Subject: [PATCH 059/125] fix: trick semantic --- .github/workflows/ci.yml | 20 +++++++------------- .github/workflows/ee.yml | 27 ++------------------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 422198d4e..8bb6d0ed5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -278,11 +278,6 @@ jobs: with: node-version: 'lts/*' - # - uses: actions/setup-node@v4 - # with: - # node-version: 20 - # cache: 'npm' - - name: install dependencies run: | npm install --save-dev semantic-release @@ -292,15 +287,16 @@ jobs: npm install @semantic-release/git -D npm install @semantic-release/exec -D # npx semantic-release - # npm install # npm ci - name: trick semantic check id: rc run: | # Trick semantic-release into thinking we're not in a CI environment - OUTPUT="$(bash -c "unset GITHUB_ACTIONS && unset GITHUB_EVENT_NAME && npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}'")" - # NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(\d+\.\d+\.\d+)') + OUTPUT="$(bash -c "unset GITHUB_ACTIONS && unset GITHUB_EVENT_NAME && npx semantic-release --dry-run --no-ci --branches '${GITHUB_REF#refs/heads/}'")" + # print output + echo "$OUTPUT" + # grep with semver regex - \K means to start matching from here in Perl regex NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?') echo "new_release_version=$NEW_RELEASE_VERSION" >> "$GITHUB_OUTPUT" @@ -309,14 +305,12 @@ jobs: else echo "new_release_published=true" >> "$GITHUB_OUTPUT" fi - # echo "headref is: $HEAD_REF" - # unset GITHUB_ACTIONS - # unset GITHUB_EVENT_NAME - # npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HEAD_REF: ${{ github.ref }} + GITHUB_REF: ${{ github.ref }} + # below does NOT work because semantic-release expects branch name in the config even in dry-run + # but we run rc check in non main branches # - name: rc check # id: rc # uses: cycjimmy/semantic-release-action@v4 diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 30c000d85..8bdaf69f2 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -13,32 +13,17 @@ on: description: EE for a release or development type: boolean default: false - # push: - # branches: - # - develop - # tags: - # - 'v*' - # release: - # types: [published] - # workflow_run: # NOTE workflow runs from default branch.. - # workflows: ['CI'] - # types: completed env: NAMESPACE: paloaltonetworks COLLECTION_NAME: panos PYTHON_VERSION: 3.9 # TODO do we need this, as we take it from pyproject.yml ? - - # one job can run on push to develop branch or on manual workflow_dispatch ? - # and other job can run on release published (hoping release happens after being published to galaxy..) - jobs: build_ee: name: Ansible EE runs-on: ubuntu-latest - # if: inputs.release == 'false' permissions: contents: read @@ -49,13 +34,6 @@ jobs: working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: - # - name: debug github event - # id: tag - # run: | - # echo "github event: ${{ github.event }}" - # echo "github event workflow_run: ${{github.event.workflow_run}}" - # echo "github event workflow_run head: ${{github.event.workflow_run.head_branch}}" - # exit 1 - name: check out code uses: actions/checkout@v4 @@ -69,7 +47,7 @@ jobs: PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') echo "pyversion=$PYVER" >> $GITHUB_OUTPUT # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 - # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline + # working-directory doesn't work with uses, until you get a `with path` similar to checkout, this is going to be inline - name: install Python uses: actions/setup-python@v4 @@ -101,7 +79,6 @@ jobs: type=semver,pattern=v{{major}} type=ref,event=branch type=ref,event=tag - # if: ${{ inputs.release == 'false' }} # - name: get version for release image # id: tag @@ -121,7 +98,7 @@ jobs: # type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} # if: inputs.release - # NOTE we should take pan-os-ansible from galaxy for a release, but use build for develop + # NOTE we should take pan-os-ansible from galaxy for a release, but local build for develop # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 - name: Build collection from development branch run: | From 02c438a6c905f22c8b38a6d6d3e18b714edd8b23 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 11:48:29 +0300 Subject: [PATCH 060/125] fix: work dir --- .github/workflows/ee.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index e866fb83f..870ae2f51 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -221,6 +221,7 @@ jobs: conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') echo ${conclusion} [[ ${conclusion} == "success" ]] + working-directory: . - name: check out code uses: actions/checkout@v4 From 039b0f0e1d740bd8b99556bfc0b672aab6f8c405 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 13:34:02 +0300 Subject: [PATCH 061/125] feat: new ee ci --- .github/workflows/ee.yml | 78 ++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 870ae2f51..cf1294bb4 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -2,16 +2,16 @@ name: Ansible EE Image on: workflow_dispatch: - # push: - # branches: - # - develop + push: + branches: + - develop # tags: # - 'v*' - # release: - # types: [published] - workflow_run: # NOTE workflow runs from default branch.. - workflows: ['CI'] - types: completed + release: + types: [published] + # workflow_run: # NOTE workflow runs from default branch.. + # workflows: ['CI'] + # types: completed env: NAMESPACE: paloaltonetworks @@ -19,11 +19,38 @@ env: PYTHON_VERSION: 3.9 # TODO do we need this, as we take it from pyproject.yml ? + # one job can run on push to develop branch or on manual workflow_dispatch ? + # and other job can run on release published (hoping release happens after being published to galaxy..) + jobs: - build: - name: Build and Publish Ansible EE for development + + rc: + name: check if we have a change that requires an EE + runs-on: ubuntu-latest + if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' + outputs: + rc: ${{ steps.rc.outputs.new_release_published }} + + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: rc check + id: rc + uses: cycjimmy/semantic-release-action@v4 + with: + dry_run: true + semantic_version: 17.1.1 + extra_plugins: | + conventional-changelog-conventionalcommits@^4.4.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build_dev_ee: + name: Development Ansible EE runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'develop' + needs: rc + if: needs.rc.outputs.rc == 'true' permissions: contents: read @@ -194,11 +221,10 @@ jobs: cache-to: type=gha,mode=max provenance: false # disabled to keep number of images low for development branches - - release_build: - name: Build and Publish Ansible EE for release + build_release_ee: + name: Release Ansible EE runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' + if: github.event_name == 'release' && github.event.action == 'published' # NOTE what if we make a release from develop branch? dont worry it would make both develop and alpha images I suppose..:) permissions: @@ -211,17 +237,17 @@ jobs: steps: - - name: Proceed if release job from CI workflow succeeded - run: | - curl -L \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - ${{ github.event.workflow_run.jobs_url }} > jobs.json - conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') - echo ${conclusion} - [[ ${conclusion} == "success" ]] - working-directory: . + # - name: Proceed if release job from CI workflow succeeded + # run: | + # curl -L \ + # -H "Accept: application/vnd.github+json" \ + # -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + # -H "X-GitHub-Api-Version: 2022-11-28" \ + # ${{ github.event.workflow_run.jobs_url }} > jobs.json + # conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') + # echo ${conclusion} + # [[ ${conclusion} == "success" ]] + # working-directory: . - name: check out code uses: actions/checkout@v4 From 750f65ecdb3865cec145cb8ebff800661185e07c Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 13:38:00 +0300 Subject: [PATCH 062/125] fix: new ee ci --- .github/workflows/ee.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index cf1294bb4..46ccaba38 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -43,6 +43,7 @@ jobs: semantic_version: 17.1.1 extra_plugins: | conventional-changelog-conventionalcommits@^4.4.0 + @semantic-release/git@^9.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 39162831869a6b6c2c04370820dc6338c9820248 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:02:51 +0300 Subject: [PATCH 063/125] feat: refactor ee ci --- .github/workflows/ci.yml | 39 +++++++++++++++++++++ .github/workflows/ee.yml | 73 +++++++++++++++++++++++----------------- 2 files changed, 82 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbcf2fa3f..825ac25bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -257,3 +257,42 @@ jobs: branch: gh-pages folder: docs/html clean: true + + rc: + name: check if we have a change that requires an EE + runs-on: ubuntu-latest + needs: [sanity, tox, lint, format] + if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') + outputs: + rc: ${{ steps.rc.outputs.new_release_published }} + + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: rc check + id: rc + uses: cycjimmy/semantic-release-action@v4 + with: + dry_run: true + semantic_version: 17.1.1 + extra_plugins: | + conventional-changelog-conventionalcommits@^4.4.0 + @semantic-release/git@^9.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build_dev_ee: + name: Development Ansible EE + runs-on: ubuntu-latest + needs: rc + if: needs.rc.outputs.rc == 'true' + uses: ./.github/workflows/ee.yml + + build_prod_ee: + name: Release Ansible EE + runs-on: ubuntu-latest + needs: release + uses: ./.github/workflows/ee.yml + with: + release: true diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 46ccaba38..9c9da6455 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -1,14 +1,25 @@ name: Ansible EE Image on: + workflow_call: + inputs: + release: + description: EE for a release or development + type: boolean + default: false workflow_dispatch: - push: - branches: - - develop + inputs: + release: + description: EE for a release or development + type: boolean + default: false + # push: + # branches: + # - develop # tags: # - 'v*' - release: - types: [published] + # release: + # types: [published] # workflow_run: # NOTE workflow runs from default branch.. # workflows: ['CI'] # types: completed @@ -24,34 +35,35 @@ env: jobs: - rc: - name: check if we have a change that requires an EE - runs-on: ubuntu-latest - if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' - outputs: - rc: ${{ steps.rc.outputs.new_release_published }} - - steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: rc check - id: rc - uses: cycjimmy/semantic-release-action@v4 - with: - dry_run: true - semantic_version: 17.1.1 - extra_plugins: | - conventional-changelog-conventionalcommits@^4.4.0 - @semantic-release/git@^9.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # rc: + # name: check if we have a change that requires an EE + # runs-on: ubuntu-latest + # if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' + # outputs: + # rc: ${{ steps.rc.outputs.new_release_published }} + + # steps: + # - name: checkout code + # uses: actions/checkout@v4 + + # - name: rc check + # id: rc + # uses: cycjimmy/semantic-release-action@v4 + # with: + # dry_run: true + # semantic_version: 17.1.1 + # extra_plugins: | + # conventional-changelog-conventionalcommits@^4.4.0 + # @semantic-release/git@^9.0.0 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build_dev_ee: name: Development Ansible EE runs-on: ubuntu-latest - needs: rc - if: needs.rc.outputs.rc == 'true' + if: !inputs.release + # needs: rc + # if: needs.rc.outputs.rc == 'true' permissions: contents: read @@ -225,7 +237,8 @@ jobs: build_release_ee: name: Release Ansible EE runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' + if: inputs.release + # if: github.event_name == 'release' && github.event.action == 'published' # NOTE what if we make a release from develop branch? dont worry it would make both develop and alpha images I suppose..:) permissions: From 69bd778f5b313ff2f1d0fee0dc336c7747a4e8ad Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:09:14 +0300 Subject: [PATCH 064/125] fix: refactor ee ci --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 825ac25bf..6facd14f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -259,7 +259,7 @@ jobs: clean: true rc: - name: check if we have a change that requires an EE + name: Check rc EE runs-on: ubuntu-latest needs: [sanity, tox, lint, format] if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') @@ -283,15 +283,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build_dev_ee: - name: Development Ansible EE - runs-on: ubuntu-latest + name: dev_ee needs: rc if: needs.rc.outputs.rc == 'true' uses: ./.github/workflows/ee.yml build_prod_ee: - name: Release Ansible EE - runs-on: ubuntu-latest + name: release_ee needs: release uses: ./.github/workflows/ee.yml with: From c8c20df65845e7a10d1fe185c00f5f3425c72ffe Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:14:15 +0300 Subject: [PATCH 065/125] fix: refactor ee ci --- .github/workflows/ee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 9c9da6455..2f30b3019 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -61,7 +61,7 @@ jobs: build_dev_ee: name: Development Ansible EE runs-on: ubuntu-latest - if: !inputs.release + if: inputs.release == 'false' # needs: rc # if: needs.rc.outputs.rc == 'true' From 4967797b695f9c3d4f3661726affa19a70431ec0 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:20:37 +0300 Subject: [PATCH 066/125] fix: refactor ee ci --- .github/workflows/ci.yml | 10 +++++++--- .github/workflows/ee.yml | 23 ----------------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6facd14f7..5f4a1510d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -275,10 +275,14 @@ jobs: uses: cycjimmy/semantic-release-action@v4 with: dry_run: true - semantic_version: 17.1.1 + semantic_version: 19.0 extra_plugins: | - conventional-changelog-conventionalcommits@^4.4.0 - @semantic-release/git@^9.0.0 + conventional-changelog-conventionalcommits@^5.0.0 + @semantic-release/git@^10.0.1 + # semantic_version: 17.1.1 + # extra_plugins: | + # conventional-changelog-conventionalcommits@^4.4.0 + # @semantic-release/git@^9.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 2f30b3019..af9de0354 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -35,29 +35,6 @@ env: jobs: - # rc: - # name: check if we have a change that requires an EE - # runs-on: ubuntu-latest - # if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' - # outputs: - # rc: ${{ steps.rc.outputs.new_release_published }} - - # steps: - # - name: checkout code - # uses: actions/checkout@v4 - - # - name: rc check - # id: rc - # uses: cycjimmy/semantic-release-action@v4 - # with: - # dry_run: true - # semantic_version: 17.1.1 - # extra_plugins: | - # conventional-changelog-conventionalcommits@^4.4.0 - # @semantic-release/git@^9.0.0 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - build_dev_ee: name: Development Ansible EE runs-on: ubuntu-latest From 46b540466cb6e0ea531fc49d1269b745cc269b83 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 14:46:45 +0300 Subject: [PATCH 067/125] fix: refactor ee ci --- .github/workflows/ci.yml | 12 +- .github/workflows/ee.yml | 473 +++++++++++++++++++++++++-------------- 2 files changed, 306 insertions(+), 179 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f4a1510d..c286bed14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -275,14 +275,12 @@ jobs: uses: cycjimmy/semantic-release-action@v4 with: dry_run: true - semantic_version: 19.0 + semantic_version: 17.1.1 extra_plugins: | - conventional-changelog-conventionalcommits@^5.0.0 - @semantic-release/git@^10.0.1 - # semantic_version: 17.1.1 - # extra_plugins: | - # conventional-changelog-conventionalcommits@^4.4.0 - # @semantic-release/git@^9.0.0 + conventional-changelog-conventionalcommits@^4.4.0 + @semantic-release/changelog@^5.0.1 + @semantic-release/git@^9.0.0 + @semantic-release/exec@^5.0.00 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index af9de0354..b863d9fe3 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -35,12 +35,10 @@ env: jobs: - build_dev_ee: - name: Development Ansible EE + build_ee: + name: Ansible EE runs-on: ubuntu-latest - if: inputs.release == 'false' - # needs: rc - # if: needs.rc.outputs.rc == 'true' + # if: inputs.release == 'false' permissions: contents: read @@ -87,7 +85,6 @@ jobs: poetry env use ${{ steps.pyversion.outputs.pyversion }} poetry lock poetry install --with ansible-ee --without dev --no-root - # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -101,20 +98,35 @@ jobs: tags: | type=ref,event=branch type=ref,event=tag + if: ${{ inputs.release == 'false' }} - # TODO we should take pan-os-ansible from galaxy for a release BUT what about develop branch?? - # https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 - # TRY OUT dynamically creating EE. Or we can make dynamic for develop and use static file for release? + - name: get version for release image + id: tag + run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + if: inputs.release + + # TODO latest should only be tagged for release versions + - name: determine docker tags and labels for release image + id: meta + uses: docker/metadata-action@v5 + with: + context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) + images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + tags: | + type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + if: inputs.release + + # NOTE we should take pan-os-ansible from galaxy for a release, but use build for develop + # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 - name: Build collection from development branch run: | ansible-galaxy collection build --output-path ../../../ + if: ${{ inputs.release == 'false' }} - - name: Create files for building execution environment + - name: create base EE file run: | - COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)" - COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" - - # EE config cat > execution-environment.yml < `python3.9` - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 + + EOF + working-directory: . + + - name: append build files to EE file for development + run: | + COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)" + COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" + + # append to existing EE file + cat >> execution-environment.yml < requirements.yml < requirements.txt < jobs.json - # conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') - # echo ${conclusion} - # [[ ${conclusion} == "success" ]] - # working-directory: . - - - name: check out code - uses: actions/checkout@v4 - with: - path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - - - name: discover Python version - id: pyversion - shell: bash - run: | - PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') - echo "pyversion=$PYVER" >> $GITHUB_OUTPUT - # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 - # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline - - - name: install Python - uses: actions/setup-python@v4 - with: - python-version: ${{ steps.pyversion.outputs.pyversion }} - cache: pip - - - name: install Poetry - uses: Gr1N/setup-poetry@v8 - - - name: prep Poetry venv - run: | - poetry env use ${{ steps.pyversion.outputs.pyversion }} - poetry lock - poetry install --with ansible-ee --without dev --no-root - - - name: set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: get version for release image - id: tag - run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - - # TODO latest should only be tagged for release versions - - name: determine docker tags and labels for release image - id: meta - uses: docker/metadata-action@v5 - with: - context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) - images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible - tags: | - type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} - - - name: Create files for building execution environment + - name: append build files to EE file for release run: | COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" - # EE config - cat > execution-environment.yml <=2.15.0rc2,<2.16 - ansible_runner: - package_pip: ansible-runner - system: | - git-core [platform:rpm] - python3.9-devel [platform:rpm compile] - libcurl-devel [platform:rpm compile] - sshpass [platform:rpm] - rsync [platform:rpm] - epel-release [platform:rpm] - unzip [platform:rpm] - galaxy: requirements.yml - python: requirements.txt - + # append to existing EE file + cat >> execution-environment.yml < `python3.9` - - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 EOF echo "::group::execution-environment.yml" cat execution-environment.yml @@ -349,7 +223,11 @@ jobs: echo "::group::requirements.yml" cat requirements.yml echo "::endgroup::" + if: inputs.release + working-directory: . + - name: create requirements.txt + run: | # Python Requirements cat > requirements.txt < execution-environment.yml <=2.15.0rc2,<2.16 + # ansible_runner: + # package_pip: ansible-runner + # system: | + # git-core [platform:rpm] + # python3.9-devel [platform:rpm compile] + # libcurl-devel [platform:rpm compile] + # sshpass [platform:rpm] + # rsync [platform:rpm] + # epel-release [platform:rpm] + # unzip [platform:rpm] + # galaxy: requirements.yml + # python: requirements.txt + + # additional_build_files: + # - src: ${COLLECTION_FILENAME} + # dest: src + # - src: ${COLLECTION_PIP_REQUIREMENTS} + # dest: src + + # additional_build_steps: + # append_base: + # - RUN \$PYCMD -m pip install -U pip + # prepend_builder: + # - COPY _build/src/requirements.txt src/requirements.txt + # append_final: + # # SymLink `python` -> `python3.9` + # - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 + # EOF + # echo "::group::execution-environment.yml" + # cat execution-environment.yml + # echo "::endgroup::" + + # # Collection Requirements + # cat > requirements.yml < requirements.txt < jobs.json + # # conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') + # # echo ${conclusion} + # # [[ ${conclusion} == "success" ]] + # # working-directory: . + + # - name: check out code + # uses: actions/checkout@v4 + # with: + # path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + # - name: discover Python version + # id: pyversion + # shell: bash + # run: | + # PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') + # echo "pyversion=$PYVER" >> $GITHUB_OUTPUT + # # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + # # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline + + # - name: install Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ steps.pyversion.outputs.pyversion }} + # cache: pip + + # - name: install Poetry + # uses: Gr1N/setup-poetry@v8 + + # - name: prep Poetry venv + # run: | + # poetry env use ${{ steps.pyversion.outputs.pyversion }} + # poetry lock + # poetry install --with ansible-ee --without dev --no-root + + # - name: set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + + # - name: get version for release image + # id: tag + # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + + # # TODO latest should only be tagged for release versions + # - name: determine docker tags and labels for release image + # id: meta + # uses: docker/metadata-action@v5 + # with: + # context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) + # images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + # tags: | + # type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} + # type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} + # type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + + # - name: Create files for building execution environment + # run: | + # COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" + + # # EE config + # cat > execution-environment.yml <=2.15.0rc2,<2.16 + # ansible_runner: + # package_pip: ansible-runner + # system: | + # git-core [platform:rpm] + # python3.9-devel [platform:rpm compile] + # libcurl-devel [platform:rpm compile] + # sshpass [platform:rpm] + # rsync [platform:rpm] + # epel-release [platform:rpm] + # unzip [platform:rpm] + # galaxy: requirements.yml + # python: requirements.txt + + # additional_build_files: + # - src: ${COLLECTION_PIP_REQUIREMENTS} + # dest: src + + # additional_build_steps: + # append_base: + # - RUN \$PYCMD -m pip install -U pip + # prepend_builder: + # - COPY _build/src/requirements.txt src/requirements.txt + # append_final: + # # SymLink `python` -> `python3.9` + # - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 + # EOF + # echo "::group::execution-environment.yml" + # cat execution-environment.yml + # echo "::endgroup::" + + # # Collection Requirements + # cat > requirements.yml < requirements.txt < Date: Thu, 26 Sep 2024 14:53:31 +0300 Subject: [PATCH 068/125] fix: merge docker meta --- .github/workflows/ee.yml | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index b863d9fe3..9d7463115 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -96,27 +96,30 @@ jobs: context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible tags: | + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} type=ref,event=branch type=ref,event=tag - if: ${{ inputs.release == 'false' }} - - - name: get version for release image - id: tag - run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - if: inputs.release + # if: ${{ inputs.release == 'false' }} - # TODO latest should only be tagged for release versions - - name: determine docker tags and labels for release image - id: meta - uses: docker/metadata-action@v5 - with: - context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) - images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible - tags: | - type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} - if: inputs.release + # - name: get version for release image + # id: tag + # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + # if: inputs.release + + # # TODO latest should only be tagged for release versions + # - name: determine docker tags and labels for release image + # id: meta + # uses: docker/metadata-action@v5 + # with: + # context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) + # images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + # tags: | + # type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} + # type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} + # type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + # if: inputs.release # NOTE we should take pan-os-ansible from galaxy for a release, but use build for develop # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 From 30c8232680e8d3ffcfb2258deb116c99c2991068 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:21:03 +0300 Subject: [PATCH 069/125] fix: trick semantic --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c286bed14..66fff6cd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -270,20 +270,39 @@ jobs: - name: checkout code uses: actions/checkout@v4 - - name: rc check - id: rc - uses: cycjimmy/semantic-release-action@v4 + - name: setup node.js + uses: actions/setup-node@v2 with: - dry_run: true - semantic_version: 17.1.1 - extra_plugins: | - conventional-changelog-conventionalcommits@^4.4.0 - @semantic-release/changelog@^5.0.1 - @semantic-release/git@^9.0.0 - @semantic-release/exec@^5.0.00 + node-version: 'lts/*' + + - name: install dependencies + run: npm ci + + - name: trick semantic check + id: rc + run: | + # Trick semantic-release into thinking we're not in a CI environment + unset GITHUB_ACTIONS + unset GITHUB_EVENT_NAME + + npx semantic-release --dry-run --no-ci --branches $GITHUB_HEAD_REF env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: rc check + # id: rc + # uses: cycjimmy/semantic-release-action@v4 + # with: + # dry_run: true + # semantic_version: 17.1.1 + # extra_plugins: | + # conventional-changelog-conventionalcommits@^4.4.0 + # @semantic-release/changelog@^5.0.1 + # @semantic-release/git@^9.0.0 + # @semantic-release/exec@^5.0.00 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build_dev_ee: name: dev_ee needs: rc From 11c06d29854c29753e17525aa0cf7a9d0a62145a Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:26:42 +0300 Subject: [PATCH 070/125] fix: trick semantic --- .github/workflows/ci.yml | 124 ++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 61 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66fff6cd0..a77236f66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,64 +14,64 @@ env: jobs: - ## Sanity is required: - # - # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html - sanity: - name: Sanity (Ⓐ${{ matrix.ansible }}) - strategy: - matrix: - include: - - ansible: "2.15" - python_ver: "3.11" - # - ansible: "2.16" TODO temp disabled to speed up testing - # python_ver: "3.11" - # - ansible: "2.17" - # python_ver: "3.11" - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - steps: - - uses: actions/checkout@v4 - with: - path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python_ver }} - - - name: Install Poetry - uses: Gr1N/setup-poetry@v8 - #with: - # poetry-version: 1.0.10 - - # Install the head of the given branch (devel, stable-2.10) - - name: Install ansible-base (${{ matrix.ansible }}) - run: poetry run pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible }}.tar.gz --disable-pip-version-check - - - name: Create lock file - run: poetry lock - - #- name: Cache poetry dependencies - # uses: actions/cache@v2 - # with: - # #path: ~/.cache/pypoetry/virtualenvs - # #key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} - # ##restore-keys: | - # ## ${{ runner.os }}-poetry-${{ matrix.python-version }}- - # path: ${{ steps.poetry-cache.outputs.dir }} - # key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} - # restore-keys: | - # ${{ runner.os }}-poetry- - - - name: Install dependencies - run: poetry install - - - name: Run sanity tests - timeout-minutes: 8 - run: poetry run make new-sanity + # ## Sanity is required: + # # + # # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html + # sanity: + # name: Sanity (Ⓐ${{ matrix.ansible }}) + # strategy: + # matrix: + # include: + # - ansible: "2.15" + # python_ver: "3.11" + # - ansible: "2.16" + # python_ver: "3.11" + # - ansible: "2.17" + # python_ver: "3.11" + # runs-on: ubuntu-latest + # defaults: + # run: + # working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + # steps: + # - uses: actions/checkout@v4 + # with: + # path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + # - name: Setup Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python_ver }} + + # - name: Install Poetry + # uses: Gr1N/setup-poetry@v8 + # #with: + # # poetry-version: 1.0.10 + + # # Install the head of the given branch (devel, stable-2.10) + # - name: Install ansible-base (${{ matrix.ansible }}) + # run: poetry run pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible }}.tar.gz --disable-pip-version-check + + # - name: Create lock file + # run: poetry lock + + # #- name: Cache poetry dependencies + # # uses: actions/cache@v2 + # # with: + # # #path: ~/.cache/pypoetry/virtualenvs + # # #key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + # # ##restore-keys: | + # # ## ${{ runner.os }}-poetry-${{ matrix.python-version }}- + # # path: ${{ steps.poetry-cache.outputs.dir }} + # # key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} + # # restore-keys: | + # # ${{ runner.os }}-poetry- + + # - name: Install dependencies + # run: poetry install + + # - name: Run sanity tests + # timeout-minutes: 8 + # run: poetry run make new-sanity # Ansible-lint is a requirement for certification, and was added to the # certification pipeline 20 June 2023 per Ansible Partner Engineering @@ -137,7 +137,8 @@ jobs: release: name: release if: github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: [sanity, tox, lint, format] + # needs: [sanity, tox, lint, format] TEMP + needs: [tox, lint, format] runs-on: ubuntu-latest steps: @@ -261,7 +262,8 @@ jobs: rc: name: Check rc EE runs-on: ubuntu-latest - needs: [sanity, tox, lint, format] + # needs: [sanity, tox, lint, format] TEMP + needs: [tox, lint, format] if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') outputs: rc: ${{ steps.rc.outputs.new_release_published }} @@ -271,7 +273,7 @@ jobs: uses: actions/checkout@v4 - name: setup node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: 'lts/*' From 2bd67aa0291d09c27be6f66d1e529f3c19671536 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:33:19 +0300 Subject: [PATCH 071/125] fix: trick semantic --- .github/workflows/ci.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a77236f66..c8103ab58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,7 +138,7 @@ jobs: name: release if: github.event_name == 'push' && github.ref == 'refs/heads/main' # needs: [sanity, tox, lint, format] TEMP - needs: [tox, lint, format] + needs: [tox] runs-on: ubuntu-latest steps: @@ -263,7 +263,7 @@ jobs: name: Check rc EE runs-on: ubuntu-latest # needs: [sanity, tox, lint, format] TEMP - needs: [tox, lint, format] + needs: [tox] if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') outputs: rc: ${{ steps.rc.outputs.new_release_published }} @@ -272,10 +272,15 @@ jobs: - name: checkout code uses: actions/checkout@v4 - - name: setup node.js - uses: actions/setup-node@v4 + # - name: setup node.js + # uses: actions/setup-node@v4 + # with: + # node-version: 'lts/*' + + - uses: actions/setup-node@v4 with: - node-version: 'lts/*' + node-version: 20 + cache: 'npm' - name: install dependencies run: npm ci From 47d3cea550c1e860da0de277dd40238b34a43b65 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:38:37 +0300 Subject: [PATCH 072/125] fix: trick semantic --- .github/workflows/ci.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8103ab58..323a7b8d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -272,18 +272,20 @@ jobs: - name: checkout code uses: actions/checkout@v4 - # - name: setup node.js - # uses: actions/setup-node@v4 - # with: - # node-version: 'lts/*' - - - uses: actions/setup-node@v4 + - name: setup node.js + uses: actions/setup-node@v4 with: - node-version: 20 - cache: 'npm' + node-version: 'lts/*' + + # - uses: actions/setup-node@v4 + # with: + # node-version: 20 + # cache: 'npm' - name: install dependencies - run: npm ci + run: | + npm install + npm ci - name: trick semantic check id: rc From 9db37ba75862b336eddfe2a7d559570562f5e980 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:42:53 +0300 Subject: [PATCH 073/125] fix: trick semantic --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 323a7b8d5..6b11b21ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -284,8 +284,9 @@ jobs: - name: install dependencies run: | - npm install - npm ci + npx semantic-release + # npm install + # npm ci - name: trick semantic check id: rc From 8623a7a0a40d508580c2a15e1a94f92749bb23c5 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:46:18 +0300 Subject: [PATCH 074/125] fix: trick semantic --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b11b21ce..b2ff6b909 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -284,7 +284,8 @@ jobs: - name: install dependencies run: | - npx semantic-release + npm install --save-dev semantic-release + # npx semantic-release # npm install # npm ci From b2df5ecbb1a2c76f4604ae3ac89e443c7dd35d80 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:48:14 +0300 Subject: [PATCH 075/125] fix: trick semantic --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2ff6b909..91d9aca77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -285,6 +285,7 @@ jobs: - name: install dependencies run: | npm install --save-dev semantic-release + npm install @semantic-release/exec -D # npx semantic-release # npm install # npm ci From d221ce78f18475da579c38c80321a6edc1e72d44 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:53:09 +0300 Subject: [PATCH 076/125] fix: trick semantic --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91d9aca77..720ec3c04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -286,6 +286,8 @@ jobs: run: | npm install --save-dev semantic-release npm install @semantic-release/exec -D + npm install @semantic-release/changelog -D + npm install @semantic-release/git -D # npx semantic-release # npm install # npm ci From 68b0f0bb31124de1fb83d514898e6f0fad383b0c Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:56:27 +0300 Subject: [PATCH 077/125] fix: trick semantic --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 720ec3c04..5dbb6b2d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -299,9 +299,11 @@ jobs: unset GITHUB_ACTIONS unset GITHUB_EVENT_NAME - npx semantic-release --dry-run --no-ci --branches $GITHUB_HEAD_REF + npx semantic-release --dry-run --no-ci --branches '${HEAD_REF}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HEAD_REF: ${{ github.head_ref }} + # - name: rc check # id: rc From 5fd4dcec213d36d6f8149fc910121041f5975dfc Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 15:59:12 +0300 Subject: [PATCH 078/125] fix: trick semantic --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dbb6b2d0..bcd91f8d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -298,6 +298,7 @@ jobs: # Trick semantic-release into thinking we're not in a CI environment unset GITHUB_ACTIONS unset GITHUB_EVENT_NAME + echo "headref is: $HEAD_REF" npx semantic-release --dry-run --no-ci --branches '${HEAD_REF}' env: From 5ffab618c07fd1081ab174f6c08ad9f338c6558a Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:02:05 +0300 Subject: [PATCH 079/125] fix: trick semantic --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcd91f8d3..f7a2b21c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -303,7 +303,7 @@ jobs: npx semantic-release --dry-run --no-ci --branches '${HEAD_REF}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HEAD_REF: ${{ github.head_ref }} + HEAD_REF: ${{ github.ref }} # - name: rc check From 47f372ff6cd65fefc6e52d505492f604c3ddccb9 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:07:02 +0300 Subject: [PATCH 080/125] fix: trick semantic --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7a2b21c6..e583e65ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -300,12 +300,11 @@ jobs: unset GITHUB_EVENT_NAME echo "headref is: $HEAD_REF" - npx semantic-release --dry-run --no-ci --branches '${HEAD_REF}' + npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HEAD_REF: ${{ github.ref }} - # - name: rc check # id: rc # uses: cycjimmy/semantic-release-action@v4 From cec5bdb550d9c14c34a6f0fa4df4099ceafd7c59 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:11:39 +0300 Subject: [PATCH 081/125] fix: trick semantic --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e583e65ec..f6212c67e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -296,11 +296,12 @@ jobs: id: rc run: | # Trick semantic-release into thinking we're not in a CI environment - unset GITHUB_ACTIONS - unset GITHUB_EVENT_NAME - echo "headref is: $HEAD_REF" - - npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}' + OUTPUT="$(bash -c "unset GITHUB_ACTIONS && unset GITHUB_EVENT_NAME && npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}'")" + echo "$OUTPUT" + # echo "headref is: $HEAD_REF" + # unset GITHUB_ACTIONS + # unset GITHUB_EVENT_NAME + # npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HEAD_REF: ${{ github.ref }} From 4eb1d975478325b4241e75a1a9c4cf762cb74d49 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:14:21 +0300 Subject: [PATCH 082/125] fix: trick semantic --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6212c67e..434dce93d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -285,9 +285,10 @@ jobs: - name: install dependencies run: | npm install --save-dev semantic-release - npm install @semantic-release/exec -D + npm install @semantic-release/commit-analyzer -D npm install @semantic-release/changelog -D npm install @semantic-release/git -D + npm install @semantic-release/exec -D # npx semantic-release # npm install # npm ci From 27a5fe087c40edf406944830071c0f8af654cfb2 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:17:36 +0300 Subject: [PATCH 083/125] fix: trick semantic --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 434dce93d..318aca8aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -286,6 +286,7 @@ jobs: run: | npm install --save-dev semantic-release npm install @semantic-release/commit-analyzer -D + npm install conventional-changelog-conventionalcommits -D npm install @semantic-release/changelog -D npm install @semantic-release/git -D npm install @semantic-release/exec -D From ced4e06cc9fffd65ec5e4b97dd215351d7bbadf7 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:48:41 +0300 Subject: [PATCH 084/125] fix: trick semantic --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 318aca8aa..422198d4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -267,6 +267,7 @@ jobs: if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') outputs: rc: ${{ steps.rc.outputs.new_release_published }} + new_release_version: ${{ steps.rc.outputs.new_release_version }} steps: - name: checkout code @@ -299,7 +300,15 @@ jobs: run: | # Trick semantic-release into thinking we're not in a CI environment OUTPUT="$(bash -c "unset GITHUB_ACTIONS && unset GITHUB_EVENT_NAME && npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}'")" - echo "$OUTPUT" + # NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(\d+\.\d+\.\d+)') + NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?') + echo "new_release_version=$NEW_RELEASE_VERSION" >> "$GITHUB_OUTPUT" + + if [ -z "$NEW_RELEASE_VERSION" ]; then + echo "new_release_published=false" >> "$GITHUB_OUTPUT" + else + echo "new_release_published=true" >> "$GITHUB_OUTPUT" + fi # echo "headref is: $HEAD_REF" # unset GITHUB_ACTIONS # unset GITHUB_EVENT_NAME From 2b77ad1fa72223f8439b5d2871ccd5e63468c1a4 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 16:59:38 +0300 Subject: [PATCH 085/125] fix: trick semantic --- .github/workflows/ee.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 9d7463115..30c000d85 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -89,7 +89,7 @@ jobs: - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: determine docker tags and labels for development image + - name: determine docker tags and labels id: meta uses: docker/metadata-action@v5 with: @@ -126,7 +126,7 @@ jobs: - name: Build collection from development branch run: | ansible-galaxy collection build --output-path ../../../ - if: ${{ inputs.release == 'false' }} + if: ${{ inputs.release == false }} - name: create base EE file run: | @@ -197,7 +197,7 @@ jobs: echo "::group::requirements.yml" cat requirements.yml echo "::endgroup::" - if: ${{ inputs.release == 'false' }} + if: ${{ inputs.release == false }} working-directory: . - name: append build files to EE file for release From 0490c30d84fdbeadfe4221d9407c861c24218aef Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 17:11:17 +0300 Subject: [PATCH 086/125] fix: trick semantic --- .github/workflows/ci.yml | 20 +++++++------------- .github/workflows/ee.yml | 27 ++------------------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 422198d4e..8bb6d0ed5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -278,11 +278,6 @@ jobs: with: node-version: 'lts/*' - # - uses: actions/setup-node@v4 - # with: - # node-version: 20 - # cache: 'npm' - - name: install dependencies run: | npm install --save-dev semantic-release @@ -292,15 +287,16 @@ jobs: npm install @semantic-release/git -D npm install @semantic-release/exec -D # npx semantic-release - # npm install # npm ci - name: trick semantic check id: rc run: | # Trick semantic-release into thinking we're not in a CI environment - OUTPUT="$(bash -c "unset GITHUB_ACTIONS && unset GITHUB_EVENT_NAME && npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}'")" - # NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(\d+\.\d+\.\d+)') + OUTPUT="$(bash -c "unset GITHUB_ACTIONS && unset GITHUB_EVENT_NAME && npx semantic-release --dry-run --no-ci --branches '${GITHUB_REF#refs/heads/}'")" + # print output + echo "$OUTPUT" + # grep with semver regex - \K means to start matching from here in Perl regex NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?') echo "new_release_version=$NEW_RELEASE_VERSION" >> "$GITHUB_OUTPUT" @@ -309,14 +305,12 @@ jobs: else echo "new_release_published=true" >> "$GITHUB_OUTPUT" fi - # echo "headref is: $HEAD_REF" - # unset GITHUB_ACTIONS - # unset GITHUB_EVENT_NAME - # npx semantic-release --dry-run --no-ci --branches '${HEAD_REF#refs/heads/}' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HEAD_REF: ${{ github.ref }} + GITHUB_REF: ${{ github.ref }} + # below does NOT work because semantic-release expects branch name in the config even in dry-run + # but we run rc check in non main branches # - name: rc check # id: rc # uses: cycjimmy/semantic-release-action@v4 diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 30c000d85..8bdaf69f2 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -13,32 +13,17 @@ on: description: EE for a release or development type: boolean default: false - # push: - # branches: - # - develop - # tags: - # - 'v*' - # release: - # types: [published] - # workflow_run: # NOTE workflow runs from default branch.. - # workflows: ['CI'] - # types: completed env: NAMESPACE: paloaltonetworks COLLECTION_NAME: panos PYTHON_VERSION: 3.9 # TODO do we need this, as we take it from pyproject.yml ? - - # one job can run on push to develop branch or on manual workflow_dispatch ? - # and other job can run on release published (hoping release happens after being published to galaxy..) - jobs: build_ee: name: Ansible EE runs-on: ubuntu-latest - # if: inputs.release == 'false' permissions: contents: read @@ -49,13 +34,6 @@ jobs: working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: - # - name: debug github event - # id: tag - # run: | - # echo "github event: ${{ github.event }}" - # echo "github event workflow_run: ${{github.event.workflow_run}}" - # echo "github event workflow_run head: ${{github.event.workflow_run.head_branch}}" - # exit 1 - name: check out code uses: actions/checkout@v4 @@ -69,7 +47,7 @@ jobs: PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') echo "pyversion=$PYVER" >> $GITHUB_OUTPUT # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 - # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline + # working-directory doesn't work with uses, until you get a `with path` similar to checkout, this is going to be inline - name: install Python uses: actions/setup-python@v4 @@ -101,7 +79,6 @@ jobs: type=semver,pattern=v{{major}} type=ref,event=branch type=ref,event=tag - # if: ${{ inputs.release == 'false' }} # - name: get version for release image # id: tag @@ -121,7 +98,7 @@ jobs: # type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} # if: inputs.release - # NOTE we should take pan-os-ansible from galaxy for a release, but use build for develop + # NOTE we should take pan-os-ansible from galaxy for a release, but local build for develop # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 - name: Build collection from development branch run: | From d45e27eaa7735d76a44145128fb7a238208a3169 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 26 Sep 2024 14:18:13 +0000 Subject: [PATCH 087/125] chore(release): 2.24.0 ## [2.24.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.23.1...v2.24.0) (2024-09-26) ### Features * new ee ci ([039b0f0](https://github.com/alperenkose/pan-os-ansible/commit/039b0f0e1d740bd8b99556bfc0b672aab6f8c405)) * refactor ee ci ([3916283](https://github.com/alperenkose/pan-os-ansible/commit/39162831869a6b6c2c04370820dc6338c9820248)) ### Bug Fixes * merge docker meta ([f1cf7ef](https://github.com/alperenkose/pan-os-ansible/commit/f1cf7efff96743f2babeac9beaf5ee5f3f67572f)) * new ee ci ([750f65e](https://github.com/alperenkose/pan-os-ansible/commit/750f65ecdb3865cec145cb8ebff800661185e07c)) * refactor ee ci ([46b5404](https://github.com/alperenkose/pan-os-ansible/commit/46b540466cb6e0ea531fc49d1269b745cc269b83)) * refactor ee ci ([4967797](https://github.com/alperenkose/pan-os-ansible/commit/4967797b695f9c3d4f3661726affa19a70431ec0)) * refactor ee ci ([c8c20df](https://github.com/alperenkose/pan-os-ansible/commit/c8c20df65845e7a10d1fe185c00f5f3425c72ffe)) * refactor ee ci ([69bd778](https://github.com/alperenkose/pan-os-ansible/commit/69bd778f5b313ff2f1d0fee0dc336c7747a4e8ad)) * trick semantic ([0490c30](https://github.com/alperenkose/pan-os-ansible/commit/0490c30d84fdbeadfe4221d9407c861c24218aef)) * trick semantic ([2b77ad1](https://github.com/alperenkose/pan-os-ansible/commit/2b77ad1fa72223f8439b5d2871ccd5e63468c1a4)) * trick semantic ([ced4e06](https://github.com/alperenkose/pan-os-ansible/commit/ced4e06cc9fffd65ec5e4b97dd215351d7bbadf7)) * trick semantic ([27a5fe0](https://github.com/alperenkose/pan-os-ansible/commit/27a5fe087c40edf406944830071c0f8af654cfb2)) * trick semantic ([4eb1d97](https://github.com/alperenkose/pan-os-ansible/commit/4eb1d975478325b4241e75a1a9c4cf762cb74d49)) * trick semantic ([cec5bdb](https://github.com/alperenkose/pan-os-ansible/commit/cec5bdb550d9c14c34a6f0fa4df4099ceafd7c59)) * trick semantic ([47f372f](https://github.com/alperenkose/pan-os-ansible/commit/47f372ff6cd65fefc6e52d505492f604c3ddccb9)) * trick semantic ([5ffab61](https://github.com/alperenkose/pan-os-ansible/commit/5ffab618c07fd1081ab174f6c08ad9f338c6558a)) * trick semantic ([5fd4dce](https://github.com/alperenkose/pan-os-ansible/commit/5fd4dcec213d36d6f8149fc910121041f5975dfc)) * trick semantic ([68b0f0b](https://github.com/alperenkose/pan-os-ansible/commit/68b0f0bb31124de1fb83d514898e6f0fad383b0c)) * trick semantic ([d221ce7](https://github.com/alperenkose/pan-os-ansible/commit/d221ce78f18475da579c38c80321a6edc1e72d44)) * trick semantic ([b2df5ec](https://github.com/alperenkose/pan-os-ansible/commit/b2df5ecbb1a2c76f4604ae3ac89e443c7dd35d80)) * trick semantic ([8623a7a](https://github.com/alperenkose/pan-os-ansible/commit/8623a7a0a40d508580c2a15e1a94f92749bb23c5)) * trick semantic ([9db37ba](https://github.com/alperenkose/pan-os-ansible/commit/9db37ba75862b336eddfe2a7d559570562f5e980)) * trick semantic ([47d3cea](https://github.com/alperenkose/pan-os-ansible/commit/47d3cea550c1e860da0de277dd40238b34a43b65)) * trick semantic ([2bd67aa](https://github.com/alperenkose/pan-os-ansible/commit/2bd67aa0291d09c27be6f66d1e529f3c19671536)) * trick semantic ([11c06d2](https://github.com/alperenkose/pan-os-ansible/commit/11c06d29854c29753e17525aa0cf7a9d0a62145a)) * trick semantic ([30c8232](https://github.com/alperenkose/pan-os-ansible/commit/30c8232680e8d3ffcfb2258deb116c99c2991068)) * work dir ([02c438a](https://github.com/alperenkose/pan-os-ansible/commit/02c438a6c905f22c8b38a6d6d3e18b714edd8b23)) --- CHANGELOG.md | 37 +++++++++++++++++++++++++++++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dc5864dd..364c1651e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,40 @@ +## [2.24.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.23.1...v2.24.0) (2024-09-26) + + +### Features + +* new ee ci ([039b0f0](https://github.com/alperenkose/pan-os-ansible/commit/039b0f0e1d740bd8b99556bfc0b672aab6f8c405)) +* refactor ee ci ([3916283](https://github.com/alperenkose/pan-os-ansible/commit/39162831869a6b6c2c04370820dc6338c9820248)) + + +### Bug Fixes + +* merge docker meta ([f1cf7ef](https://github.com/alperenkose/pan-os-ansible/commit/f1cf7efff96743f2babeac9beaf5ee5f3f67572f)) +* new ee ci ([750f65e](https://github.com/alperenkose/pan-os-ansible/commit/750f65ecdb3865cec145cb8ebff800661185e07c)) +* refactor ee ci ([46b5404](https://github.com/alperenkose/pan-os-ansible/commit/46b540466cb6e0ea531fc49d1269b745cc269b83)) +* refactor ee ci ([4967797](https://github.com/alperenkose/pan-os-ansible/commit/4967797b695f9c3d4f3661726affa19a70431ec0)) +* refactor ee ci ([c8c20df](https://github.com/alperenkose/pan-os-ansible/commit/c8c20df65845e7a10d1fe185c00f5f3425c72ffe)) +* refactor ee ci ([69bd778](https://github.com/alperenkose/pan-os-ansible/commit/69bd778f5b313ff2f1d0fee0dc336c7747a4e8ad)) +* trick semantic ([0490c30](https://github.com/alperenkose/pan-os-ansible/commit/0490c30d84fdbeadfe4221d9407c861c24218aef)) +* trick semantic ([2b77ad1](https://github.com/alperenkose/pan-os-ansible/commit/2b77ad1fa72223f8439b5d2871ccd5e63468c1a4)) +* trick semantic ([ced4e06](https://github.com/alperenkose/pan-os-ansible/commit/ced4e06cc9fffd65ec5e4b97dd215351d7bbadf7)) +* trick semantic ([27a5fe0](https://github.com/alperenkose/pan-os-ansible/commit/27a5fe087c40edf406944830071c0f8af654cfb2)) +* trick semantic ([4eb1d97](https://github.com/alperenkose/pan-os-ansible/commit/4eb1d975478325b4241e75a1a9c4cf762cb74d49)) +* trick semantic ([cec5bdb](https://github.com/alperenkose/pan-os-ansible/commit/cec5bdb550d9c14c34a6f0fa4df4099ceafd7c59)) +* trick semantic ([47f372f](https://github.com/alperenkose/pan-os-ansible/commit/47f372ff6cd65fefc6e52d505492f604c3ddccb9)) +* trick semantic ([5ffab61](https://github.com/alperenkose/pan-os-ansible/commit/5ffab618c07fd1081ab174f6c08ad9f338c6558a)) +* trick semantic ([5fd4dce](https://github.com/alperenkose/pan-os-ansible/commit/5fd4dcec213d36d6f8149fc910121041f5975dfc)) +* trick semantic ([68b0f0b](https://github.com/alperenkose/pan-os-ansible/commit/68b0f0bb31124de1fb83d514898e6f0fad383b0c)) +* trick semantic ([d221ce7](https://github.com/alperenkose/pan-os-ansible/commit/d221ce78f18475da579c38c80321a6edc1e72d44)) +* trick semantic ([b2df5ec](https://github.com/alperenkose/pan-os-ansible/commit/b2df5ecbb1a2c76f4604ae3ac89e443c7dd35d80)) +* trick semantic ([8623a7a](https://github.com/alperenkose/pan-os-ansible/commit/8623a7a0a40d508580c2a15e1a94f92749bb23c5)) +* trick semantic ([9db37ba](https://github.com/alperenkose/pan-os-ansible/commit/9db37ba75862b336eddfe2a7d559570562f5e980)) +* trick semantic ([47d3cea](https://github.com/alperenkose/pan-os-ansible/commit/47d3cea550c1e860da0de277dd40238b34a43b65)) +* trick semantic ([2bd67aa](https://github.com/alperenkose/pan-os-ansible/commit/2bd67aa0291d09c27be6f66d1e529f3c19671536)) +* trick semantic ([11c06d2](https://github.com/alperenkose/pan-os-ansible/commit/11c06d29854c29753e17525aa0cf7a9d0a62145a)) +* trick semantic ([30c8232](https://github.com/alperenkose/pan-os-ansible/commit/30c8232680e8d3ffcfb2258deb116c99c2991068)) +* work dir ([02c438a](https://github.com/alperenkose/pan-os-ansible/commit/02c438a6c905f22c8b38a6d6d3e18b714edd8b23)) + ### [2.23.1](https://github.com/alperenkose/pan-os-ansible/compare/v2.23.0...v2.23.1) (2024-09-26) diff --git a/docs/source/index.rst b/docs/source/index.rst index 10d1c183c..6c152b290 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.23.1 +Version: 2.24.0 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index 7547535f3..11c58544e 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.23.1 +version: 2.24.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From acd225649aeae3a88ec5f1dad9d3f907c458acd8 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Thu, 26 Sep 2024 18:07:57 +0300 Subject: [PATCH 088/125] fix: trick semantic --- .github/workflows/ee.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 8bdaf69f2..69546507f 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -67,6 +67,12 @@ jobs: - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: get version for release image + id: tag + run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + if: inputs.release + + # TODO this didnot work for main, try with setting value for semver or check priority - name: determine docker tags and labels id: meta uses: docker/metadata-action@v5 @@ -74,17 +80,12 @@ jobs: context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible tags: | - type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} - type=semver,pattern=v{{major}} + type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} type=ref,event=branch type=ref,event=tag - # - name: get version for release image - # id: tag - # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - # if: inputs.release - # # TODO latest should only be tagged for release versions # - name: determine docker tags and labels for release image # id: meta From 230a702f875670d9b24880d13a71981b151c3ea0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 26 Sep 2024 15:28:08 +0000 Subject: [PATCH 089/125] chore(release): 2.25.0 ## [2.25.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.24.0...v2.25.0) (2024-09-26) ### Features * new ee ci ([5503279](https://github.com/alperenkose/pan-os-ansible/commit/5503279edc3acba8417acd47dea8019e17a10e09)) * refactor ee ci ([9b3d9e4](https://github.com/alperenkose/pan-os-ansible/commit/9b3d9e463cef4cad91ce5d2216e0af2da2921705)) ### Bug Fixes * merge docker meta ([5f7d68f](https://github.com/alperenkose/pan-os-ansible/commit/5f7d68f997e085cb274b253cf98be1352e556dff)) * new ee ci ([18f0103](https://github.com/alperenkose/pan-os-ansible/commit/18f0103cd604030c468d56e0440819470609bade)) * refactor ee ci ([760462e](https://github.com/alperenkose/pan-os-ansible/commit/760462ec6ec3bd94f8ce8e01f2e043bb1ba7ddc2)) * refactor ee ci ([20c6b97](https://github.com/alperenkose/pan-os-ansible/commit/20c6b9743815bbefd4ed75188888e27a1f3f38c3)) * refactor ee ci ([fee0c4b](https://github.com/alperenkose/pan-os-ansible/commit/fee0c4b8164d2dddc63f309eb00fe943c4622fc7)) * refactor ee ci ([a6459cb](https://github.com/alperenkose/pan-os-ansible/commit/a6459cb6f26a7095088d8dd63a250f7378fd2a00)) * trick semantic ([acd2256](https://github.com/alperenkose/pan-os-ansible/commit/acd225649aeae3a88ec5f1dad9d3f907c458acd8)) * trick semantic ([0907bcc](https://github.com/alperenkose/pan-os-ansible/commit/0907bcc076d496f22354408ac215efbf45dc1d3f)) * trick semantic ([518419f](https://github.com/alperenkose/pan-os-ansible/commit/518419f656fd9a0e45f8ee79dfb1b0714b8e9955)) * trick semantic ([c84f733](https://github.com/alperenkose/pan-os-ansible/commit/c84f73300359bcb659288b0d0e96564e4e0496ce)) * trick semantic ([ee52c05](https://github.com/alperenkose/pan-os-ansible/commit/ee52c05acf4214a728afa563f70020e5600db353)) * trick semantic ([533acc3](https://github.com/alperenkose/pan-os-ansible/commit/533acc31ba2a6269b33794a124f7b2ed5ba113db)) * trick semantic ([dc88640](https://github.com/alperenkose/pan-os-ansible/commit/dc88640535a449a5d1cda5e9b10884d3a37a9935)) * trick semantic ([0cf6feb](https://github.com/alperenkose/pan-os-ansible/commit/0cf6feb1fe38b2640a7ffe54b8206d1f1fde307b)) * trick semantic ([119e872](https://github.com/alperenkose/pan-os-ansible/commit/119e8723f320cb47d1e156b60c6c8fe8f0a3dc7b)) * trick semantic ([e3f4400](https://github.com/alperenkose/pan-os-ansible/commit/e3f4400443dfd3e7efb9113966d98aca8457493b)) * trick semantic ([4959ed4](https://github.com/alperenkose/pan-os-ansible/commit/4959ed4c287a1170778e16bb855cc965eefc4b95)) * trick semantic ([7fe91d0](https://github.com/alperenkose/pan-os-ansible/commit/7fe91d0012becfebaa79ca3770021a5d00601c3a)) * trick semantic ([30e6a1f](https://github.com/alperenkose/pan-os-ansible/commit/30e6a1fa01109e257ce9e39abc855fecea3c2ad0)) * trick semantic ([d4894a5](https://github.com/alperenkose/pan-os-ansible/commit/d4894a5438536b9b8aa5860b451564f8eb20985d)) * trick semantic ([fd3232d](https://github.com/alperenkose/pan-os-ansible/commit/fd3232df21b9224e9a95c0478e1bced3af01b533)) * trick semantic ([d11007d](https://github.com/alperenkose/pan-os-ansible/commit/d11007d74c249f6973a47a3aeec6e3561e0e72e5)) * trick semantic ([0436ce5](https://github.com/alperenkose/pan-os-ansible/commit/0436ce5e9ad55553609d6dc7df080d1bad3112cd)) * trick semantic ([4a01120](https://github.com/alperenkose/pan-os-ansible/commit/4a01120db43a18804d2b02573290afab93326351)) * trick semantic ([24d17ea](https://github.com/alperenkose/pan-os-ansible/commit/24d17ea1f31121e191045d1c916b3aeeea2ec3b8)) * work dir ([cb10ef9](https://github.com/alperenkose/pan-os-ansible/commit/cb10ef9f3703aec013655aec787d67c97f5d8956)) --- CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 364c1651e..018f07e8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,41 @@ +## [2.25.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.24.0...v2.25.0) (2024-09-26) + + +### Features + +* new ee ci ([5503279](https://github.com/alperenkose/pan-os-ansible/commit/5503279edc3acba8417acd47dea8019e17a10e09)) +* refactor ee ci ([9b3d9e4](https://github.com/alperenkose/pan-os-ansible/commit/9b3d9e463cef4cad91ce5d2216e0af2da2921705)) + + +### Bug Fixes + +* merge docker meta ([5f7d68f](https://github.com/alperenkose/pan-os-ansible/commit/5f7d68f997e085cb274b253cf98be1352e556dff)) +* new ee ci ([18f0103](https://github.com/alperenkose/pan-os-ansible/commit/18f0103cd604030c468d56e0440819470609bade)) +* refactor ee ci ([760462e](https://github.com/alperenkose/pan-os-ansible/commit/760462ec6ec3bd94f8ce8e01f2e043bb1ba7ddc2)) +* refactor ee ci ([20c6b97](https://github.com/alperenkose/pan-os-ansible/commit/20c6b9743815bbefd4ed75188888e27a1f3f38c3)) +* refactor ee ci ([fee0c4b](https://github.com/alperenkose/pan-os-ansible/commit/fee0c4b8164d2dddc63f309eb00fe943c4622fc7)) +* refactor ee ci ([a6459cb](https://github.com/alperenkose/pan-os-ansible/commit/a6459cb6f26a7095088d8dd63a250f7378fd2a00)) +* trick semantic ([acd2256](https://github.com/alperenkose/pan-os-ansible/commit/acd225649aeae3a88ec5f1dad9d3f907c458acd8)) +* trick semantic ([0907bcc](https://github.com/alperenkose/pan-os-ansible/commit/0907bcc076d496f22354408ac215efbf45dc1d3f)) +* trick semantic ([518419f](https://github.com/alperenkose/pan-os-ansible/commit/518419f656fd9a0e45f8ee79dfb1b0714b8e9955)) +* trick semantic ([c84f733](https://github.com/alperenkose/pan-os-ansible/commit/c84f73300359bcb659288b0d0e96564e4e0496ce)) +* trick semantic ([ee52c05](https://github.com/alperenkose/pan-os-ansible/commit/ee52c05acf4214a728afa563f70020e5600db353)) +* trick semantic ([533acc3](https://github.com/alperenkose/pan-os-ansible/commit/533acc31ba2a6269b33794a124f7b2ed5ba113db)) +* trick semantic ([dc88640](https://github.com/alperenkose/pan-os-ansible/commit/dc88640535a449a5d1cda5e9b10884d3a37a9935)) +* trick semantic ([0cf6feb](https://github.com/alperenkose/pan-os-ansible/commit/0cf6feb1fe38b2640a7ffe54b8206d1f1fde307b)) +* trick semantic ([119e872](https://github.com/alperenkose/pan-os-ansible/commit/119e8723f320cb47d1e156b60c6c8fe8f0a3dc7b)) +* trick semantic ([e3f4400](https://github.com/alperenkose/pan-os-ansible/commit/e3f4400443dfd3e7efb9113966d98aca8457493b)) +* trick semantic ([4959ed4](https://github.com/alperenkose/pan-os-ansible/commit/4959ed4c287a1170778e16bb855cc965eefc4b95)) +* trick semantic ([7fe91d0](https://github.com/alperenkose/pan-os-ansible/commit/7fe91d0012becfebaa79ca3770021a5d00601c3a)) +* trick semantic ([30e6a1f](https://github.com/alperenkose/pan-os-ansible/commit/30e6a1fa01109e257ce9e39abc855fecea3c2ad0)) +* trick semantic ([d4894a5](https://github.com/alperenkose/pan-os-ansible/commit/d4894a5438536b9b8aa5860b451564f8eb20985d)) +* trick semantic ([fd3232d](https://github.com/alperenkose/pan-os-ansible/commit/fd3232df21b9224e9a95c0478e1bced3af01b533)) +* trick semantic ([d11007d](https://github.com/alperenkose/pan-os-ansible/commit/d11007d74c249f6973a47a3aeec6e3561e0e72e5)) +* trick semantic ([0436ce5](https://github.com/alperenkose/pan-os-ansible/commit/0436ce5e9ad55553609d6dc7df080d1bad3112cd)) +* trick semantic ([4a01120](https://github.com/alperenkose/pan-os-ansible/commit/4a01120db43a18804d2b02573290afab93326351)) +* trick semantic ([24d17ea](https://github.com/alperenkose/pan-os-ansible/commit/24d17ea1f31121e191045d1c916b3aeeea2ec3b8)) +* work dir ([cb10ef9](https://github.com/alperenkose/pan-os-ansible/commit/cb10ef9f3703aec013655aec787d67c97f5d8956)) + ## [2.24.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.23.1...v2.24.0) (2024-09-26) diff --git a/docs/source/index.rst b/docs/source/index.rst index 6c152b290..dd15cd989 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.24.0 +Version: 2.25.0 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index 11c58544e..cd60557c3 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.24.0 +version: 2.25.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From e9a55f3c3cbac849dc67063880710ef1befc2470 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 11:08:03 +0300 Subject: [PATCH 090/125] fix: refactor ee ci --- .github/workflows/ci.yml | 5 +++ .github/workflows/ee.yml | 87 +++++++++++++++++++++++++++++++++++----- 2 files changed, 81 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bb6d0ed5..5ca9cf3f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,6 +140,10 @@ jobs: # needs: [sanity, tox, lint, format] TEMP needs: [tox] runs-on: ubuntu-latest + outputs: + new_release_published: ${{ steps.release.outputs.new_release_published }} + new_release_version: ${{ steps.release.outputs.new_release_version }} + new_release_git_tag: ${{ steps.release.outputs.new_release_git_tag }} steps: - name: Checkout @@ -337,3 +341,4 @@ jobs: uses: ./.github/workflows/ee.yml with: release: true + release_tag: needs.release.outputs.new_release_git_tag diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 69546507f..42e5cdf2d 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -4,9 +4,13 @@ on: workflow_call: inputs: release: - description: EE for a release or development + description: Prepare EE for a release type: boolean default: false + release_tag: # tag starting with 'v' like v1.2.3 + description: Git tag for release to prepare EE + type: string + required: false workflow_dispatch: inputs: release: @@ -34,11 +38,69 @@ jobs: working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: - + # if event == workflow_call and inputs.release == true + # release_tag must be given as input + # checkout tag and prepare EE on tag + # elif event == workflow_call and inputs.release == false + # normal checkout - it will checkout whatever the workflow is run on + # prepare EE on branch + # elif event == workflow_dispatch and inputs.release == true + # workflow must be run on a tag + # checkout tag and prepare EE on tag + # elif event == workflow_dispatch and inputs.release == false + # normal checkout - it will checkout whatever the workflow is run on + # prepare EE on branch + + - name: check and findout the tag + id: tag + run: | + if [[ "${{ github.event_name }}" == "workflow_call" && + "${{ inputs.release }}" == "true" ]]; then + if [[ "${{ inputs.release_tag }}" != "v"* ]]; then + echo "release_tag (${{ inputs.release_tag }}) must be provided when workflow_call called with release." + exit 1 + fi + TAG_VERSION=$(echo "${{inputs.release_tag}}" | sed 's#v##') + echo "name=${{inputs.release_tag}}" >> $GITHUB_OUTPUT + echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT + echo "Ansible EE will be prepared for release ${{ inputs.release_tag }}" + elif [[ "${{ github.event_name }}" == "workflow_call" ]]; then + echo "Ansible EE will be prepared for branch ${GITHUB_REF#refs/heads/}" + elif [[ "${{ github.event_name }}" == "workflow_dispatch" && + "${{ inputs.release }}" == "true" ]]; then + if [[ "${GITHUB_REF}" != "refs/tags/v"* ]]; then + echo "workflow_dispatch must be run on a release tag when release is selected - run on ${GITHUB_REF}" + exit 1 + fi + TAG_NAME=$(echo "${GITHUB_REF}" | sed 's#refs/tags/##') + TAG_VERSION=$(echo "${TAG_NAME}" | sed 's#v##') + echo "name=$TAG_NAME" >> $GITHUB_OUTPUT + echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT + echo "Ansible EE will be prepared for release $TAG_NAME" + else + echo "Ansible EE will be prepared for branch ${GITHUB_REF#refs/heads/}" + fi + # if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then + # echo "This workflow is run on tag: ${{ github.ref }}" + # TAG_NAME=$(echo "${{ github.ref }}" | sed 's#refs/tags/##') + # echo "name=$TAG_NAME" >> $GITHUB_OUTPUT + # echo "Tag: $TAG_NAME" + # else + # echo "This workflow is not run on a tag" + # exit 1 + # fi + env: + GITHUB_REF: ${{ github.ref }} + # outputs tag name as v1.2.3 + + # TODO CHECKOUT tag.outputs.name BUT IS IT POSSIBLE TO OMIT TAG WHEN IT'S EMPTY? + # so we can checkout the branch itself when tag is empty - name: check out code uses: actions/checkout@v4 with: path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + ref: ${{ steps.tag.outputs.name == '' && github.ref || steps.tag.outputs.name }} + # if tag is empty; github.ref else tag.outputs.name - name: discover Python version id: pyversion @@ -67,12 +129,15 @@ jobs: - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: get version for release image - id: tag - run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - if: inputs.release + # TODO version wrong in pyproject.toml + # this DOES NOT start with v + # - name: get version for release image + # id: tag + # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + # if: inputs.release - # TODO this didnot work for main, try with setting value for semver or check priority + # TODO try release from tag to exclude main label + # we should NOT need value if we check out with tag?? - name: determine docker tags and labels id: meta uses: docker/metadata-action@v5 @@ -80,9 +145,9 @@ jobs: context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible tags: | - type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} type=ref,event=branch type=ref,event=tag @@ -197,7 +262,7 @@ jobs: --- collections: - name: paloaltonetworks.panos - version: ${{steps.tag.outputs.version_tag}} + version: ${{steps.tag.outputs.version}} - name: awx.awx - community.general EOF From c7e1fafa4665de4af32adb68d10d8aef230ef40b Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 11:11:01 +0300 Subject: [PATCH 091/125] fix: refactor ee ci --- .github/workflows/ee.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 42e5cdf2d..3beb3659b 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -53,6 +53,7 @@ jobs: - name: check and findout the tag id: tag + # outputs tag name as v1.2.3 and version as 1.2.3 run: | if [[ "${{ github.event_name }}" == "workflow_call" && "${{ inputs.release }}" == "true" ]]; then @@ -91,7 +92,7 @@ jobs: # fi env: GITHUB_REF: ${{ github.ref }} - # outputs tag name as v1.2.3 + working-directory: . # TODO CHECKOUT tag.outputs.name BUT IS IT POSSIBLE TO OMIT TAG WHEN IT'S EMPTY? # so we can checkout the branch itself when tag is empty From 4f4edd9a7e4e52896b327112912317a3f367cf60 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 11:08:03 +0300 Subject: [PATCH 092/125] fix: refactor ee ci --- .github/workflows/ci.yml | 5 +++ .github/workflows/ee.yml | 87 +++++++++++++++++++++++++++++++++++----- 2 files changed, 81 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bb6d0ed5..5ca9cf3f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,6 +140,10 @@ jobs: # needs: [sanity, tox, lint, format] TEMP needs: [tox] runs-on: ubuntu-latest + outputs: + new_release_published: ${{ steps.release.outputs.new_release_published }} + new_release_version: ${{ steps.release.outputs.new_release_version }} + new_release_git_tag: ${{ steps.release.outputs.new_release_git_tag }} steps: - name: Checkout @@ -337,3 +341,4 @@ jobs: uses: ./.github/workflows/ee.yml with: release: true + release_tag: needs.release.outputs.new_release_git_tag diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 69546507f..42e5cdf2d 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -4,9 +4,13 @@ on: workflow_call: inputs: release: - description: EE for a release or development + description: Prepare EE for a release type: boolean default: false + release_tag: # tag starting with 'v' like v1.2.3 + description: Git tag for release to prepare EE + type: string + required: false workflow_dispatch: inputs: release: @@ -34,11 +38,69 @@ jobs: working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: - + # if event == workflow_call and inputs.release == true + # release_tag must be given as input + # checkout tag and prepare EE on tag + # elif event == workflow_call and inputs.release == false + # normal checkout - it will checkout whatever the workflow is run on + # prepare EE on branch + # elif event == workflow_dispatch and inputs.release == true + # workflow must be run on a tag + # checkout tag and prepare EE on tag + # elif event == workflow_dispatch and inputs.release == false + # normal checkout - it will checkout whatever the workflow is run on + # prepare EE on branch + + - name: check and findout the tag + id: tag + run: | + if [[ "${{ github.event_name }}" == "workflow_call" && + "${{ inputs.release }}" == "true" ]]; then + if [[ "${{ inputs.release_tag }}" != "v"* ]]; then + echo "release_tag (${{ inputs.release_tag }}) must be provided when workflow_call called with release." + exit 1 + fi + TAG_VERSION=$(echo "${{inputs.release_tag}}" | sed 's#v##') + echo "name=${{inputs.release_tag}}" >> $GITHUB_OUTPUT + echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT + echo "Ansible EE will be prepared for release ${{ inputs.release_tag }}" + elif [[ "${{ github.event_name }}" == "workflow_call" ]]; then + echo "Ansible EE will be prepared for branch ${GITHUB_REF#refs/heads/}" + elif [[ "${{ github.event_name }}" == "workflow_dispatch" && + "${{ inputs.release }}" == "true" ]]; then + if [[ "${GITHUB_REF}" != "refs/tags/v"* ]]; then + echo "workflow_dispatch must be run on a release tag when release is selected - run on ${GITHUB_REF}" + exit 1 + fi + TAG_NAME=$(echo "${GITHUB_REF}" | sed 's#refs/tags/##') + TAG_VERSION=$(echo "${TAG_NAME}" | sed 's#v##') + echo "name=$TAG_NAME" >> $GITHUB_OUTPUT + echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT + echo "Ansible EE will be prepared for release $TAG_NAME" + else + echo "Ansible EE will be prepared for branch ${GITHUB_REF#refs/heads/}" + fi + # if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then + # echo "This workflow is run on tag: ${{ github.ref }}" + # TAG_NAME=$(echo "${{ github.ref }}" | sed 's#refs/tags/##') + # echo "name=$TAG_NAME" >> $GITHUB_OUTPUT + # echo "Tag: $TAG_NAME" + # else + # echo "This workflow is not run on a tag" + # exit 1 + # fi + env: + GITHUB_REF: ${{ github.ref }} + # outputs tag name as v1.2.3 + + # TODO CHECKOUT tag.outputs.name BUT IS IT POSSIBLE TO OMIT TAG WHEN IT'S EMPTY? + # so we can checkout the branch itself when tag is empty - name: check out code uses: actions/checkout@v4 with: path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + ref: ${{ steps.tag.outputs.name == '' && github.ref || steps.tag.outputs.name }} + # if tag is empty; github.ref else tag.outputs.name - name: discover Python version id: pyversion @@ -67,12 +129,15 @@ jobs: - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: get version for release image - id: tag - run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - if: inputs.release + # TODO version wrong in pyproject.toml + # this DOES NOT start with v + # - name: get version for release image + # id: tag + # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT + # if: inputs.release - # TODO this didnot work for main, try with setting value for semver or check priority + # TODO try release from tag to exclude main label + # we should NOT need value if we check out with tag?? - name: determine docker tags and labels id: meta uses: docker/metadata-action@v5 @@ -80,9 +145,9 @@ jobs: context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible tags: | - type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} - type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} type=ref,event=branch type=ref,event=tag @@ -197,7 +262,7 @@ jobs: --- collections: - name: paloaltonetworks.panos - version: ${{steps.tag.outputs.version_tag}} + version: ${{steps.tag.outputs.version}} - name: awx.awx - community.general EOF From b2fe9857727b7b0711a03a113bfa6fd5cf34c2e0 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 11:11:01 +0300 Subject: [PATCH 093/125] fix: refactor ee ci --- .github/workflows/ee.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 42e5cdf2d..3beb3659b 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -53,6 +53,7 @@ jobs: - name: check and findout the tag id: tag + # outputs tag name as v1.2.3 and version as 1.2.3 run: | if [[ "${{ github.event_name }}" == "workflow_call" && "${{ inputs.release }}" == "true" ]]; then @@ -91,7 +92,7 @@ jobs: # fi env: GITHUB_REF: ${{ github.ref }} - # outputs tag name as v1.2.3 + working-directory: . # TODO CHECKOUT tag.outputs.name BUT IS IT POSSIBLE TO OMIT TAG WHEN IT'S EMPTY? # so we can checkout the branch itself when tag is empty From b84f88c4fcf7860f3d67e776987e0bc6e6474fe4 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 27 Sep 2024 08:32:23 +0000 Subject: [PATCH 094/125] chore(release): 2.25.1 ### [2.25.1](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.0...v2.25.1) (2024-09-27) ### Bug Fixes * refactor ee ci ([b2fe985](https://github.com/alperenkose/pan-os-ansible/commit/b2fe9857727b7b0711a03a113bfa6fd5cf34c2e0)) * refactor ee ci ([4f4edd9](https://github.com/alperenkose/pan-os-ansible/commit/4f4edd9a7e4e52896b327112912317a3f367cf60)) * refactor ee ci ([c7e1faf](https://github.com/alperenkose/pan-os-ansible/commit/c7e1fafa4665de4af32adb68d10d8aef230ef40b)) * refactor ee ci ([e9a55f3](https://github.com/alperenkose/pan-os-ansible/commit/e9a55f3c3cbac849dc67063880710ef1befc2470)) --- CHANGELOG.md | 10 ++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 018f07e8f..8abc91641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +### [2.25.1](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.0...v2.25.1) (2024-09-27) + + +### Bug Fixes + +* refactor ee ci ([b2fe985](https://github.com/alperenkose/pan-os-ansible/commit/b2fe9857727b7b0711a03a113bfa6fd5cf34c2e0)) +* refactor ee ci ([4f4edd9](https://github.com/alperenkose/pan-os-ansible/commit/4f4edd9a7e4e52896b327112912317a3f367cf60)) +* refactor ee ci ([c7e1faf](https://github.com/alperenkose/pan-os-ansible/commit/c7e1fafa4665de4af32adb68d10d8aef230ef40b)) +* refactor ee ci ([e9a55f3](https://github.com/alperenkose/pan-os-ansible/commit/e9a55f3c3cbac849dc67063880710ef1befc2470)) + ## [2.25.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.24.0...v2.25.0) (2024-09-26) diff --git a/docs/source/index.rst b/docs/source/index.rst index dd15cd989..7cb1c704f 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.0 +Version: 2.25.1 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index cd60557c3..a7b887d5d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.0 +version: 2.25.1 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From 5979ebfe017b29c1ce26c5cfe341373a9ea4fc31 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 11:36:05 +0300 Subject: [PATCH 095/125] fix: refactor ee ci From 5d472f4af37baa661ca4044cf87ca756139f49df Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 27 Sep 2024 08:37:26 +0000 Subject: [PATCH 096/125] chore(release): 2.25.2 ### [2.25.2](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.1...v2.25.2) (2024-09-27) ### Bug Fixes * refactor ee ci ([5979ebf](https://github.com/alperenkose/pan-os-ansible/commit/5979ebfe017b29c1ce26c5cfe341373a9ea4fc31)) --- CHANGELOG.md | 7 +++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8abc91641..a1afb5c56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### [2.25.2](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.1...v2.25.2) (2024-09-27) + + +### Bug Fixes + +* refactor ee ci ([5979ebf](https://github.com/alperenkose/pan-os-ansible/commit/5979ebfe017b29c1ce26c5cfe341373a9ea4fc31)) + ### [2.25.1](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.0...v2.25.1) (2024-09-27) diff --git a/docs/source/index.rst b/docs/source/index.rst index 7cb1c704f..47e5c75da 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.1 +Version: 2.25.2 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index a7b887d5d..6a7a255e3 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.1 +version: 2.25.2 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From 2422242184ff45619d66f3fa0928315def7cb91e Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 11:59:17 +0300 Subject: [PATCH 097/125] fix: event name --- .github/workflows/ci.yml | 2 +- .github/workflows/ee.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ca9cf3f4..3c7f67fd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -341,4 +341,4 @@ jobs: uses: ./.github/workflows/ee.yml with: release: true - release_tag: needs.release.outputs.new_release_git_tag + release_tag: ${{ needs.release.outputs.new_release_git_tag }} diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 3beb3659b..01ffa739b 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -51,11 +51,12 @@ jobs: # normal checkout - it will checkout whatever the workflow is run on # prepare EE on branch + # TODO workflow_call is triggered by push and PR - need to check PR as well.. - name: check and findout the tag id: tag # outputs tag name as v1.2.3 and version as 1.2.3 run: | - if [[ "${{ github.event_name }}" == "workflow_call" && + if [[ "${{ github.event_name }}" == "push" && "${{ inputs.release }}" == "true" ]]; then if [[ "${{ inputs.release_tag }}" != "v"* ]]; then echo "release_tag (${{ inputs.release_tag }}) must be provided when workflow_call called with release." @@ -65,7 +66,7 @@ jobs: echo "name=${{inputs.release_tag}}" >> $GITHUB_OUTPUT echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT echo "Ansible EE will be prepared for release ${{ inputs.release_tag }}" - elif [[ "${{ github.event_name }}" == "workflow_call" ]]; then + elif [[ "${{ github.event_name }}" == "push" ]]; then echo "Ansible EE will be prepared for branch ${GITHUB_REF#refs/heads/}" elif [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.release }}" == "true" ]]; then From e0dc943282fffd8526acf742d246b45923fa44fe Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 12:01:42 +0300 Subject: [PATCH 098/125] fix: ci --- .releaserc.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.releaserc.json b/.releaserc.json index c9cbd0758..875187bf1 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -37,9 +37,10 @@ "path": "*.tar.gz" } ], - "successComment": ":tada: This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:\n\nThe release is available on [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/paloaltonetworks/panos) and [GitHub release](https://github.com/PaloAltoNetworks/pan-os-ansible/releases)\n\n> Posted by [semantic-release](https://github.com/semantic-release/semantic-release) bot" + "successComment": ":tada: This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:\n\nThe release is available on [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/paloaltonetworks/panos) and [GitHub release](https://github.com/PaloAltoNetworks/pan-os-ansible/releases)\n\n> Posted by [semantic-release](https://github.com/semantic-release/semantic-release) bot", + "failTitle": false } ] ], "preset": "conventionalcommits" -} \ No newline at end of file +} From 9d809fe7fa5914967f96e95fcaeb50b2f0942c74 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 11:59:17 +0300 Subject: [PATCH 099/125] fix: event name --- .github/workflows/ci.yml | 2 +- .github/workflows/ee.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ca9cf3f4..3c7f67fd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -341,4 +341,4 @@ jobs: uses: ./.github/workflows/ee.yml with: release: true - release_tag: needs.release.outputs.new_release_git_tag + release_tag: ${{ needs.release.outputs.new_release_git_tag }} diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 3beb3659b..01ffa739b 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -51,11 +51,12 @@ jobs: # normal checkout - it will checkout whatever the workflow is run on # prepare EE on branch + # TODO workflow_call is triggered by push and PR - need to check PR as well.. - name: check and findout the tag id: tag # outputs tag name as v1.2.3 and version as 1.2.3 run: | - if [[ "${{ github.event_name }}" == "workflow_call" && + if [[ "${{ github.event_name }}" == "push" && "${{ inputs.release }}" == "true" ]]; then if [[ "${{ inputs.release_tag }}" != "v"* ]]; then echo "release_tag (${{ inputs.release_tag }}) must be provided when workflow_call called with release." @@ -65,7 +66,7 @@ jobs: echo "name=${{inputs.release_tag}}" >> $GITHUB_OUTPUT echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT echo "Ansible EE will be prepared for release ${{ inputs.release_tag }}" - elif [[ "${{ github.event_name }}" == "workflow_call" ]]; then + elif [[ "${{ github.event_name }}" == "push" ]]; then echo "Ansible EE will be prepared for branch ${GITHUB_REF#refs/heads/}" elif [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.release }}" == "true" ]]; then From f3d5fa5df12d743fae4f7edd753e3527373b414e Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 12:01:42 +0300 Subject: [PATCH 100/125] fix: ci --- .releaserc.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.releaserc.json b/.releaserc.json index c9cbd0758..875187bf1 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -37,9 +37,10 @@ "path": "*.tar.gz" } ], - "successComment": ":tada: This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:\n\nThe release is available on [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/paloaltonetworks/panos) and [GitHub release](https://github.com/PaloAltoNetworks/pan-os-ansible/releases)\n\n> Posted by [semantic-release](https://github.com/semantic-release/semantic-release) bot" + "successComment": ":tada: This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:\n\nThe release is available on [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/paloaltonetworks/panos) and [GitHub release](https://github.com/PaloAltoNetworks/pan-os-ansible/releases)\n\n> Posted by [semantic-release](https://github.com/semantic-release/semantic-release) bot", + "failTitle": false } ] ], "preset": "conventionalcommits" -} \ No newline at end of file +} From 7fbabe83a00657bb286d1c9d64511528ef004992 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 27 Sep 2024 09:08:11 +0000 Subject: [PATCH 101/125] chore(release): 2.25.3 ### [2.25.3](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.2...v2.25.3) (2024-09-27) ### Bug Fixes * ci ([f3d5fa5](https://github.com/alperenkose/pan-os-ansible/commit/f3d5fa5df12d743fae4f7edd753e3527373b414e)) * event name ([9d809fe](https://github.com/alperenkose/pan-os-ansible/commit/9d809fe7fa5914967f96e95fcaeb50b2f0942c74)) --- CHANGELOG.md | 8 ++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1afb5c56..db221ae8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +### [2.25.3](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.2...v2.25.3) (2024-09-27) + + +### Bug Fixes + +* ci ([f3d5fa5](https://github.com/alperenkose/pan-os-ansible/commit/f3d5fa5df12d743fae4f7edd753e3527373b414e)) +* event name ([9d809fe](https://github.com/alperenkose/pan-os-ansible/commit/9d809fe7fa5914967f96e95fcaeb50b2f0942c74)) + ### [2.25.2](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.1...v2.25.2) (2024-09-27) diff --git a/docs/source/index.rst b/docs/source/index.rst index 47e5c75da..f82e95bc9 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.2 +Version: 2.25.3 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index 6a7a255e3..907227f31 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.2 +version: 2.25.3 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From 144e81d139e8ea627423254bf620ecbbe3d147cf Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Fri, 27 Sep 2024 12:16:52 +0300 Subject: [PATCH 102/125] fix: git context --- .github/workflows/ee.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 01ffa739b..9755a5dba 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -138,13 +138,13 @@ jobs: # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT # if: inputs.release - # TODO try release from tag to exclude main label - # we should NOT need value if we check out with tag?? + # TODO release from checkout tag to exclude main label - DID NOT WORK + # TRY with git context but need to restest develop - name: determine docker tags and labels id: meta uses: docker/metadata-action@v5 with: - context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) + context: git # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible tags: | type=semver,pattern=v{{version}} From bb361386383d53d92a86e7ef2cd1bf66ae7bb0a6 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 13:01:05 +0300 Subject: [PATCH 103/125] fix: without work-dir --- .github/workflows/ee.yml | 44 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 9755a5dba..bf7f22e3e 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -33,9 +33,9 @@ jobs: contents: read packages: write - defaults: - run: - working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + # defaults: + # run: + # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: # if event == workflow_call and inputs.release == true @@ -93,16 +93,16 @@ jobs: # fi env: GITHUB_REF: ${{ github.ref }} - working-directory: . + # working-directory: . # TODO CHECKOUT tag.outputs.name BUT IS IT POSSIBLE TO OMIT TAG WHEN IT'S EMPTY? # so we can checkout the branch itself when tag is empty - name: check out code uses: actions/checkout@v4 with: - path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - ref: ${{ steps.tag.outputs.name == '' && github.ref || steps.tag.outputs.name }} # if tag is empty; github.ref else tag.outputs.name + ref: ${{ steps.tag.outputs.name == '' && github.ref || steps.tag.outputs.name }} + # path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: discover Python version id: pyversion @@ -139,7 +139,10 @@ jobs: # if: inputs.release # TODO release from checkout tag to exclude main label - DID NOT WORK - # TRY with git context but need to restest develop + # TRY with git context but need to restest develop - git folder not found in sub dir.. + # context workflow yapsan release icin label main oluyor.. X + # context git yapsan develop icin fail ediyor, git folder bulamiyor cunku alt dizinde. + # TODO BURADA KALDIN - checkout u direk ana dizine yapsak olmaz mi? ansible builder mi fail ediyor?? - name: determine docker tags and labels id: meta uses: docker/metadata-action@v5 @@ -170,7 +173,8 @@ jobs: # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 - name: Build collection from development branch run: | - ansible-galaxy collection build --output-path ../../../ + ansible-galaxy collection build + # ansible-galaxy collection build --output-path ../../../ if: ${{ inputs.release == false }} - name: create base EE file @@ -200,7 +204,7 @@ jobs: epel-release [platform:rpm] unzip [platform:rpm] galaxy: requirements.yml - python: requirements.txt + python: requirements-ee.txt additional_build_steps: append_base: @@ -212,12 +216,13 @@ jobs: - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 EOF - working-directory: . + # working-directory: . - name: append build files to EE file for development run: | COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)" - COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" + # COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" + COLLECTION_PIP_REQUIREMENTS="requirements.txt" # append to existing EE file cat >> execution-environment.yml <> execution-environment.yml < requirements.txt < requirements-ee.txt < Date: Sat, 28 Sep 2024 10:07:24 +0000 Subject: [PATCH 104/125] chore(release): 2.25.4 ### [2.25.4](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.3...v2.25.4) (2024-09-28) ### Bug Fixes * ci ([e0dc943](https://github.com/alperenkose/pan-os-ansible/commit/e0dc943282fffd8526acf742d246b45923fa44fe)) * event name ([2422242](https://github.com/alperenkose/pan-os-ansible/commit/2422242184ff45619d66f3fa0928315def7cb91e)) * git context ([144e81d](https://github.com/alperenkose/pan-os-ansible/commit/144e81d139e8ea627423254bf620ecbbe3d147cf)) * without work-dir ([bb36138](https://github.com/alperenkose/pan-os-ansible/commit/bb361386383d53d92a86e7ef2cd1bf66ae7bb0a6)) --- CHANGELOG.md | 10 ++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db221ae8e..d1db17386 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +### [2.25.4](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.3...v2.25.4) (2024-09-28) + + +### Bug Fixes + +* ci ([e0dc943](https://github.com/alperenkose/pan-os-ansible/commit/e0dc943282fffd8526acf742d246b45923fa44fe)) +* event name ([2422242](https://github.com/alperenkose/pan-os-ansible/commit/2422242184ff45619d66f3fa0928315def7cb91e)) +* git context ([144e81d](https://github.com/alperenkose/pan-os-ansible/commit/144e81d139e8ea627423254bf620ecbbe3d147cf)) +* without work-dir ([bb36138](https://github.com/alperenkose/pan-os-ansible/commit/bb361386383d53d92a86e7ef2cd1bf66ae7bb0a6)) + ### [2.25.3](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.2...v2.25.3) (2024-09-27) diff --git a/docs/source/index.rst b/docs/source/index.rst index f82e95bc9..efe1e2a69 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.3 +Version: 2.25.4 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index 907227f31..cfcc591c0 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.3 +version: 2.25.4 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From 63f2f6664046dbeb045e2a542fee46ebec14985d Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 13:20:17 +0300 Subject: [PATCH 105/125] fix: override panos for testing --- .github/workflows/ee.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index bf7f22e3e..57d339ef4 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -270,7 +270,8 @@ jobs: --- collections: - name: paloaltonetworks.panos - version: ${{steps.tag.outputs.version}} + version: 2.21.2 + # version: ${{steps.tag.outputs.version}} TEMP commented for testing.. - name: awx.awx - community.general EOF From a17ed51599b535755e071d19894ce5f763f56a0a Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 13:29:04 +0300 Subject: [PATCH 106/125] fix: test without providing panos collection --- .github/workflows/ee.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 57d339ef4..c8b7b99b3 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -227,8 +227,8 @@ jobs: # append to existing EE file cat >> execution-environment.yml < requirements.yml < Date: Sat, 28 Sep 2024 13:48:36 +0300 Subject: [PATCH 107/125] fix: test without python requirements --- .github/workflows/ee.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index c8b7b99b3..82925d385 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -209,8 +209,8 @@ jobs: additional_build_steps: append_base: - RUN \$PYCMD -m pip install -U pip - prepend_builder: - - COPY _build/src/requirements.txt src/requirements.txt + # prepend_builder: + # - COPY _build/src/requirements.txt src/requirements.txt append_final: # SymLink `python` -> `python3.9` - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 @@ -227,10 +227,10 @@ jobs: # append to existing EE file cat >> execution-environment.yml < requirements.yml <> execution-environment.yml <> execution-environment.yml < requirements-ee.txt < Date: Sat, 28 Sep 2024 13:51:54 +0300 Subject: [PATCH 108/125] fix: test without python requirements --- .github/workflows/ee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 82925d385..8ee6bba00 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -374,7 +374,7 @@ jobs: poetry run -C ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} ansible-builder create -v 3 --output-filename Dockerfile ls -l ./context/ ls -l ./context/_build/src/ - cat ./context/_build/src/requirements.txt + # cat ./context/_build/src/requirements.txt cat ./context/Dockerfile # working-directory: . From 6a5d2a3991e086dd4246d7159833585c4d22979a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 28 Sep 2024 11:00:34 +0000 Subject: [PATCH 109/125] chore(release): 2.25.5 ### [2.25.5](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.4...v2.25.5) (2024-09-28) ### Bug Fixes * override panos for testing ([63f2f66](https://github.com/alperenkose/pan-os-ansible/commit/63f2f6664046dbeb045e2a542fee46ebec14985d)) * test without providing panos collection ([a17ed51](https://github.com/alperenkose/pan-os-ansible/commit/a17ed51599b535755e071d19894ce5f763f56a0a)) * test without python requirements ([fa46174](https://github.com/alperenkose/pan-os-ansible/commit/fa4617416f5ff1591e5d66f91026d167e39f14ce)) * test without python requirements ([9d7d2a2](https://github.com/alperenkose/pan-os-ansible/commit/9d7d2a26ab4913c8ed29b95d2b91c309ac985f63)) --- CHANGELOG.md | 10 ++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1db17386..d62a2dca9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +### [2.25.5](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.4...v2.25.5) (2024-09-28) + + +### Bug Fixes + +* override panos for testing ([63f2f66](https://github.com/alperenkose/pan-os-ansible/commit/63f2f6664046dbeb045e2a542fee46ebec14985d)) +* test without providing panos collection ([a17ed51](https://github.com/alperenkose/pan-os-ansible/commit/a17ed51599b535755e071d19894ce5f763f56a0a)) +* test without python requirements ([fa46174](https://github.com/alperenkose/pan-os-ansible/commit/fa4617416f5ff1591e5d66f91026d167e39f14ce)) +* test without python requirements ([9d7d2a2](https://github.com/alperenkose/pan-os-ansible/commit/9d7d2a26ab4913c8ed29b95d2b91c309ac985f63)) + ### [2.25.4](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.3...v2.25.4) (2024-09-28) diff --git a/docs/source/index.rst b/docs/source/index.rst index efe1e2a69..ab2a49e5c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.4 +Version: 2.25.5 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index cfcc591c0..c53f01de7 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.4 +version: 2.25.5 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From 14fe047af80ce1c849ba37ecb097fc63ca22ce5a Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 14:04:42 +0300 Subject: [PATCH 110/125] fix: test without python requirements --- .github/workflows/ee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 8ee6bba00..031bce666 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -373,7 +373,7 @@ jobs: run: | poetry run -C ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} ansible-builder create -v 3 --output-filename Dockerfile ls -l ./context/ - ls -l ./context/_build/src/ + # ls -l ./context/_build/src/ # cat ./context/_build/src/requirements.txt cat ./context/Dockerfile # working-directory: . From 63a5b5676b3624931736acad63061e55f0d78606 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 28 Sep 2024 11:09:01 +0000 Subject: [PATCH 111/125] chore(release): 2.25.6 ### [2.25.6](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.5...v2.25.6) (2024-09-28) ### Bug Fixes * test without python requirements ([14fe047](https://github.com/alperenkose/pan-os-ansible/commit/14fe047af80ce1c849ba37ecb097fc63ca22ce5a)) --- CHANGELOG.md | 7 +++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d62a2dca9..51868ee2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### [2.25.6](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.5...v2.25.6) (2024-09-28) + + +### Bug Fixes + +* test without python requirements ([14fe047](https://github.com/alperenkose/pan-os-ansible/commit/14fe047af80ce1c849ba37ecb097fc63ca22ce5a)) + ### [2.25.5](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.4...v2.25.5) (2024-09-28) diff --git a/docs/source/index.rst b/docs/source/index.rst index ab2a49e5c..46cc59af1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.5 +Version: 2.25.6 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index c53f01de7..d2149e70d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.5 +version: 2.25.6 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From ebcfbe2367a7e0bec643e4a4fd635d95a75f8e64 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 14:51:34 +0300 Subject: [PATCH 112/125] ci: no dev release --- .github/workflows/ci.yml | 2 +- .github/workflows/ee.yml | 324 ++------------------------------------- 2 files changed, 12 insertions(+), 314 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c7f67fd6..aac86cc4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -301,7 +301,7 @@ jobs: # print output echo "$OUTPUT" # grep with semver regex - \K means to start matching from here in Perl regex - NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?') + NEW_RELEASE_VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?' || echo -n "") echo "new_release_version=$NEW_RELEASE_VERSION" >> "$GITHUB_OUTPUT" if [ -z "$NEW_RELEASE_VERSION" ]; then diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 031bce666..64e8acc37 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -33,10 +33,6 @@ jobs: contents: read packages: write - # defaults: - # run: - # working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - steps: # if event == workflow_call and inputs.release == true # release_tag must be given as input @@ -93,16 +89,13 @@ jobs: # fi env: GITHUB_REF: ${{ github.ref }} - # working-directory: . - # TODO CHECKOUT tag.outputs.name BUT IS IT POSSIBLE TO OMIT TAG WHEN IT'S EMPTY? - # so we can checkout the branch itself when tag is empty + # checkout tag for releae otherwise checkout branch - name: check out code uses: actions/checkout@v4 with: # if tag is empty; github.ref else tag.outputs.name ref: ${{ steps.tag.outputs.name == '' && github.ref || steps.tag.outputs.name }} - # path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: discover Python version id: pyversion @@ -131,18 +124,8 @@ jobs: - name: set up Docker Buildx uses: docker/setup-buildx-action@v3 - # TODO version wrong in pyproject.toml - # this DOES NOT start with v - # - name: get version for release image - # id: tag - # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - # if: inputs.release - - # TODO release from checkout tag to exclude main label - DID NOT WORK - # TRY with git context but need to restest develop - git folder not found in sub dir.. - # context workflow yapsan release icin label main oluyor.. X - # context git yapsan develop icin fail ediyor, git folder bulamiyor cunku alt dizinde. - # TODO BURADA KALDIN - checkout u direk ana dizine yapsak olmaz mi? ansible builder mi fail ediyor?? + # produce docker tags for semver if on a tag, otherwise take ref branch name + # latest tag is only produced for semver operating on a tag - name: determine docker tags and labels id: meta uses: docker/metadata-action@v5 @@ -156,25 +139,11 @@ jobs: type=ref,event=branch type=ref,event=tag - # # TODO latest should only be tagged for release versions - # - name: determine docker tags and labels for release image - # id: meta - # uses: docker/metadata-action@v5 - # with: - # context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) - # images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible - # tags: | - # type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} - # type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} - # type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} - # if: inputs.release - - # NOTE we should take pan-os-ansible from galaxy for a release, but local build for develop - # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 + # take pan-os-ansible from galaxy for a release, but local build for develop + # ref - https://github.com/ansible-collections/community.dns/blob/main/.github/workflows/ee.yml#L96-L98 - name: Build collection from development branch run: | ansible-galaxy collection build - # ansible-galaxy collection build --output-path ../../../ if: ${{ inputs.release == false }} - name: create base EE file @@ -209,34 +178,26 @@ jobs: additional_build_steps: append_base: - RUN \$PYCMD -m pip install -U pip - # prepend_builder: - # - COPY _build/src/requirements.txt src/requirements.txt append_final: # SymLink `python` -> `python3.9` - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 EOF - # working-directory: . - - name: append build files to EE file for development + - name: append build files to EE for development run: | COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)" - # COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" - COLLECTION_PIP_REQUIREMENTS="requirements.txt" # append to existing EE file cat >> execution-environment.yml < requirements.yml <> execution-environment.yml < requirements-ee.txt < execution-environment.yml <=2.15.0rc2,<2.16 - # ansible_runner: - # package_pip: ansible-runner - # system: | - # git-core [platform:rpm] - # python3.9-devel [platform:rpm compile] - # libcurl-devel [platform:rpm compile] - # sshpass [platform:rpm] - # rsync [platform:rpm] - # epel-release [platform:rpm] - # unzip [platform:rpm] - # galaxy: requirements.yml - # python: requirements.txt - - # additional_build_files: - # - src: ${COLLECTION_FILENAME} - # dest: src - # - src: ${COLLECTION_PIP_REQUIREMENTS} - # dest: src - - # additional_build_steps: - # append_base: - # - RUN \$PYCMD -m pip install -U pip - # prepend_builder: - # - COPY _build/src/requirements.txt src/requirements.txt - # append_final: - # # SymLink `python` -> `python3.9` - # - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 - # EOF - # echo "::group::execution-environment.yml" - # cat execution-environment.yml - # echo "::endgroup::" - - # # Collection Requirements - # cat > requirements.yml < requirements.txt < jobs.json - # # conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "release" ) | .conclusion') - # # echo ${conclusion} - # # [[ ${conclusion} == "success" ]] - # # working-directory: . - - # - name: check out code - # uses: actions/checkout@v4 - # with: - # path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - - # - name: discover Python version - # id: pyversion - # shell: bash - # run: | - # PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') - # echo "pyversion=$PYVER" >> $GITHUB_OUTPUT - # # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 - # # working-directory doesn't work with uses, until you get a `with path` similar to checkout this is going to be inline - - # - name: install Python - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ steps.pyversion.outputs.pyversion }} - # cache: pip - - # - name: install Poetry - # uses: Gr1N/setup-poetry@v8 - - # - name: prep Poetry venv - # run: | - # poetry env use ${{ steps.pyversion.outputs.pyversion }} - # poetry lock - # poetry install --with ansible-ee --without dev --no-root - - # - name: set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - - # - name: get version for release image - # id: tag - # run: echo "version_tag=$(poetry version -s)" >> $GITHUB_OUTPUT - - # # TODO latest should only be tagged for release versions - # - name: determine docker tags and labels for release image - # id: meta - # uses: docker/metadata-action@v5 - # with: - # context: workflow # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) - # images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible - # tags: | - # type=semver,pattern=v{{version}},value=${{ steps.tag.outputs.version_tag }} - # type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.tag.outputs.version_tag }} - # type=semver,pattern=v{{major}},value=${{ steps.tag.outputs.version_tag }} - - # - name: Create files for building execution environment - # run: | - # COLLECTION_PIP_REQUIREMENTS="ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/requirements.txt" - - # # EE config - # cat > execution-environment.yml <=2.15.0rc2,<2.16 - # ansible_runner: - # package_pip: ansible-runner - # system: | - # git-core [platform:rpm] - # python3.9-devel [platform:rpm compile] - # libcurl-devel [platform:rpm compile] - # sshpass [platform:rpm] - # rsync [platform:rpm] - # epel-release [platform:rpm] - # unzip [platform:rpm] - # galaxy: requirements.yml - # python: requirements.txt - - # additional_build_files: - # - src: ${COLLECTION_PIP_REQUIREMENTS} - # dest: src - - # additional_build_steps: - # append_base: - # - RUN \$PYCMD -m pip install -U pip - # prepend_builder: - # - COPY _build/src/requirements.txt src/requirements.txt - # append_final: - # # SymLink `python` -> `python3.9` - # - RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 39 - # EOF - # echo "::group::execution-environment.yml" - # cat execution-environment.yml - # echo "::endgroup::" - - # # Collection Requirements - # cat > requirements.yml < requirements.txt < Date: Sat, 28 Sep 2024 14:54:36 +0300 Subject: [PATCH 113/125] fix: test ansible collection path --- .github/workflows/ee.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 64e8acc37..6855b9112 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -247,7 +247,8 @@ jobs: # TODO why do we still execute poetry on sub dir here? - name: create execution env context run: | - poetry run -C ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} ansible-builder create -v 3 --output-filename Dockerfile + poetry run ansible-builder create -v 3 --output-filename Dockerfile + # poetry run -C ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} ansible-builder create -v 3 --output-filename Dockerfile ls -l ./context/ cat ./context/Dockerfile From a2807a37ce7d4129b5e92e62a074e0b4c0c1ff3b Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 15:01:33 +0300 Subject: [PATCH 114/125] fix: test pr --- .github/workflows/ee.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 6855b9112..9032471dd 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -244,11 +244,9 @@ jobs: cat requirements-ee.txt echo "::endgroup::" - # TODO why do we still execute poetry on sub dir here? - name: create execution env context run: | poetry run ansible-builder create -v 3 --output-filename Dockerfile - # poetry run -C ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} ansible-builder create -v 3 --output-filename Dockerfile ls -l ./context/ cat ./context/Dockerfile From ff2a7b65b670a94f0e76ee3da344b5c4b5e84715 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 15:32:39 +0300 Subject: [PATCH 115/125] fix: update comments --- .github/workflows/ee.yml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 9032471dd..e0884a750 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -21,7 +21,6 @@ on: env: NAMESPACE: paloaltonetworks COLLECTION_NAME: panos - PYTHON_VERSION: 3.9 # TODO do we need this, as we take it from pyproject.yml ? jobs: @@ -34,20 +33,15 @@ jobs: packages: write steps: - # if event == workflow_call and inputs.release == true + # if event == push (same event from workflow_call) and inputs.release == true # release_tag must be given as input # checkout tag and prepare EE on tag - # elif event == workflow_call and inputs.release == false - # normal checkout - it will checkout whatever the workflow is run on - # prepare EE on branch # elif event == workflow_dispatch and inputs.release == true # workflow must be run on a tag # checkout tag and prepare EE on tag - # elif event == workflow_dispatch and inputs.release == false + # else - could be workflow_call or workflow_dispatch with release false # normal checkout - it will checkout whatever the workflow is run on # prepare EE on branch - - # TODO workflow_call is triggered by push and PR - need to check PR as well.. - name: check and findout the tag id: tag # outputs tag name as v1.2.3 and version as 1.2.3 @@ -62,8 +56,6 @@ jobs: echo "name=${{inputs.release_tag}}" >> $GITHUB_OUTPUT echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT echo "Ansible EE will be prepared for release ${{ inputs.release_tag }}" - elif [[ "${{ github.event_name }}" == "push" ]]; then - echo "Ansible EE will be prepared for branch ${GITHUB_REF#refs/heads/}" elif [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.release }}" == "true" ]]; then if [[ "${GITHUB_REF}" != "refs/tags/v"* ]]; then @@ -78,15 +70,6 @@ jobs: else echo "Ansible EE will be prepared for branch ${GITHUB_REF#refs/heads/}" fi - # if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then - # echo "This workflow is run on tag: ${{ github.ref }}" - # TAG_NAME=$(echo "${{ github.ref }}" | sed 's#refs/tags/##') - # echo "name=$TAG_NAME" >> $GITHUB_OUTPUT - # echo "Tag: $TAG_NAME" - # else - # echo "This workflow is not run on a tag" - # exit 1 - # fi env: GITHUB_REF: ${{ github.ref }} @@ -223,7 +206,7 @@ jobs: collections: - name: paloaltonetworks.panos version: 2.21.2 - # version: ${{steps.tag.outputs.version}} TEMP commented for testing.. + # version: ${{steps.tag.outputs.version}} TODO TEMP commented for testing.. - name: awx.awx - community.general EOF From e9b5a23346fcfa0e352e081c8d02cd14c290e651 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 15:45:03 +0300 Subject: [PATCH 116/125] fix: test with defaults --- .github/workflows/ci.yml | 122 +++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aac86cc4d..5a87b6b05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,64 +14,64 @@ env: jobs: - # ## Sanity is required: - # # - # # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html - # sanity: - # name: Sanity (Ⓐ${{ matrix.ansible }}) - # strategy: - # matrix: - # include: - # - ansible: "2.15" - # python_ver: "3.11" - # - ansible: "2.16" - # python_ver: "3.11" - # - ansible: "2.17" - # python_ver: "3.11" - # runs-on: ubuntu-latest - # defaults: - # run: - # working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - # steps: - # - uses: actions/checkout@v4 - # with: - # path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - - # - name: Setup Python - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python_ver }} - - # - name: Install Poetry - # uses: Gr1N/setup-poetry@v8 - # #with: - # # poetry-version: 1.0.10 - - # # Install the head of the given branch (devel, stable-2.10) - # - name: Install ansible-base (${{ matrix.ansible }}) - # run: poetry run pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible }}.tar.gz --disable-pip-version-check - - # - name: Create lock file - # run: poetry lock - - # #- name: Cache poetry dependencies - # # uses: actions/cache@v2 - # # with: - # # #path: ~/.cache/pypoetry/virtualenvs - # # #key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} - # # ##restore-keys: | - # # ## ${{ runner.os }}-poetry-${{ matrix.python-version }}- - # # path: ${{ steps.poetry-cache.outputs.dir }} - # # key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} - # # restore-keys: | - # # ${{ runner.os }}-poetry- - - # - name: Install dependencies - # run: poetry install - - # - name: Run sanity tests - # timeout-minutes: 8 - # run: poetry run make new-sanity + ## Sanity is required: + # + # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html + sanity: + name: Sanity (Ⓐ${{ matrix.ansible }}) + strategy: + matrix: + include: + - ansible: "2.15" + python_ver: "3.11" + - ansible: "2.16" + python_ver: "3.11" + - ansible: "2.17" + python_ver: "3.11" + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + steps: + - uses: actions/checkout@v4 + with: + path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python_ver }} + + - name: Install Poetry + uses: Gr1N/setup-poetry@v8 + #with: + # poetry-version: 1.0.10 + + # Install the head of the given branch (devel, stable-2.10) + - name: Install ansible-base (${{ matrix.ansible }}) + run: poetry run pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible }}.tar.gz --disable-pip-version-check + + - name: Create lock file + run: poetry lock + + #- name: Cache poetry dependencies + # uses: actions/cache@v2 + # with: + # #path: ~/.cache/pypoetry/virtualenvs + # #key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + # ##restore-keys: | + # ## ${{ runner.os }}-poetry-${{ matrix.python-version }}- + # path: ${{ steps.poetry-cache.outputs.dir }} + # key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} + # restore-keys: | + # ${{ runner.os }}-poetry- + + - name: Install dependencies + run: poetry install + + - name: Run sanity tests + timeout-minutes: 8 + run: poetry run make new-sanity # Ansible-lint is a requirement for certification, and was added to the # certification pipeline 20 June 2023 per Ansible Partner Engineering @@ -137,8 +137,7 @@ jobs: release: name: release if: github.event_name == 'push' && github.ref == 'refs/heads/main' - # needs: [sanity, tox, lint, format] TEMP - needs: [tox] + needs: [sanity, tox, lint, format] runs-on: ubuntu-latest outputs: new_release_published: ${{ steps.release.outputs.new_release_published }} @@ -266,8 +265,7 @@ jobs: rc: name: Check rc EE runs-on: ubuntu-latest - # needs: [sanity, tox, lint, format] TEMP - needs: [tox] + needs: [sanity, tox, lint, format] if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') outputs: rc: ${{ steps.rc.outputs.new_release_published }} From 9c2749fcb8872b1960c279480898e50c8cff37c1 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 28 Sep 2024 12:53:34 +0000 Subject: [PATCH 117/125] chore(release): 2.25.7 ### [2.25.7](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.6...v2.25.7) (2024-09-28) ### Bug Fixes * test ansible collection path ([00ddd77](https://github.com/alperenkose/pan-os-ansible/commit/00ddd772b8d320f2502e8879aa447711db854537)) * test pr ([a2807a3](https://github.com/alperenkose/pan-os-ansible/commit/a2807a37ce7d4129b5e92e62a074e0b4c0c1ff3b)) * test with defaults ([e9b5a23](https://github.com/alperenkose/pan-os-ansible/commit/e9b5a23346fcfa0e352e081c8d02cd14c290e651)) * update comments ([ff2a7b6](https://github.com/alperenkose/pan-os-ansible/commit/ff2a7b65b670a94f0e76ee3da344b5c4b5e84715)) --- CHANGELOG.md | 10 ++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51868ee2c..acc068f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +### [2.25.7](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.6...v2.25.7) (2024-09-28) + + +### Bug Fixes + +* test ansible collection path ([00ddd77](https://github.com/alperenkose/pan-os-ansible/commit/00ddd772b8d320f2502e8879aa447711db854537)) +* test pr ([a2807a3](https://github.com/alperenkose/pan-os-ansible/commit/a2807a37ce7d4129b5e92e62a074e0b4c0c1ff3b)) +* test with defaults ([e9b5a23](https://github.com/alperenkose/pan-os-ansible/commit/e9b5a23346fcfa0e352e081c8d02cd14c290e651)) +* update comments ([ff2a7b6](https://github.com/alperenkose/pan-os-ansible/commit/ff2a7b65b670a94f0e76ee3da344b5c4b5e84715)) + ### [2.25.6](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.5...v2.25.6) (2024-09-28) diff --git a/docs/source/index.rst b/docs/source/index.rst index 46cc59af1..c0ba2ccfd 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.6 +Version: 2.25.7 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index d2149e70d..bb140a37e 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.6 +version: 2.25.7 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' From 9edcb4141166afa26cf96b0f3a7f4bf1c70e1ee8 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 16:00:06 +0300 Subject: [PATCH 118/125] ci: revert testing changes to merge to main repo --- .github/do-release.sh | 4 ++-- .github/workflows/ci.yml | 48 ++++++++++++++++++++-------------------- .github/workflows/ee.yml | 5 ++--- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.github/do-release.sh b/.github/do-release.sh index 6bece72cf..b9e2daebc 100755 --- a/.github/do-release.sh +++ b/.github/do-release.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash ansible-galaxy collection build -# ansible-galaxy collection publish paloaltonetworks-panos-* --server release_galaxy -# ansible-galaxy collection publish paloaltonetworks-panos-* --server automation_hub +ansible-galaxy collection publish paloaltonetworks-panos-* --server release_galaxy +ansible-galaxy collection publish paloaltonetworks-panos-* --server automation_hub diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a87b6b05..de21062ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -148,30 +148,30 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # # This task could be removed once the task below is confirmed working - # - name: Set up Galaxy auth - # run: | - # mkdir -p ~/.ansible - # echo "token: $GALAXY_API_KEY" > ~/.ansible/galaxy_token - # env: - # GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }} - # shell: bash - - # # New task for combined Galaxy and AutomationHub publishing - # - name: Set up Automation Hub and Galaxy ansible.cfg file - # run: | - # cat << EOF > ansible.cfg - # [galaxy] - # server_list = automation_hub, release_galaxy - # [galaxy_server.automation_hub] - # url=${{ secrets.AUTOMATION_HUB_URL }} - # auth_url=${{ secrets.AUTOMATION_HUB_SSO_URL }} - # token=${{ secrets.AUTOMATION_HUB_API_TOKEN }} - # [galaxy_server.release_galaxy] - # url=https://galaxy.ansible.com/ - # token=${{ secrets.GALAXY_API_KEY }} - # EOF - # shell: bash + # This task could be removed once the task below is confirmed working + - name: Set up Galaxy auth + run: | + mkdir -p ~/.ansible + echo "token: $GALAXY_API_KEY" > ~/.ansible/galaxy_token + env: + GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }} + shell: bash + + # New task for combined Galaxy and AutomationHub publishing + - name: Set up Automation Hub and Galaxy ansible.cfg file + run: | + cat << EOF > ansible.cfg + [galaxy] + server_list = automation_hub, release_galaxy + [galaxy_server.automation_hub] + url=${{ secrets.AUTOMATION_HUB_URL }} + auth_url=${{ secrets.AUTOMATION_HUB_SSO_URL }} + token=${{ secrets.AUTOMATION_HUB_API_TOKEN }} + [galaxy_server.release_galaxy] + url=https://galaxy.ansible.com/ + token=${{ secrets.GALAXY_API_KEY }} + EOF + shell: bash - name: Create release and publish id: release diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index e0884a750..014852e97 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -114,7 +114,7 @@ jobs: uses: docker/metadata-action@v5 with: context: git # git - this ensures to reference the current git context instead of workflow context (context info ref/sha) - images: ghcr.io/alperenkose/pan-os-ansible # TODO ghcr.io/paloaltonetworks/pan-os-ansible + images: ghcr.io/paloaltonetworks/pan-os-ansible tags: | type=semver,pattern=v{{version}} type=semver,pattern=v{{major}}.{{minor}} @@ -205,8 +205,7 @@ jobs: --- collections: - name: paloaltonetworks.panos - version: 2.21.2 - # version: ${{steps.tag.outputs.version}} TODO TEMP commented for testing.. + version: ${{steps.tag.outputs.version}} - name: awx.awx - community.general EOF From 6358813c5b46dcddabe17100a24d21440b68388b Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 16:06:05 +0300 Subject: [PATCH 119/125] ci: revert testing changes to merge to main repo --- SUPPORT.md | 1 - docs/source/index.rst | 2 +- galaxy.yml | 2 +- pyproject.toml | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md index ce311f954..874c2abf1 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -6,4 +6,3 @@ As of version 2.12.2, this Collection of Ansible Modules for PAN-OS is [certified on Ansible Automation Hub](https://console.redhat.com/ansible/automation-hub/repo/published/paloaltonetworks/panos) and officially supported for Ansible subscribers. Ansible subscribers can engage for support through their usual route towards Red Hat. - diff --git a/docs/source/index.rst b/docs/source/index.rst index c0ba2ccfd..326740995 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.7 +Version: 2.21.2 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index bb140a37e..964d6271a 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.7 +version: 2.21.2 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md' diff --git a/pyproject.toml b/pyproject.toml index 4a12c433d..8df7c6fb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,6 @@ requests = "^2.22.0" optional = true [tool.poetry.group.ansible-ee.dependencies] -# ansible-core = "^2.15" ansible-builder = "^3.0.0" [build-system] From 6c5b9e80a992b9d0328bd771f7e62ef4501dcf64 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Sat, 28 Sep 2024 16:08:04 +0300 Subject: [PATCH 120/125] ci: revert testing changes to merge to main repo --- CHANGELOG.md | 212 --------------------------------------------------- 1 file changed, 212 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acc068f45..9677e6ede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,215 +1,3 @@ -### [2.25.7](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.6...v2.25.7) (2024-09-28) - - -### Bug Fixes - -* test ansible collection path ([00ddd77](https://github.com/alperenkose/pan-os-ansible/commit/00ddd772b8d320f2502e8879aa447711db854537)) -* test pr ([a2807a3](https://github.com/alperenkose/pan-os-ansible/commit/a2807a37ce7d4129b5e92e62a074e0b4c0c1ff3b)) -* test with defaults ([e9b5a23](https://github.com/alperenkose/pan-os-ansible/commit/e9b5a23346fcfa0e352e081c8d02cd14c290e651)) -* update comments ([ff2a7b6](https://github.com/alperenkose/pan-os-ansible/commit/ff2a7b65b670a94f0e76ee3da344b5c4b5e84715)) - -### [2.25.6](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.5...v2.25.6) (2024-09-28) - - -### Bug Fixes - -* test without python requirements ([14fe047](https://github.com/alperenkose/pan-os-ansible/commit/14fe047af80ce1c849ba37ecb097fc63ca22ce5a)) - -### [2.25.5](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.4...v2.25.5) (2024-09-28) - - -### Bug Fixes - -* override panos for testing ([63f2f66](https://github.com/alperenkose/pan-os-ansible/commit/63f2f6664046dbeb045e2a542fee46ebec14985d)) -* test without providing panos collection ([a17ed51](https://github.com/alperenkose/pan-os-ansible/commit/a17ed51599b535755e071d19894ce5f763f56a0a)) -* test without python requirements ([fa46174](https://github.com/alperenkose/pan-os-ansible/commit/fa4617416f5ff1591e5d66f91026d167e39f14ce)) -* test without python requirements ([9d7d2a2](https://github.com/alperenkose/pan-os-ansible/commit/9d7d2a26ab4913c8ed29b95d2b91c309ac985f63)) - -### [2.25.4](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.3...v2.25.4) (2024-09-28) - - -### Bug Fixes - -* ci ([e0dc943](https://github.com/alperenkose/pan-os-ansible/commit/e0dc943282fffd8526acf742d246b45923fa44fe)) -* event name ([2422242](https://github.com/alperenkose/pan-os-ansible/commit/2422242184ff45619d66f3fa0928315def7cb91e)) -* git context ([144e81d](https://github.com/alperenkose/pan-os-ansible/commit/144e81d139e8ea627423254bf620ecbbe3d147cf)) -* without work-dir ([bb36138](https://github.com/alperenkose/pan-os-ansible/commit/bb361386383d53d92a86e7ef2cd1bf66ae7bb0a6)) - -### [2.25.3](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.2...v2.25.3) (2024-09-27) - - -### Bug Fixes - -* ci ([f3d5fa5](https://github.com/alperenkose/pan-os-ansible/commit/f3d5fa5df12d743fae4f7edd753e3527373b414e)) -* event name ([9d809fe](https://github.com/alperenkose/pan-os-ansible/commit/9d809fe7fa5914967f96e95fcaeb50b2f0942c74)) - -### [2.25.2](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.1...v2.25.2) (2024-09-27) - - -### Bug Fixes - -* refactor ee ci ([5979ebf](https://github.com/alperenkose/pan-os-ansible/commit/5979ebfe017b29c1ce26c5cfe341373a9ea4fc31)) - -### [2.25.1](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.0...v2.25.1) (2024-09-27) - - -### Bug Fixes - -* refactor ee ci ([b2fe985](https://github.com/alperenkose/pan-os-ansible/commit/b2fe9857727b7b0711a03a113bfa6fd5cf34c2e0)) -* refactor ee ci ([4f4edd9](https://github.com/alperenkose/pan-os-ansible/commit/4f4edd9a7e4e52896b327112912317a3f367cf60)) -* refactor ee ci ([c7e1faf](https://github.com/alperenkose/pan-os-ansible/commit/c7e1fafa4665de4af32adb68d10d8aef230ef40b)) -* refactor ee ci ([e9a55f3](https://github.com/alperenkose/pan-os-ansible/commit/e9a55f3c3cbac849dc67063880710ef1befc2470)) - -## [2.25.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.24.0...v2.25.0) (2024-09-26) - - -### Features - -* new ee ci ([5503279](https://github.com/alperenkose/pan-os-ansible/commit/5503279edc3acba8417acd47dea8019e17a10e09)) -* refactor ee ci ([9b3d9e4](https://github.com/alperenkose/pan-os-ansible/commit/9b3d9e463cef4cad91ce5d2216e0af2da2921705)) - - -### Bug Fixes - -* merge docker meta ([5f7d68f](https://github.com/alperenkose/pan-os-ansible/commit/5f7d68f997e085cb274b253cf98be1352e556dff)) -* new ee ci ([18f0103](https://github.com/alperenkose/pan-os-ansible/commit/18f0103cd604030c468d56e0440819470609bade)) -* refactor ee ci ([760462e](https://github.com/alperenkose/pan-os-ansible/commit/760462ec6ec3bd94f8ce8e01f2e043bb1ba7ddc2)) -* refactor ee ci ([20c6b97](https://github.com/alperenkose/pan-os-ansible/commit/20c6b9743815bbefd4ed75188888e27a1f3f38c3)) -* refactor ee ci ([fee0c4b](https://github.com/alperenkose/pan-os-ansible/commit/fee0c4b8164d2dddc63f309eb00fe943c4622fc7)) -* refactor ee ci ([a6459cb](https://github.com/alperenkose/pan-os-ansible/commit/a6459cb6f26a7095088d8dd63a250f7378fd2a00)) -* trick semantic ([acd2256](https://github.com/alperenkose/pan-os-ansible/commit/acd225649aeae3a88ec5f1dad9d3f907c458acd8)) -* trick semantic ([0907bcc](https://github.com/alperenkose/pan-os-ansible/commit/0907bcc076d496f22354408ac215efbf45dc1d3f)) -* trick semantic ([518419f](https://github.com/alperenkose/pan-os-ansible/commit/518419f656fd9a0e45f8ee79dfb1b0714b8e9955)) -* trick semantic ([c84f733](https://github.com/alperenkose/pan-os-ansible/commit/c84f73300359bcb659288b0d0e96564e4e0496ce)) -* trick semantic ([ee52c05](https://github.com/alperenkose/pan-os-ansible/commit/ee52c05acf4214a728afa563f70020e5600db353)) -* trick semantic ([533acc3](https://github.com/alperenkose/pan-os-ansible/commit/533acc31ba2a6269b33794a124f7b2ed5ba113db)) -* trick semantic ([dc88640](https://github.com/alperenkose/pan-os-ansible/commit/dc88640535a449a5d1cda5e9b10884d3a37a9935)) -* trick semantic ([0cf6feb](https://github.com/alperenkose/pan-os-ansible/commit/0cf6feb1fe38b2640a7ffe54b8206d1f1fde307b)) -* trick semantic ([119e872](https://github.com/alperenkose/pan-os-ansible/commit/119e8723f320cb47d1e156b60c6c8fe8f0a3dc7b)) -* trick semantic ([e3f4400](https://github.com/alperenkose/pan-os-ansible/commit/e3f4400443dfd3e7efb9113966d98aca8457493b)) -* trick semantic ([4959ed4](https://github.com/alperenkose/pan-os-ansible/commit/4959ed4c287a1170778e16bb855cc965eefc4b95)) -* trick semantic ([7fe91d0](https://github.com/alperenkose/pan-os-ansible/commit/7fe91d0012becfebaa79ca3770021a5d00601c3a)) -* trick semantic ([30e6a1f](https://github.com/alperenkose/pan-os-ansible/commit/30e6a1fa01109e257ce9e39abc855fecea3c2ad0)) -* trick semantic ([d4894a5](https://github.com/alperenkose/pan-os-ansible/commit/d4894a5438536b9b8aa5860b451564f8eb20985d)) -* trick semantic ([fd3232d](https://github.com/alperenkose/pan-os-ansible/commit/fd3232df21b9224e9a95c0478e1bced3af01b533)) -* trick semantic ([d11007d](https://github.com/alperenkose/pan-os-ansible/commit/d11007d74c249f6973a47a3aeec6e3561e0e72e5)) -* trick semantic ([0436ce5](https://github.com/alperenkose/pan-os-ansible/commit/0436ce5e9ad55553609d6dc7df080d1bad3112cd)) -* trick semantic ([4a01120](https://github.com/alperenkose/pan-os-ansible/commit/4a01120db43a18804d2b02573290afab93326351)) -* trick semantic ([24d17ea](https://github.com/alperenkose/pan-os-ansible/commit/24d17ea1f31121e191045d1c916b3aeeea2ec3b8)) -* work dir ([cb10ef9](https://github.com/alperenkose/pan-os-ansible/commit/cb10ef9f3703aec013655aec787d67c97f5d8956)) - -## [2.24.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.23.1...v2.24.0) (2024-09-26) - - -### Features - -* new ee ci ([039b0f0](https://github.com/alperenkose/pan-os-ansible/commit/039b0f0e1d740bd8b99556bfc0b672aab6f8c405)) -* refactor ee ci ([3916283](https://github.com/alperenkose/pan-os-ansible/commit/39162831869a6b6c2c04370820dc6338c9820248)) - - -### Bug Fixes - -* merge docker meta ([f1cf7ef](https://github.com/alperenkose/pan-os-ansible/commit/f1cf7efff96743f2babeac9beaf5ee5f3f67572f)) -* new ee ci ([750f65e](https://github.com/alperenkose/pan-os-ansible/commit/750f65ecdb3865cec145cb8ebff800661185e07c)) -* refactor ee ci ([46b5404](https://github.com/alperenkose/pan-os-ansible/commit/46b540466cb6e0ea531fc49d1269b745cc269b83)) -* refactor ee ci ([4967797](https://github.com/alperenkose/pan-os-ansible/commit/4967797b695f9c3d4f3661726affa19a70431ec0)) -* refactor ee ci ([c8c20df](https://github.com/alperenkose/pan-os-ansible/commit/c8c20df65845e7a10d1fe185c00f5f3425c72ffe)) -* refactor ee ci ([69bd778](https://github.com/alperenkose/pan-os-ansible/commit/69bd778f5b313ff2f1d0fee0dc336c7747a4e8ad)) -* trick semantic ([0490c30](https://github.com/alperenkose/pan-os-ansible/commit/0490c30d84fdbeadfe4221d9407c861c24218aef)) -* trick semantic ([2b77ad1](https://github.com/alperenkose/pan-os-ansible/commit/2b77ad1fa72223f8439b5d2871ccd5e63468c1a4)) -* trick semantic ([ced4e06](https://github.com/alperenkose/pan-os-ansible/commit/ced4e06cc9fffd65ec5e4b97dd215351d7bbadf7)) -* trick semantic ([27a5fe0](https://github.com/alperenkose/pan-os-ansible/commit/27a5fe087c40edf406944830071c0f8af654cfb2)) -* trick semantic ([4eb1d97](https://github.com/alperenkose/pan-os-ansible/commit/4eb1d975478325b4241e75a1a9c4cf762cb74d49)) -* trick semantic ([cec5bdb](https://github.com/alperenkose/pan-os-ansible/commit/cec5bdb550d9c14c34a6f0fa4df4099ceafd7c59)) -* trick semantic ([47f372f](https://github.com/alperenkose/pan-os-ansible/commit/47f372ff6cd65fefc6e52d505492f604c3ddccb9)) -* trick semantic ([5ffab61](https://github.com/alperenkose/pan-os-ansible/commit/5ffab618c07fd1081ab174f6c08ad9f338c6558a)) -* trick semantic ([5fd4dce](https://github.com/alperenkose/pan-os-ansible/commit/5fd4dcec213d36d6f8149fc910121041f5975dfc)) -* trick semantic ([68b0f0b](https://github.com/alperenkose/pan-os-ansible/commit/68b0f0bb31124de1fb83d514898e6f0fad383b0c)) -* trick semantic ([d221ce7](https://github.com/alperenkose/pan-os-ansible/commit/d221ce78f18475da579c38c80321a6edc1e72d44)) -* trick semantic ([b2df5ec](https://github.com/alperenkose/pan-os-ansible/commit/b2df5ecbb1a2c76f4604ae3ac89e443c7dd35d80)) -* trick semantic ([8623a7a](https://github.com/alperenkose/pan-os-ansible/commit/8623a7a0a40d508580c2a15e1a94f92749bb23c5)) -* trick semantic ([9db37ba](https://github.com/alperenkose/pan-os-ansible/commit/9db37ba75862b336eddfe2a7d559570562f5e980)) -* trick semantic ([47d3cea](https://github.com/alperenkose/pan-os-ansible/commit/47d3cea550c1e860da0de277dd40238b34a43b65)) -* trick semantic ([2bd67aa](https://github.com/alperenkose/pan-os-ansible/commit/2bd67aa0291d09c27be6f66d1e529f3c19671536)) -* trick semantic ([11c06d2](https://github.com/alperenkose/pan-os-ansible/commit/11c06d29854c29753e17525aa0cf7a9d0a62145a)) -* trick semantic ([30c8232](https://github.com/alperenkose/pan-os-ansible/commit/30c8232680e8d3ffcfb2258deb116c99c2991068)) -* work dir ([02c438a](https://github.com/alperenkose/pan-os-ansible/commit/02c438a6c905f22c8b38a6d6d3e18b714edd8b23)) - -### [2.23.1](https://github.com/alperenkose/pan-os-ansible/compare/v2.23.0...v2.23.1) (2024-09-26) - - -### Bug Fixes - -* check release job for release build ([6871fc3](https://github.com/alperenkose/pan-os-ansible/commit/6871fc3c1d21215c939de806a448b93c8529e960)) -* debug release image ([9c92e00](https://github.com/alperenkose/pan-os-ansible/commit/9c92e00661a162d7f80684ab26916b5fc99894cf)) -* remove debug ([60c8324](https://github.com/alperenkose/pan-os-ansible/commit/60c83245afd1cdd79fc74924d16383f2e5959e4d)) - -## [2.23.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.22.0...v2.23.0) (2024-09-25) - - -### Features - -* test ee ci for release ([0542e56](https://github.com/alperenkose/pan-os-ansible/commit/0542e564acbc2acd01dd20e9e2da83f1eee8501c)) - - -### Bug Fixes - -* temp disable sanity tests ([d79a97b](https://github.com/alperenkose/pan-os-ansible/commit/d79a97b240e13a8af91f685790bec0676ef7bb2b)) - -## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-25) - - -### Features - -* Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) -* Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) -* ee ci for development ([97c31ba](https://github.com/alperenkose/pan-os-ansible/commit/97c31ba43cba71ee3d695ccac698d3beed01bf2c)) -* test ee ci for release ([a7605af](https://github.com/alperenkose/pan-os-ansible/commit/a7605af5ffb09e3a7ddf2f564deaef727c2fcded)) - - -### Bug Fixes - -* Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) -* new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) -* requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) -* **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) -* **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) - -## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-25) - - -### Features - -* Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) -* Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) -* ee ci for development ([97c31ba](https://github.com/alperenkose/pan-os-ansible/commit/97c31ba43cba71ee3d695ccac698d3beed01bf2c)) - - -### Bug Fixes - -* Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) -* new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) -* requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) -* **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) -* **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) - -## [2.20.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.19.1...v2.20.0) (2024-09-24) - - -### Features - -* Add additional error handling to some upgrade assurance modules ([#561](https://github.com/alperenkose/pan-os-ansible/issues/561)) ([c64cd79](https://github.com/alperenkose/pan-os-ansible/commit/c64cd7902b4e4a83c12a53036052a9c82070af1a)) -* Add new option to panos_active_in_ha module ([#560](https://github.com/alperenkose/pan-os-ansible/issues/560)) ([a2870f5](https://github.com/alperenkose/pan-os-ansible/commit/a2870f5d742a6d6dd2e759e101ba1b6fcc9e6ee9)) - - -### Bug Fixes - -* Add 'parent_interface' parameter for l2/l3 subinterface modules ([#552](https://github.com/alperenkose/pan-os-ansible/issues/552)) ([73c28a8](https://github.com/alperenkose/pan-os-ansible/commit/73c28a890ab35784a40ee14a47c11b31f4ffac6d)) -* new release for failed ci ([3872708](https://github.com/alperenkose/pan-os-ansible/commit/38727087df51e2e547611053a3f5767e6e04400c)) -* requirements.txt update python version and remove hashes ([905b1eb](https://github.com/alperenkose/pan-os-ansible/commit/905b1eb76236d1560deb249bb7c048aa455721c2)) -* **panos_facts.py:** Fixed virtual systems fact name ([#558](https://github.com/alperenkose/pan-os-ansible/issues/558)) ([0d0fd6d](https://github.com/alperenkose/pan-os-ansible/commit/0d0fd6d11d3bfd55a3795f32f69f9201fd54f554)) -* **panos_security_rule:** state merged with existing values ([#570](https://github.com/alperenkose/pan-os-ansible/issues/570)) ([db6c32c](https://github.com/alperenkose/pan-os-ansible/commit/db6c32c7b9303f7b5b66f7169babca7f52f4ed87)) - ### [2.21.2](https://github.com/PaloAltoNetworks/pan-os-ansible/compare/v2.21.1...v2.21.2) (2024-09-19) From cb212542927f1cb5926b4e4af954f8d2d78c8755 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 2 Oct 2024 12:06:19 +0300 Subject: [PATCH 121/125] feat: use pyversion --- .github/workflows/ci.yml | 12 ++++++++---- .github/workflows/ee.yml | 10 +++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a87b6b05..1af842fd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,6 @@ on: env: NAMESPACE: paloaltonetworks COLLECTION_NAME: panos - PYTHON_VERSION: 3.8 jobs: @@ -109,9 +108,14 @@ jobs: cd .github/workflows python -m tox -- ../.. + pyversion: + name: Discover minimum Python version + uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + format: name: Code Format Check runs-on: ubuntu-latest + needs: pyversion defaults: run: working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} @@ -123,7 +127,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: ${{ env.PYTHON_VERSION }} + python-version: ${{ needs.pyversion.outputs.pyversion }} - name: Install Poetry uses: Gr1N/setup-poetry@v8 @@ -196,7 +200,7 @@ jobs: docs: name: docs if: github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: [release] + needs: [release, pyversion] runs-on: ubuntu-latest defaults: @@ -216,7 +220,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: ${{ needs.pyversion.outputs.pyversion }} - name: Install Poetry uses: Gr1N/setup-poetry@v8 diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index e0884a750..79e5f635b 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -82,11 +82,11 @@ jobs: - name: discover Python version id: pyversion - shell: bash - run: | - PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') - echo "pyversion=$PYVER" >> $GITHUB_OUTPUT - # uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + # shell: bash + # run: | + # PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') + # echo "pyversion=$PYVER" >> $GITHUB_OUTPUT # working-directory doesn't work with uses, until you get a `with path` similar to checkout, this is going to be inline - name: install Python From 649aa4416613886310e77bb87ad15d3ad8255763 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 2 Oct 2024 12:11:24 +0300 Subject: [PATCH 122/125] fix: use pyversion --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1af842fd3..1b56abcf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ jobs: pyversion: name: Discover minimum Python version - uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 + uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/workflows/_discover_python_ver.yml@v0.3.1 format: name: Code Format Check From d558d26524fd1956cae053b149d56f002218c53d Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 2 Oct 2024 12:30:27 +0300 Subject: [PATCH 123/125] fix: use pyversion --- .github/workflows/_discover_python_ver.yml | 28 ++++++++++++++++++++++ .github/workflows/ci.yml | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/_discover_python_ver.yml diff --git a/.github/workflows/_discover_python_ver.yml b/.github/workflows/_discover_python_ver.yml new file mode 100644 index 000000000..e8307eeb6 --- /dev/null +++ b/.github/workflows/_discover_python_ver.yml @@ -0,0 +1,28 @@ +name: (sub) Discover Python version + +defaults: + run: + shell: bash + +permissions: + contents: read + +on: + workflow_call: + outputs: + pyversion: + description: A discovered Python version + value: ${{ jobs.pyversion.outputs.pyversion }} + +jobs: + pyversion: + name: Discover minimum Python version + runs-on: ubuntu-latest + outputs: + pyversion: ${{ steps.pyversion.outputs.pyversion }} + steps: + - name: checkout code + uses: actions/checkout@v4 + - name: discover Python version + id: pyversion + uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b56abcf2..4855df751 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ jobs: pyversion: name: Discover minimum Python version - uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/workflows/_discover_python_ver.yml@v0.3.1 + uses: ./.github/workflows/_discover_python_ver.yml format: name: Code Format Check From 2287ec9686a6faf6eaabb036a5f6f7ca8aa70161 Mon Sep 17 00:00:00 2001 From: Alp Kose Date: Wed, 2 Oct 2024 13:14:05 +0300 Subject: [PATCH 124/125] fix: use env vars --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/ee.yml | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4855df751..3672184c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -205,7 +205,7 @@ jobs: defaults: run: - working-directory: ./ansible_collections/paloaltonetworks/panos + working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} steps: # Just a note here: The Ansible stuff is apparently doing realpath @@ -215,7 +215,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - path: ./ansible_collections/paloaltonetworks/panos + path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: Setup Python uses: actions/setup-python@v4 @@ -255,8 +255,8 @@ jobs: run: | cd ../../../.. mv pan-os-ansible the_repo - mv the_repo/ansible_collections/paloaltonetworks/panos pan-os-ansible - mkdir -p pan-os-ansible/ansible_collections/paloaltonetworks/panos + mv the_repo/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} pan-os-ansible + mkdir -p pan-os-ansible/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4.4.3 diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml index 79e5f635b..4d031be74 100644 --- a/.github/workflows/ee.yml +++ b/.github/workflows/ee.yml @@ -83,11 +83,6 @@ jobs: - name: discover Python version id: pyversion uses: PaloAltoNetworks/pan-os-upgrade-assurance/.github/actions/discover_python_version@v0.3.1 - # shell: bash - # run: | - # PYVER=$(grep '^[Pp]ython ' pyproject.toml | sed -E 's/python += +\"\^?([0-9]\.[0-9]+)(\.[0-9]+)?\"/\1/; /python/q1') - # echo "pyversion=$PYVER" >> $GITHUB_OUTPUT - # working-directory doesn't work with uses, until you get a `with path` similar to checkout, this is going to be inline - name: install Python uses: actions/setup-python@v4 From 2537c10f9a642a483482b6a78cb24b13551d8003 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 2 Oct 2024 10:28:40 +0000 Subject: [PATCH 125/125] chore(release): 2.26.0 ## [2.26.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.7...v2.26.0) (2024-10-02) ### Features * use pyversion ([cb21254](https://github.com/alperenkose/pan-os-ansible/commit/cb212542927f1cb5926b4e4af954f8d2d78c8755)) ### Bug Fixes * use env vars ([2287ec9](https://github.com/alperenkose/pan-os-ansible/commit/2287ec9686a6faf6eaabb036a5f6f7ca8aa70161)) * use pyversion ([d558d26](https://github.com/alperenkose/pan-os-ansible/commit/d558d26524fd1956cae053b149d56f002218c53d)) * use pyversion ([649aa44](https://github.com/alperenkose/pan-os-ansible/commit/649aa4416613886310e77bb87ad15d3ad8255763)) --- CHANGELOG.md | 14 ++++++++++++++ docs/source/index.rst | 2 +- galaxy.yml | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acc068f45..937f2fdc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [2.26.0](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.7...v2.26.0) (2024-10-02) + + +### Features + +* use pyversion ([cb21254](https://github.com/alperenkose/pan-os-ansible/commit/cb212542927f1cb5926b4e4af954f8d2d78c8755)) + + +### Bug Fixes + +* use env vars ([2287ec9](https://github.com/alperenkose/pan-os-ansible/commit/2287ec9686a6faf6eaabb036a5f6f7ca8aa70161)) +* use pyversion ([d558d26](https://github.com/alperenkose/pan-os-ansible/commit/d558d26524fd1956cae053b149d56f002218c53d)) +* use pyversion ([649aa44](https://github.com/alperenkose/pan-os-ansible/commit/649aa4416613886310e77bb87ad15d3ad8255763)) + ### [2.25.7](https://github.com/alperenkose/pan-os-ansible/compare/v2.25.6...v2.25.7) (2024-09-28) diff --git a/docs/source/index.rst b/docs/source/index.rst index c0ba2ccfd..aad2cc697 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ Palo Alto Networks Ansible Collection ===================================== -Version: 2.25.7 +Version: 2.26.0 The Palo Alto Networks Ansible collection is a collection of modules that automate configuration and operational tasks on Palo Alto Networks Next diff --git a/galaxy.yml b/galaxy.yml index bb140a37e..7e858b347 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: 'paloaltonetworks' name: 'panos' # The version of the collection. Must be compatible with semantic versioning -version: 2.25.7 +version: 2.26.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: 'README.md'