Skip to content

Commit

Permalink
Switch collection testing over to oci-env.
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Mar 27, 2024
1 parent 8326785 commit 85e8455
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/ci_automation_hub_collection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,30 @@ jobs:
ansible-galaxy collection build -vvv
ansible-galaxy collection install galaxy-galaxy-1.0.0.tar.gz -vvv

- name: Spin up a standalone galaxy_ng installation
#- name: Spin up a standalone galaxy_ng installation
# run: |
# echo "COMPOSE_PROFILE=standalone" > .compose.env
# echo "DEV_SOURCE_PATH=galaxy_ng" >> .compose.env
# make docker/all
# ./compose up -d
# pip3 install --upgrade requests pyyaml
# python3 dev/common/poll.py

- name: set env vars
run: |
echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV
echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV
echo "OCI_VERBOSE=1" >> $GITHUB_ENV
echo "GH_DUMP_LOGS=0" >> $GITHUB_ENV

- name: setup oci-env
run: |
echo "COMPOSE_PROFILE=standalone" > .compose.env
echo "DEV_SOURCE_PATH=galaxy_ng" >> .compose.env
make docker/all
./compose up -d
pip3 install --upgrade requests pyyaml
python3 dev/common/poll.py
git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH
pip install -e $OCI_ENV_PATH/client/
mkdir $OCI_ENV_PATH/db_backup/

- name: run the standalone stack detached
run: OCI_COMPOSE_DETACH=1 make oci/standalone

- name: Test the user playbook
run: ansible-playbook dev/galaxy_collection_plays/user.yml -vvv
Expand Down
4 changes: 2 additions & 2 deletions dev/galaxy_collection_plays/vars.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ah_host: http://localhost:5001
ah_host: http://localhost:55001
ah_username: iqe_admin
ah_password: redhat
ah_path_prefix: automation-hub
ah_path_prefix: galaxy
ah_artifact_runner_absolute_path: /home/runner/work/galaxy_ng/galaxy_ng/galaxy_collection/galaxy-galaxy-1.0.0.tar.gz
9 changes: 8 additions & 1 deletion dev/oci_start
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ echo "USING PROFILE ${profile}"
OCI_ENV_PATH=$(dirname $(pip show oci-env | egrep ^Location | awk '{print $2}'))
echo "FOUND OCI_ENV_PATH: ${OCI_ENV_PATH}"


if [[ -n $OCI_COMPOSE_DETACH ]]; then
DETACH_ARGS="--detach"
else
DETACH_ARGS=""
fi

export COMPOSE_INTERACTIVE_NO_CLI=1
env_path=dev/oci_env_integration/oci_env_configs/$profile.compose.env
oci-env -e ${env_path} compose build --progress=plain
oci-env -e ${env_path} compose up
oci-env -e ${env_path} compose up ${DETACH_ARGS}

0 comments on commit 85e8455

Please sign in to comment.