Skip to content

Commit e4ae76a

Browse files
committed
Add CI workflow to test galaxy_collection against the dab_jwt profile
No-Issue
1 parent d76895a commit e4ae76a

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
name: Galaxy Collection CI - dab_jwt
3+
on:
4+
pull_request:
5+
branches:
6+
- "*"
7+
paths-ignore:
8+
- "CHANGES/**"
9+
- "docs/**"
10+
- "mkdocs.yml"
11+
push:
12+
branches:
13+
- "*"
14+
workflow_dispatch:
15+
16+
jobs:
17+
galaxy_collection:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout galaxy_ng
21+
uses: actions/checkout@v4
22+
23+
- name: Setup python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: "3.11"
27+
28+
- name: install ansible
29+
run: pip3 install ansible
30+
31+
- name: Checkout the galaxy collection
32+
uses: actions/checkout@v4
33+
with:
34+
repository: ansible/galaxy_collection
35+
path: galaxy_collection
36+
37+
- name: Build and install the collection
38+
working-directory: galaxy_collection
39+
run: |
40+
# The ansible.cfg defined in the collection repository might break the test. We want the same variables for installation and running.
41+
rm -f ansible.cfg
42+
rm -f galaxy.yml
43+
mv .github/files/galaxy.yml.j2 .
44+
ansible all -i localhost, -c local -m template -a "src=galaxy.yml.j2 dest=galaxy.yml" -e collection_namespace=galaxy -e collection_name=galaxy -e collection_version=1.0.0 -e collection_repo=https://github.com/ansible/automation_hub_collection
45+
ansible-galaxy collection build -vvv
46+
ansible-galaxy collection install galaxy-galaxy-1.0.0.tar.gz -vvv
47+
48+
#- name: Spin up a standalone galaxy_ng installation
49+
# run: |
50+
# echo "COMPOSE_PROFILE=standalone" > .compose.env
51+
# echo "DEV_SOURCE_PATH=galaxy_ng" >> .compose.env
52+
# make docker/all
53+
# ./compose up -d
54+
# pip3 install --upgrade requests pyyaml
55+
# python3 dev/common/poll.py
56+
57+
- name: set env vars
58+
run: |
59+
echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV
60+
echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV
61+
echo "OCI_VERBOSE=1" >> $GITHUB_ENV
62+
echo "GH_DUMP_LOGS=0" >> $GITHUB_ENV
63+
64+
- name: setup oci-env
65+
run: |
66+
git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH
67+
pip install -e $OCI_ENV_PATH/client/
68+
mkdir $OCI_ENV_PATH/db_backup/
69+
70+
- name: run the dab_jwt stack detached
71+
run: OCI_COMPOSE_DETACH=1 make oci/dab_jwt
72+
73+
- name: wait for the system to start
74+
run: make oci/dab_jwt/poll
75+
76+
- name: create the test users+data
77+
run: docker exec -t ci-dab-proxy_pulp_1 bash -c 'cd /src/galaxy_ng; django-admin shell < ./dev/common/setup_test_data.py'
78+
79+
- name: make messages
80+
run: docker exec -t ci-dab-proxy_pulp_1 bash -c 'cd /src/galaxy_ng/galaxy_ng; django-admin makemessages --all'
81+
82+
- name: Test the user playbook
83+
run: ansible-playbook dev/galaxy_collection_plays/user.yml -vvv
84+
85+
- name: Test the content playbook
86+
run: ansible-playbook dev/galaxy_collection_plays/content.yml -vvv
87+
88+
- name: Test the repo playbook
89+
run: ansible-playbook dev/galaxy_collection_plays/repo.yml -vvv
90+
91+
- name: Test the ee playbook
92+
run: ansible-playbook dev/galaxy_collection_plays/ee.yml -vvv

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ oci/standalone:
294294
oci/standalone/poll:
295295
dev/oci_poll standalone
296296

297+
.PHONY: oci/dab_jwt/poll
298+
oci/dab_jwt/poll:
299+
dev/oci_poll dab_jwt
300+
297301
.PHONY: oci/insights
298302
oci/insights:
299303
dev/oci_start insights

0 commit comments

Comments
 (0)