mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 10:40:01 -03:30
* Create a new pytest folder for live system testing with normal services (#15688) * PoC for running dev env tests * Replace in github actions * Move folder to better location * Further streamlining of new test folders * Consolidate fixture, add writeup docs * Use star import * Push the wait-for-job to the conftest Fix misused project cache identifier (#15690) Fix project cache identifiers for new updates Finish test and discover viable solution Add comment on related task code AAP-37989 Tests for exclude list with multiple jobs (#15722) * Tests for exclude list with multiple jobs Create test for using manual & file projects (#15754) * Create test for using a manual project * Chang default project factory to git, remove project files monkeypatch * skip update of factory project * Initial file scaffolding for feature * Fill in galaxy and names * Add README, describe project folders and dependencies Add ee cleanup tests * Adds cleanup tests to the live test. Fix rsyslog permission error in github ubuntu tests from apparmor (#15717) * Add test to detect rsyslog config problems * Get dmesg output * Disable apparmor for rsyslogd Make awx/main/tests/live dramatically faster (#15780) * Make awx/main/tests/live dramatically faster * Add new setting to exclude list * Fix rebase issues * Did not want to backport this
91 lines
2.8 KiB
YAML
91 lines
2.8 KiB
YAML
name: Run AWX docker-compose
|
|
description: Runs AWX with `make docker-compose`
|
|
inputs:
|
|
github-token:
|
|
description: GitHub Token to pass to awx_devel_image
|
|
required: true
|
|
build-ui:
|
|
description: Should the UI be built?
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
private-github-key:
|
|
description: GitHub private key for private repositories
|
|
required: false
|
|
default: ''
|
|
outputs:
|
|
ip:
|
|
description: The IP of the tools_awx_1 container
|
|
value: ${{ steps.data.outputs.ip }}
|
|
admin-token:
|
|
description: OAuth token for admin user
|
|
value: ${{ steps.data.outputs.admin_token }}
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Disable apparmor for rsyslogd, first step
|
|
shell: bash
|
|
run: sudo ln -s /etc/apparmor.d/usr.sbin.rsyslogd /etc/apparmor.d/disable/
|
|
|
|
- name: Disable apparmor for rsyslogd, second step
|
|
shell: bash
|
|
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.rsyslogd
|
|
|
|
- name: Build awx_devel image for running checks
|
|
uses: ./.github/actions/awx_devel_image
|
|
with:
|
|
github-token: ${{ inputs.github-token }}
|
|
private-github-key: ${{ inputs.private-github-key }}
|
|
|
|
- name: Upgrade ansible-core
|
|
shell: bash
|
|
run: python3 -m pip install --upgrade 'ansible-core<2.18.0'
|
|
|
|
- name: Install system deps
|
|
shell: bash
|
|
run: sudo apt-get install -y gettext
|
|
|
|
- name: Start AWX
|
|
shell: bash
|
|
run: |
|
|
DEV_DOCKER_OWNER=${{ github.repository_owner }} \
|
|
COMPOSE_TAG=${{ github.base_ref }} \
|
|
COMPOSE_UP_OPTS="-d" \
|
|
make docker-compose
|
|
|
|
- name: Update default AWX password
|
|
shell: bash
|
|
run: |
|
|
SECONDS=0
|
|
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -k https://localhost:8043/api/v2/ping/)" != "200" ]]; do
|
|
if [[ $SECONDS -gt 600 ]]; then
|
|
echo "Timing out, AWX never came up"
|
|
exit 1
|
|
fi
|
|
echo "Waiting for AWX..."
|
|
sleep 5
|
|
done
|
|
echo "AWX is up, updating the password..."
|
|
docker exec -i tools_awx_1 sh <<-EOSH
|
|
awx-manage update_password --username=admin --password=password
|
|
EOSH
|
|
|
|
- name: Build UI
|
|
# This must be a string comparison in composite actions:
|
|
# https://github.com/actions/runner/issues/2238
|
|
if: ${{ inputs.build-ui == 'true' }}
|
|
shell: bash
|
|
run: |
|
|
docker exec -i tools_awx_1 sh <<-EOSH
|
|
make ui-devel
|
|
EOSH
|
|
|
|
- name: Get instance data
|
|
id: data
|
|
shell: bash
|
|
run: |
|
|
AWX_IP=$(docker inspect -f '{{.NetworkSettings.Networks.awx.IPAddress}}' tools_awx_1)
|
|
ADMIN_TOKEN=$(docker exec -i tools_awx_1 awx-manage create_oauth2_token --user admin)
|
|
echo "ip=$AWX_IP" >> $GITHUB_OUTPUT
|
|
echo "admin_token=$ADMIN_TOKEN" >> $GITHUB_OUTPUT
|