-
Notifications
You must be signed in to change notification settings - Fork 23
89 lines (69 loc) · 3.23 KB
/
Copy pathci_standalone_versioned.yml
File metadata and controls
89 lines (69 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
name: Test collection with AWX
on:
workflow_call:
inputs:
awx_version:
description: The version of AWX to pull
required: true
type: string
env:
# Run docker-compose up in the background
COMPOSE_UP_OPTS: -d
permissions:
contents: read
jobs:
integration:
runs-on: ubuntu-latest
continue-on-error: ${{ inputs.awx_version == 'devel' }}
steps:
# Implicit ref: same commit as the caller workflow (avoids untrusted PR checkout)
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Checkout AWX
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
repository: ansible/awx
path: awx
ref: ${{ inputs.awx_version }}
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
- name: Update apt
run: sudo apt -y update
- name: Install requirements
run: sudo apt-get install -y libsasl2-dev python3-dev libldap2-dev libssl-dev build-essential
- name: Install docker-compose
run: pip3 install --upgrade docker-compose docker==6.1.3 pyyaml==5.3.1 requests==2.31.0
- name: collect system info
run: whoami; id; pwd; ls -al; uname -a ; df -h .; mount ; cat /etc/issue; docker --version ; ps aux | fgrep -i docker; ls -al /var/run/containerd/containerd.sock
- name: set the awx password in the inventory
run: echo "admin_password='password'" >> awx/tools/docker-compose/inventory
- name: Find and replace dependency
run: sed -i 's,rsyslog-8.2102.0-106.el9 ,https://download.copr.fedorainfracloud.org/results/ansible/Rsyslog/epel-9-x86_64/06076718-rsyslog/rsyslog-8.2102.0-106.el9.x86_64.rpm ,' tools/ansible/roles/dockerfile/templates/Dockerfile.j2
working-directory: awx
- name: build images
working-directory: awx
run: make docker-compose-build
- name: build stack
working-directory: awx
run: make docker-compose up
continue-on-error: true
- name: give some time to spin up
run: sleep 30
- name: Move ansible.cfg to root
run: mv .github/files/ansible.cfg .
- name: Display Versions
run: which python && pip --version && ansible --version
- name: Build and install the collection
uses: redhat-cop/ansible_collections_tooling/actions/build_ansible_collection@634342818b5d5fa2fa92b2c68c78a2bbe8aa4f10 # main
with:
collection_namespace: infra
collection_name: controller_configuration
collection_version: 2.0.0
collection_repo: https://github.com/redhat-cop/infra.controller_configuration/
- name: "Install Galaxy dependencies"
run: ansible-galaxy collection install -r .github/collections/requirements.yml
- name: "Perform playbook tests"
run: ansible-playbook tests/configure_controller.yml -e controller_hostname=localhost:8043 -v -e awx_version=${{ inputs.awx_version }}
- name: "Perform export model playbook tests"
run: ansible-playbook tests/configure_controller_export_model.yml -e controller_hostname=localhost:8043 -v -e awx_version=${{ inputs.awx_version }}