From 4efa5e2c5eb15c3d9018d97f7024da7a37b0c2fe Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Thu, 30 Jan 2025 10:28:00 +0100 Subject: [PATCH 1/5] ci: add a varname to switch all become to false, as GH action does not allow priv escalation anymore --- .github/workflows/ci.yml | 5 ++++- .github/workflows/cish.yml | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6eb706..fa1c1b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,9 @@ on: molecule_tests: required: true type: string + root_permission_varname: + required: false + type: string sanity_includes: required: false type: string @@ -213,7 +216,7 @@ jobs: - name: Run molecule test run: | molecule --version - molecule test -s ${{ matrix.molecule_test }} + molecule test -s ${{ matrix.molecule_test }} -- -e ${{ inputs.root_permission_varname }}=false working-directory: ./ansible_collections/${{ inputs.fqcn }} env: ANSIBLE_VERBOSITY: ${{ inputs.debug_verbosity }} diff --git a/.github/workflows/cish.yml b/.github/workflows/cish.yml index 3020bca..2082fd1 100644 --- a/.github/workflows/cish.yml +++ b/.github/workflows/cish.yml @@ -9,6 +9,9 @@ on: molecule_tests: required: true type: string + root_permission_varname: + required: false + type: string podman_tests_current: required: true type: string @@ -219,7 +222,7 @@ jobs: - name: Run molecule test run: | molecule --version - molecule test -s ${{ matrix.molecule_test }} + molecule test -s ${{ matrix.molecule_test }} -- -e ${{ inputs.root_permission_varname }}=false working-directory: ./ansible_collections/${{ inputs.fqcn }} env: ANSIBLE_VERBOSITY: ${{ inputs.debug_verbosity }} @@ -267,7 +270,7 @@ jobs: - name: Run molecule test run: | molecule --version - molecule test -s ${{ matrix.molecule_test }} + molecule test -s ${{ matrix.molecule_test }} -- -e ${{ inputs.root_permission_varname }}=false working-directory: ./ansible_collections/${{ inputs.fqcn }} env: ANSIBLE_REMOTE_TMP: "/tmp-2.15-${{ matrix.molecule_test }}" @@ -316,7 +319,7 @@ jobs: - name: Run molecule test run: | molecule --version - molecule test -s ${{ matrix.molecule_test }} + molecule test -s ${{ matrix.molecule_test }} -- -e ${{ inputs.root_permission_varname }}=false working-directory: ./ansible_collections/${{ inputs.fqcn }} env: ANSIBLE_REMOTE_TMP: "/tmp-2.16-${{ matrix.molecule_test }}" From 8f3c5da110e6b696c70800809a977ceeb53ab3a4 Mon Sep 17 00:00:00 2001 From: Ranabir Chakraborty Date: Tue, 9 Sep 2025 12:14:02 +0530 Subject: [PATCH 2/5] AMW-415 Update github-actions repo to reflect ansible-core 2.19 --- .github/workflows/ci.yml | 10 +++++++--- .github/workflows/cish.yml | 14 +++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa1c1b1..2d90359 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,10 @@ on: "python_version": "3.12", "ansible_version": "stable-2.16" } + { + "python_version": "3.12", + "ansible_version": "stable-2.19" + } ] fail_fast: required: false @@ -71,7 +75,7 @@ jobs: strategy: matrix: python_version: ["3.11"] - ansible_version: ["2.16"] + ansible_version: ["2.19"] steps: - name: Check out code uses: actions/checkout@v4 @@ -122,7 +126,7 @@ jobs: strategy: matrix: python_version: ["3.9", "3.11", "3.12"] - ansible_version: ["stable-2.15", "stable-2.16", "milestone", "devel"] + ansible_version: ["stable-2.15", "stable-2.16", "stable-2.19", "milestone", "devel"] exclude: ${{ fromJSON(inputs.sanity_excludes) }} include: ${{ fromJSON(inputs.sanity_includes) }} steps: @@ -172,7 +176,7 @@ jobs: strategy: matrix: python_version: ["3.11"] - ansible_version: ["2.15", "2.16"] + ansible_version: ["2.15", "2.16", "2.19"] molecule_test: ${{ fromJSON(inputs.molecule_tests) }} fail-fast: ${{ inputs.fail_fast }} steps: diff --git a/.github/workflows/cish.yml b/.github/workflows/cish.yml index 2082fd1..8561d86 100644 --- a/.github/workflows/cish.yml +++ b/.github/workflows/cish.yml @@ -55,6 +55,10 @@ on: "python_version": "3.12", "ansible_version": "stable-2.16" } + { + "python_version": "3.12", + "ansible_version": "stable-2.19" + } ] fail_fast: required: false @@ -77,7 +81,7 @@ jobs: strategy: matrix: python_version: ["3.11"] - ansible_version: ["2.16"] + ansible_version: ["2.19"] steps: - name: Check out code uses: actions/checkout@v4 @@ -128,7 +132,7 @@ jobs: strategy: matrix: python_version: ["3.9", "3.11", "3.12"] - ansible_version: ["stable-2.15", "stable-2.16", "milestone", "devel"] + ansible_version: ["stable-2.15", "stable-2.16", "stable-2.19", "milestone", "devel"] exclude: ${{ fromJSON(inputs.sanity_excludes) }} include: ${{ fromJSON(inputs.sanity_includes) }} steps: @@ -178,7 +182,7 @@ jobs: strategy: matrix: python_version: ["3.11"] - ansible_version: ["2.15", "2.16"] + ansible_version: ["2.15", "2.16", "2.19"] molecule_test: ${{ fromJSON(inputs.molecule_tests) }} fail-fast: ${{ inputs.fail_fast }} steps: @@ -281,7 +285,7 @@ jobs: STAGE_JBOSSNETWORK_API_SECRET: '${{ secrets.STAGE_JBOSSNETWORK_API_SECRET }}' molecule_next: - runs-on: molecule-2.16 + runs-on: molecule-2.19 strategy: matrix: python_version: ["3.11"] @@ -322,7 +326,7 @@ jobs: molecule test -s ${{ matrix.molecule_test }} -- -e ${{ inputs.root_permission_varname }}=false working-directory: ./ansible_collections/${{ inputs.fqcn }} env: - ANSIBLE_REMOTE_TMP: "/tmp-2.16-${{ matrix.molecule_test }}" + ANSIBLE_REMOTE_TMP: "/tmp-2.19-${{ matrix.molecule_test }}" ANSIBLE_VERBOSITY: ${{ inputs.debug_verbosity }} PROD_JBOSSNETWORK_API_CLIENTID: '${{ secrets.PROD_JBOSSNETWORK_API_CLIENTID }}' PROD_JBOSSNETWORK_API_SECRET: '${{ secrets.PROD_JBOSSNETWORK_API_SECRET }}' From aaae8f607c3b9a2b78186fa602838f9221da387d Mon Sep 17 00:00:00 2001 From: Ranabir Chakraborty Date: Tue, 23 Sep 2025 13:05:42 +0530 Subject: [PATCH 3/5] AMW----415 Update github-actions repo to reflect ansible-core 2.19 --- .github/workflows/ci.yml | 2 +- .github/workflows/cish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d90359..875faa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ on: { "python_version": "3.12", "ansible_version": "stable-2.16" - } + }, { "python_version": "3.12", "ansible_version": "stable-2.19" diff --git a/.github/workflows/cish.yml b/.github/workflows/cish.yml index 8561d86..900806d 100644 --- a/.github/workflows/cish.yml +++ b/.github/workflows/cish.yml @@ -54,7 +54,7 @@ on: { "python_version": "3.12", "ansible_version": "stable-2.16" - } + }, { "python_version": "3.12", "ansible_version": "stable-2.19" From bae8a6c9ca270309d4979675cd147d25ed1785e7 Mon Sep 17 00:00:00 2001 From: Ranabir Chakraborty Date: Tue, 23 Sep 2025 19:05:41 +0530 Subject: [PATCH 4/5] AMW-427 github-actions rootprem branch is using older python version --- .github/workflows/ci.yml | 18 +++--------------- .github/workflows/cish.yml | 18 +++--------------- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 875faa3..2240523 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,18 +21,6 @@ on: type: string default: >- [ - { - "python_version": "3.9", - "ansible_version": "stable-2.16" - }, - { - "python_version": "3.9", - "ansible_version": "milestone" - }, - { - "python_version": "3.9", - "ansible_version": "devel" - }, { "python_version": "3.11", "ansible_version": "milestone" @@ -125,8 +113,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.9", "3.11", "3.12"] - ansible_version: ["stable-2.15", "stable-2.16", "stable-2.19", "milestone", "devel"] + python_version: ["3.11", "3.12"] + ansible_version: ["stable-2.16", "stable-2.17", "stable-2.19", "milestone", "devel"] exclude: ${{ fromJSON(inputs.sanity_excludes) }} include: ${{ fromJSON(inputs.sanity_includes) }} steps: @@ -176,7 +164,7 @@ jobs: strategy: matrix: python_version: ["3.11"] - ansible_version: ["2.15", "2.16", "2.19"] + ansible_version: ["2.16", "2.17", "2.19"] molecule_test: ${{ fromJSON(inputs.molecule_tests) }} fail-fast: ${{ inputs.fail_fast }} steps: diff --git a/.github/workflows/cish.yml b/.github/workflows/cish.yml index 900806d..930b1f0 100644 --- a/.github/workflows/cish.yml +++ b/.github/workflows/cish.yml @@ -27,18 +27,6 @@ on: type: string default: >- [ - { - "python_version": "3.9", - "ansible_version": "stable-2.16" - }, - { - "python_version": "3.9", - "ansible_version": "milestone" - }, - { - "python_version": "3.9", - "ansible_version": "devel" - }, { "python_version": "3.11", "ansible_version": "milestone" @@ -131,8 +119,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.9", "3.11", "3.12"] - ansible_version: ["stable-2.15", "stable-2.16", "stable-2.19", "milestone", "devel"] + python_version: ["3.11", "3.12"] + ansible_version: ["stable-2.19", "milestone", "devel"] exclude: ${{ fromJSON(inputs.sanity_excludes) }} include: ${{ fromJSON(inputs.sanity_includes) }} steps: @@ -182,7 +170,7 @@ jobs: strategy: matrix: python_version: ["3.11"] - ansible_version: ["2.15", "2.16", "2.19"] + ansible_version: ["2.16", "2.17", "2.19"] molecule_test: ${{ fromJSON(inputs.molecule_tests) }} fail-fast: ${{ inputs.fail_fast }} steps: From b6d97f252802cf430e6428c6a51be5eb417cea6a Mon Sep 17 00:00:00 2001 From: Ranabir Chakraborty Date: Sun, 22 Mar 2026 11:40:04 +0530 Subject: [PATCH 5/5] AMW-494 AMW collections need ansible-core 2.18, 2.19 and 2.20 compatibility --- .github/workflows/ci.yml | 36 +++-------- .github/workflows/cish.yml | 112 ++++++++++++++++++++++------------ .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 2 +- 4 files changed, 82 insertions(+), 70 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2240523..537675d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,29 +19,7 @@ on: sanity_excludes: required: false type: string - default: >- - [ - { - "python_version": "3.11", - "ansible_version": "milestone" - }, - { - "python_version": "3.11", - "ansible_version": "devel" - }, - { - "python_version": "3.12", - "ansible_version": "stable-2.15" - }, - { - "python_version": "3.12", - "ansible_version": "stable-2.16" - }, - { - "python_version": "3.12", - "ansible_version": "stable-2.19" - } - ] + default: "[]" fail_fast: required: false type: boolean @@ -62,8 +40,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.11"] - ansible_version: ["2.19"] + python_version: ["3.12"] + ansible_version: ["2.18", "2.19", "2.20"] steps: - name: Check out code uses: actions/checkout@v4 @@ -113,8 +91,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.11", "3.12"] - ansible_version: ["stable-2.16", "stable-2.17", "stable-2.19", "milestone", "devel"] + python_version: ["3.12"] + ansible_version: ["stable-2.18", "stable-2.19", "stable-2.20"] exclude: ${{ fromJSON(inputs.sanity_excludes) }} include: ${{ fromJSON(inputs.sanity_includes) }} steps: @@ -163,8 +141,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.11"] - ansible_version: ["2.16", "2.17", "2.19"] + python_version: ["3.12"] + ansible_version: ["2.18", "2.19", "2.20"] molecule_test: ${{ fromJSON(inputs.molecule_tests) }} fail-fast: ${{ inputs.fail_fast }} steps: diff --git a/.github/workflows/cish.yml b/.github/workflows/cish.yml index 930b1f0..aef9334 100644 --- a/.github/workflows/cish.yml +++ b/.github/workflows/cish.yml @@ -15,6 +15,9 @@ on: podman_tests_current: required: true type: string + podman_tests_middle: + required: true + type: string podman_tests_next: required: true type: string @@ -25,29 +28,7 @@ on: sanity_excludes: required: false type: string - default: >- - [ - { - "python_version": "3.11", - "ansible_version": "milestone" - }, - { - "python_version": "3.11", - "ansible_version": "devel" - }, - { - "python_version": "3.12", - "ansible_version": "stable-2.15" - }, - { - "python_version": "3.12", - "ansible_version": "stable-2.16" - }, - { - "python_version": "3.12", - "ansible_version": "stable-2.19" - } - ] + default: "[]" fail_fast: required: false type: boolean @@ -68,8 +49,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.11"] - ansible_version: ["2.19"] + python_version: ["3.12"] + ansible_version: ["2.18", "2.19", "2.20"] steps: - name: Check out code uses: actions/checkout@v4 @@ -119,8 +100,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.11", "3.12"] - ansible_version: ["stable-2.19", "milestone", "devel"] + python_version: ["3.12"] + ansible_version: ["stable-2.18", "stable-2.19", "stable-2.20", "milestone", "devel"] exclude: ${{ fromJSON(inputs.sanity_excludes) }} include: ${{ fromJSON(inputs.sanity_includes) }} steps: @@ -169,8 +150,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.11"] - ansible_version: ["2.16", "2.17", "2.19"] + python_version: ["3.12"] + ansible_version: ["2.18", "2.19", "2.20"] molecule_test: ${{ fromJSON(inputs.molecule_tests) }} fail-fast: ${{ inputs.fail_fast }} steps: @@ -224,10 +205,10 @@ jobs: STAGE_JBOSSNETWORK_API_SECRET: '${{ secrets.STAGE_JBOSSNETWORK_API_SECRET }}' molecule_current: - runs-on: molecule-2.15 + runs-on: molecule-2.18 strategy: matrix: - python_version: ["3.11"] + python_version: ["3.12"] molecule_test: ${{ fromJSON(inputs.podman_tests_current) }} fail-fast: ${{ inputs.fail_fast }} steps: @@ -243,10 +224,10 @@ jobs: retry_wait_seconds: 60 max_attempts: 3 command: | - python3.11 -m pip install --upgrade pip + python3.12 -m pip install --upgrade pip if [ -f ansible_collections/${{ inputs.fqcn }}/requirements.txt ]; then echo "=== Installing python deps" - python3.11 -m pip install --progress-bar off -r ansible_collections/${{ inputs.fqcn }}/requirements.txt + python3.12 -m pip install --progress-bar off -r ansible_collections/${{ inputs.fqcn }}/requirements.txt fi if [ -f ansible_collections/${{ inputs.fqcn }}/requirements.yml ]; then echo "=== Installing dependencies" @@ -265,19 +246,19 @@ jobs: molecule test -s ${{ matrix.molecule_test }} -- -e ${{ inputs.root_permission_varname }}=false working-directory: ./ansible_collections/${{ inputs.fqcn }} env: - ANSIBLE_REMOTE_TMP: "/tmp-2.15-${{ matrix.molecule_test }}" + ANSIBLE_REMOTE_TMP: "/tmp-2.18-${{ matrix.molecule_test }}" ANSIBLE_VERBOSITY: ${{ inputs.debug_verbosity }} PROD_JBOSSNETWORK_API_CLIENTID: '${{ secrets.PROD_JBOSSNETWORK_API_CLIENTID }}' PROD_JBOSSNETWORK_API_SECRET: '${{ secrets.PROD_JBOSSNETWORK_API_SECRET }}' STAGE_JBOSSNETWORK_API_CLIENTID: '${{ secrets.STAGE_JBOSSNETWORK_API_CLIENTID }}' STAGE_JBOSSNETWORK_API_SECRET: '${{ secrets.STAGE_JBOSSNETWORK_API_SECRET }}' - molecule_next: + molecule_middle: runs-on: molecule-2.19 strategy: matrix: - python_version: ["3.11"] - molecule_test: ${{ fromJSON(inputs.podman_tests_next) }} + python_version: ["3.12"] + molecule_test: ${{ fromJSON(inputs.podman_tests_middle) }} fail-fast: ${{ inputs.fail_fast }} steps: - name: Check out code @@ -292,10 +273,10 @@ jobs: retry_wait_seconds: 60 max_attempts: 3 command: | - python3.11 -m pip install --upgrade pip + python3.12 -m pip install --upgrade pip if [ -f ansible_collections/${{ inputs.fqcn }}/requirements.txt ]; then echo "=== Installing python deps" - python3.11 -m pip install --progress-bar off -r ansible_collections/${{ inputs.fqcn }}/requirements.txt + python3.12 -m pip install --progress-bar off -r ansible_collections/${{ inputs.fqcn }}/requirements.txt fi if [ -f ansible_collections/${{ inputs.fqcn }}/requirements.yml ]; then echo "=== Installing dependencies" @@ -320,3 +301,56 @@ jobs: PROD_JBOSSNETWORK_API_SECRET: '${{ secrets.PROD_JBOSSNETWORK_API_SECRET }}' STAGE_JBOSSNETWORK_API_CLIENTID: '${{ secrets.STAGE_JBOSSNETWORK_API_CLIENTID }}' STAGE_JBOSSNETWORK_API_SECRET: '${{ secrets.STAGE_JBOSSNETWORK_API_SECRET }}' + PROXY: '10.88.0.1:3128' + NO_PROXY: 'localhost,.redhat.com,.ansible.com' + + molecule_next: + runs-on: molecule-2.20 + strategy: + matrix: + python_version: ["3.12"] + molecule_test: ${{ fromJSON(inputs.podman_tests_next) }} + fail-fast: ${{ inputs.fail_fast }} + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + path: ansible_collections/${{ inputs.fqcn }} + + - name: Install dependencies + uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + retry_wait_seconds: 60 + max_attempts: 3 + command: | + python3.12 -m pip install --upgrade pip + if [ -f ansible_collections/${{ inputs.fqcn }}/requirements.txt ]; then + echo "=== Installing python deps" + python3.12 -m pip install --progress-bar off -r ansible_collections/${{ inputs.fqcn }}/requirements.txt + fi + if [ -f ansible_collections/${{ inputs.fqcn }}/requirements.yml ]; then + echo "=== Installing dependencies" + ansible-galaxy collection install -r ansible_collections/${{ inputs.fqcn }}/requirements.yml -p /home/runner/.ansible/collections --force-with-deps + fi + if [ -f ansible_collections/${{ inputs.fqcn }}/molecule/requirements.yml ]; then + echo "=== Installing test dependencies" + ansible-galaxy role install -r ansible_collections/${{ inputs.fqcn }}/molecule/requirements.yml ||: + ansible-galaxy collection install -r ansible_collections/${{ inputs.fqcn }}/molecule/requirements.yml -p /home/runner/.ansible/collections + fi + exit 0 + + - name: Run molecule test + run: | + molecule --version + molecule test -s ${{ matrix.molecule_test }} -- -e ${{ inputs.root_permission_varname }}=false + working-directory: ./ansible_collections/${{ inputs.fqcn }} + env: + ANSIBLE_REMOTE_TMP: "/tmp-2.20-${{ matrix.molecule_test }}" + ANSIBLE_VERBOSITY: ${{ inputs.debug_verbosity }} + PROD_JBOSSNETWORK_API_CLIENTID: '${{ secrets.PROD_JBOSSNETWORK_API_CLIENTID }}' + PROD_JBOSSNETWORK_API_SECRET: '${{ secrets.PROD_JBOSSNETWORK_API_SECRET }}' + STAGE_JBOSSNETWORK_API_CLIENTID: '${{ secrets.STAGE_JBOSSNETWORK_API_CLIENTID }}' + STAGE_JBOSSNETWORK_API_SECRET: '${{ secrets.STAGE_JBOSSNETWORK_API_SECRET }}' + PROXY: '10.88.0.1:3128' + NO_PROXY: 'localhost,.redhat.com,.ansible.com' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ad3f79d..27b3e78 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -39,7 +39,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 cache: 'pip' - name: Install doc dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ec3492..8e33cbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" cache: 'pip' - name: Get current version