Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
if: >-
!cancelled()
&& steps.make-run.outputs.cov-report-files != ''
uses: codecov/codecov-action@v4

Check failure on line 116 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=ansible_awx&issues=AaBnfsZn4qzZ8lHzCOUW&open=AaBnfsZn4qzZ8lHzCOUW&pullRequest=16640
with:
fail_ci_if_error: >-
${{
Expand All @@ -132,7 +132,7 @@
if: >-
!cancelled()
&& steps.make-run.outputs.test-result-files != ''
uses: codecov/test-results-action@v1

Check failure on line 135 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=ansible_awx&issues=AaBnfsZn4qzZ8lHzCOUX&open=AaBnfsZn4qzZ8lHzCOUX&pullRequest=16640
with:
fail_ci_if_error: >-
${{
Expand Down Expand Up @@ -237,13 +237,29 @@

- name: Install playbook dependencies
run: |
python -m pip install docker

Check warning on line 240 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Using dependencies without locking resolved versions is security-sensitive.

See more on https://sonarcloud.io/project/issues?id=ansible_awx&issues=AaBnfsZn4qzZ8lHzCOUY&open=AaBnfsZn4qzZ8lHzCOUY&pullRequest=16640

- name: Check Python version
working-directory: awx
run: |
make print-PYTHON

- name: Free up runner disk space before the image build
# This job builds the AWX and operator images, loads a SECOND copy of
# each into the kind node, then pulls awx-ee, postgres, redis and
# ingress-nginx on top - about 10G at peak, most of it under
# /var/lib/docker. The runner image itself already occupies ~60G
# before any of that, and none of these toolchains are used here.
#
# /opt/hostedtoolcache is deliberately NOT removed - setup-python
# installs into it.
run: |
echo "before:"; df -h /
sudo rm -rf /usr/share/dotnet /usr/local/lib/android \
/usr/local/.ghcup /usr/local/share/boost \
/usr/share/swift /opt/hostedtoolcache/CodeQL
echo "after:"; df -h /

- name: Build AWX image
working-directory: awx
run: |
Expand Down Expand Up @@ -286,11 +302,24 @@
AWX_EE_TEST_IMAGE: quay.io/ansible/awx-ee:latest
STORE_DEBUG_OUTPUT: true

- name: Collect awx-operator logs on timeout
# Only run on timeout; normal failures should use molecule's built-in log collection.
if: steps.awx_operator_test.outputs.timed_out == 'true'
- name: Collect awx-operator logs on failure
# Any failure, not just a timeout. A run that dies because the disk
# filled up is not a timeout, so it would otherwise leave no molecule
# log and no artifact at all, which reads like a hang.
if: steps.awx_operator_test.outcome != 'success'
run: |
# Reclaim space FIRST, before creating or writing anything. When
# this step matters most the filesystem is genuinely at 0 bytes,
# and mkdir/the redirects below can fail before a later cleanup
# ever runs — CodeRabbit caught this on the first review.
if [ "$(df -P / | awk 'NR==2 {print $4}')" -lt 1048576 ]; then
echo "under 1G free - reclaiming space so the bundle can be written"
docker image prune -af >/dev/null 2>&1 || true
sudo rm -rf /usr/share/dotnet /usr/local/lib/android >/dev/null 2>&1 || true
fi
mkdir -p "$DEBUG_OUTPUT_DIR"
df -h / > "$DEBUG_OUTPUT_DIR/df.txt" 2>&1 || true
docker system df -v > "$DEBUG_OUTPUT_DIR/docker-df.txt" 2>&1 || true
if command -v kind >/dev/null 2>&1; then
for cluster in $(kind get clusters 2>/dev/null); do
kind export logs "$DEBUG_OUTPUT_DIR/$cluster" --name "$cluster" || true
Expand Down Expand Up @@ -326,7 +355,7 @@
# - devel
steps:
- name: Perform sanity testing
uses: ansible-community/ansible-test-gh-action@release/v1

Check failure on line 358 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=ansible_awx&issues=AaBnfsZn4qzZ8lHzCOUZ&open=AaBnfsZn4qzZ8lHzCOUZ&pullRequest=16640
with:
ansible-core-version: ${{ matrix.ansible }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -396,7 +425,7 @@
- name: Install dependencies for running tests
run: |
python -m pip install -e ./awxkit/
python -m pip install -r awx_collection/requirements.txt

Check warning on line 428 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Using dependencies without locking resolved versions is security-sensitive.

See more on https://sonarcloud.io/project/issues?id=ansible_awx&issues=AaBnfsZn4qzZ8lHzCOUa&open=AaBnfsZn4qzZ8lHzCOUa&pullRequest=16640
hash -r # Rehash to pick up newly installed scripts

- name: Run integration tests
Expand All @@ -418,7 +447,7 @@
if: >-
!cancelled()
&& steps.make-run.outputs.cov-report-files != ''
uses: codecov/codecov-action@v4

Check failure on line 450 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=ansible_awx&issues=AaBnfsZn4qzZ8lHzCOUb&open=AaBnfsZn4qzZ8lHzCOUb&pullRequest=16640
with:
fail_ci_if_error: >-
${{
Expand Down Expand Up @@ -471,7 +500,7 @@
python -m pip uninstall -y ansible ansible-core || true

- name: Upgrade ansible-core
run: python -m pip install --upgrade ansible-core

Check warning on line 503 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Using dependencies without locking resolved versions is security-sensitive.

See more on https://sonarcloud.io/project/issues?id=ansible_awx&issues=AaBnfsZn4qzZ8lHzCOUc&open=AaBnfsZn4qzZ8lHzCOUc&pullRequest=16640

- name: Download coverage artifacts
uses: actions/download-artifact@v4
Expand Down
Loading