forked from redhat-cop/infra.controller_configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (78 loc) · 3.19 KB
/
ci_standalone_versioned.yml
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
90
91
92
93
94
95
96
97
---
name: Test collection with AWX
on:
push:
branches:
- main
# on:
# workflow_call:
# inputs:
# awx_version:
# description: The version to pull of awx
# required: true
# type: string
# gh_ref:
# description: The ref in the repository to pull
# required: false
# default: devel
# type: string
env:
# Run docker-compose up in the background
COMPOSE_UP_OPTS: -d
jobs:
integration:
runs-on: ubuntu-latest
continue-on-error: ${{ inputs.awx_version == 'devel' }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ inputs.gh_ref }}
- name: Checkout AWX
uses: actions/checkout@v2
with:
repository: ansible/awx
path: awx
ref: ${{ inputs.awx_version }}
- uses: actions/setup-python@v4
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@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 }}
...