mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 07:04:45 -03:30
Merge branch 'devel' into move_to_dispatcherd
This commit is contained in:
48
.github/workflows/ci.yml
vendored
48
.github/workflows/ci.yml
vendored
@@ -207,27 +207,59 @@ jobs:
|
|||||||
|
|
||||||
- name: Run test deployment with awx-operator
|
- name: Run test deployment with awx-operator
|
||||||
working-directory: awx-operator
|
working-directory: awx-operator
|
||||||
|
id: awx_operator_test
|
||||||
|
timeout-minutes: 60
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -r molecule/requirements.txt
|
set +e
|
||||||
python -m pip install PyYAML # for awx/tools/scripts/rewrite-awx-operator-requirements.py
|
timeout 54m bash -elc '
|
||||||
$(realpath ../awx/tools/scripts/rewrite-awx-operator-requirements.py) molecule/requirements.yml $(realpath ../awx)
|
python -m pip install -r molecule/requirements.txt
|
||||||
ansible-galaxy collection install -r molecule/requirements.yml
|
python -m pip install PyYAML # for awx/tools/scripts/rewrite-awx-operator-requirements.py
|
||||||
sudo rm -f $(which kustomize)
|
$(realpath ../awx/tools/scripts/rewrite-awx-operator-requirements.py) molecule/requirements.yml $(realpath ../awx)
|
||||||
make kustomize
|
ansible-galaxy collection install -r molecule/requirements.yml
|
||||||
KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule -v test -s kind -- --skip-tags=replicas
|
sudo rm -f $(which kustomize)
|
||||||
|
make kustomize
|
||||||
|
KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule -v test -s kind -- --skip-tags=replicas
|
||||||
|
'
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -eq 124 ]; then
|
||||||
|
echo "timed_out=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
exit $rc
|
||||||
env:
|
env:
|
||||||
AWX_TEST_IMAGE: local/awx
|
AWX_TEST_IMAGE: local/awx
|
||||||
AWX_TEST_VERSION: ci
|
AWX_TEST_VERSION: ci
|
||||||
AWX_EE_TEST_IMAGE: quay.io/ansible/awx-ee:latest
|
AWX_EE_TEST_IMAGE: quay.io/ansible/awx-ee:latest
|
||||||
STORE_DEBUG_OUTPUT: true
|
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'
|
||||||
|
run: |
|
||||||
|
mkdir -p "$DEBUG_OUTPUT_DIR"
|
||||||
|
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
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if command -v kubectl >/dev/null 2>&1; then
|
||||||
|
kubectl get all -A -o wide > "$DEBUG_OUTPUT_DIR/kubectl-get-all.txt" || true
|
||||||
|
kubectl get pods -A -o wide > "$DEBUG_OUTPUT_DIR/kubectl-get-pods.txt" || true
|
||||||
|
kubectl describe pods -A > "$DEBUG_OUTPUT_DIR/kubectl-describe-pods.txt" || true
|
||||||
|
fi
|
||||||
|
docker ps -a > "$DEBUG_OUTPUT_DIR/docker-ps.txt" || true
|
||||||
|
|
||||||
- name: Upload debug output
|
- name: Upload debug output
|
||||||
if: failure()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: awx-operator-debug-output
|
name: awx-operator-debug-output
|
||||||
path: ${{ env.DEBUG_OUTPUT_DIR }}
|
path: ${{ env.DEBUG_OUTPUT_DIR }}
|
||||||
|
|
||||||
|
- name: Fail awx-operator check if test deployment failed
|
||||||
|
if: steps.awx_operator_test.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
collection-sanity:
|
collection-sanity:
|
||||||
name: awx_collection sanity
|
name: awx_collection sanity
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -93,7 +93,12 @@ def test_random_titles_generates_correct_characters(non_ascii):
|
|||||||
title = utils.random_title(non_ascii=non_ascii)
|
title = utils.random_title(non_ascii=non_ascii)
|
||||||
if non_ascii:
|
if non_ascii:
|
||||||
with pytest.raises(UnicodeEncodeError):
|
with pytest.raises(UnicodeEncodeError):
|
||||||
title.encode('ascii')
|
# There is a tiny (flaky) chance that random_title will just happen
|
||||||
|
# to generate unicode that is also valid ascii
|
||||||
|
# so we repeat a few times, just to be sure we get non-ascii
|
||||||
|
for i in range(4):
|
||||||
|
title = utils.random_title(non_ascii=non_ascii)
|
||||||
|
title.encode('ascii')
|
||||||
title.encode('utf-8')
|
title.encode('utf-8')
|
||||||
else:
|
else:
|
||||||
title.encode('ascii')
|
title.encode('ascii')
|
||||||
|
|||||||
Reference in New Issue
Block a user