diff --git a/.github/workflows/ci-docker-compose-integration.yml b/.github/workflows/ci-docker-compose-integration.yml index ea1c6de19..483a25d75 100644 --- a/.github/workflows/ci-docker-compose-integration.yml +++ b/.github/workflows/ci-docker-compose-integration.yml @@ -4,9 +4,9 @@ on: pull_request: branches: - '**' -# push: -# branches: -# - '**' + push: + branches: + - '**' workflow_dispatch: jobs: @@ -49,14 +49,6 @@ jobs: run: | sudo apt-get install -y libsasl2-dev python-dev-is-python3 libldap2-dev libssl-dev podman -# - name: verify podman -# run: | -# podman --version - -# - run: podman --help -# -# - run: podman pull alpine - - name: Spin up dev/compose/${{ matrix.env.TEST_PROFILE }}.yaml run: | docker compose -f dev/compose/${{ matrix.env.TEST_PROFILE }}.yaml up --detach @@ -81,12 +73,10 @@ jobs: fi done - - run: podman login localhost:5001 -u admin -p admin --tls-verify=False + - name: Install integration requirements + run: | + pip install -r integration_requirements.txt -# - name: Install integration requirements -# run: | -# pip install -r integration_requirements.txt -# -# - name: Run integration tests -# run: | -# pytest -v -r sx --color=yes -m '${{ env.HUB_TEST_MARKS }}' galaxy_ng/tests/integration \ No newline at end of file + - name: Run integration tests + run: | + pytest -v -r sx --color=yes -m '${{ env.HUB_TEST_MARKS }}' galaxy_ng/tests/integration \ No newline at end of file diff --git a/.github/workflows/ci_automation_hub_collection.yml b/.github/workflows/ci_automation_hub_collection.yml index 1b711cb71..5bc5cda8c 100644 --- a/.github/workflows/ci_automation_hub_collection.yml +++ b/.github/workflows/ci_automation_hub_collection.yml @@ -1,16 +1,16 @@ --- name: Galaxy Collection CI on: -# pull_request: -# branches: -# - "*" -# paths-ignore: -# - "CHANGES/**" -# - "docs/**" -# - "mkdocs.yml" -# push: -# branches: -# - "*" + pull_request: + branches: + - "*" + paths-ignore: + - "CHANGES/**" + - "docs/**" + - "mkdocs.yml" + push: + branches: + - "*" workflow_dispatch: jobs: diff --git a/.github/workflows/ci_full.yml b/.github/workflows/ci_full.yml index c6d30db82..f59f9973a 100644 --- a/.github/workflows/ci_full.yml +++ b/.github/workflows/ci_full.yml @@ -1,9 +1,8 @@ --- name: galaxy_ng/ci on: - workflow_dispatch: -# - push -# - pull_request + - push + - pull_request jobs: diff --git a/.github/workflows/ci_oci-env-integration.yml b/.github/workflows/ci_oci-env-integration.yml index f44460f10..08e37ce1b 100644 --- a/.github/workflows/ci_oci-env-integration.yml +++ b/.github/workflows/ci_oci-env-integration.yml @@ -1,12 +1,12 @@ --- name: OCI Env Integration on: -# pull_request: -# branches: -# - '**' -# push: -# branches: -# - '**' + pull_request: + branches: + - '**' + push: + branches: + - '**' workflow_dispatch: jobs: diff --git a/.github/workflows/sonar-pr.yaml b/.github/workflows/sonar-pr.yaml index a4bf05c26..352d3219d 100644 --- a/.github/workflows/sonar-pr.yaml +++ b/.github/workflows/sonar-pr.yaml @@ -4,10 +4,10 @@ name: SonarCloud on: workflow_run: -# workflows: -# - galaxy_ng/ci -# types: -# - completed + workflows: + - galaxy_ng/ci + types: + - completed jobs: sonar: name: Upload to SonarCloud diff --git a/dev/compose/standalone.yaml b/dev/compose/standalone.yaml index 07d050d60..1ed10d0fe 100644 --- a/dev/compose/standalone.yaml +++ b/dev/compose/standalone.yaml @@ -32,7 +32,7 @@ x-common-env: &common-env PULP_ANSIBLE_API_HOSTNAME: 'http://localhost:5001' PULP_ANSIBLE_CONTENT_HOSTNAME: "http://localhost:5001" PULP_CONTENT_ORIGIN: "http://localhost:5001" - PULP_CSRF_TRUSTED_ORIGINS: "['https://localhost']" + PULP_CSRF_TRUSTED_ORIGINS: "['http://localhost']" # signing ... PULP_GALAXY_AUTO_SIGN_COLLECTIONS: 'false' @@ -73,6 +73,7 @@ x-common-env: &common-env HUB_API_ROOT: 'http://localhost:5001/api/galaxy/' HUB_TEST_MARKS: deployment_standalone or all HUB_USE_MOVE_ENDPOINT: 'true' + CONTAINER_REGISTRY: 'localhost:5001' # Unpin dependencies on setup.py if set to 0 LOCK_REQUIREMENTS: 0 @@ -82,7 +83,7 @@ x-common-env: &common-env # "dynaconf:pulpcore:galaxy_importer:pulp_ansible:pulp_container:galaxy_ng:django-ansible-base" # This can be done as part of the `docker compose` call: # $ DEV_SOURCE_PATH="pulp_container:galaxy_ng" docker compose -f dev/compose/standalone.yaml up - DEV_SOURCE_PATH: 'galaxy_ng' + DEV_SOURCE_PATH: # allow attaching to the running container x-debugging: &debugging diff --git a/galaxy_ng/tests/integration/api/test_container_push_update.py b/galaxy_ng/tests/integration/api/test_container_push_update.py index 7c857711e..07f8760c7 100644 --- a/galaxy_ng/tests/integration/api/test_container_push_update.py +++ b/galaxy_ng/tests/integration/api/test_container_push_update.py @@ -72,21 +72,19 @@ def test_gw_can_update_container_push(ansible_config, galaxy_client): def test_can_update_container_push(ansible_config, require_auth): config = ansible_config("admin") container_engine = config["container_engine"] - url = config['url'] - parsed_url = urlparse(url) - cont_reg = parsed_url.netloc + container_registry = config["container_registry"] # Pull alpine image - pull_and_tag_test_image(container_engine, cont_reg) + pull_and_tag_test_image(container_engine, container_registry) # Login to local registry with tls verify disabled cmd = [container_engine, "login", "-u", f"{config['username']}", "-p", - f"{config['password']}", f"{config['url'].split(parsed_url.path)[0]}"] + f"{config['password']}", container_registry] if container_engine == "podman": cmd.append("--tls-verify=false") subprocess.check_call(cmd) # Push image to local registry - cmd = [container_engine, "push", f"{cont_reg}/alpine:latest"] + cmd = [container_engine, "push", f"{container_registry}/alpine:latest"] if container_engine == "podman": cmd.append("--tls-verify=false") subprocess.check_call(cmd) diff --git a/galaxy_ng/tests/integration/api/test_container_signing.py b/galaxy_ng/tests/integration/api/test_container_signing.py index d49664a22..41e819d49 100644 --- a/galaxy_ng/tests/integration/api/test_container_signing.py +++ b/galaxy_ng/tests/integration/api/test_container_signing.py @@ -90,24 +90,21 @@ def test_push_and_sign_a_container(ansible_config, flags, require_auth, galaxy_c pytest.skip("GALAXY_CONTAINER_SIGNING_SERVICE is not configured") config = ansible_config("admin") - url = config['url'] - parsed_url = urlparse(url) - cont_reg = parsed_url.netloc - container_engine = config["container_engine"] + container_registry = config["container_registry"] # Pull alpine image - pull_and_tag_test_image(container_engine, cont_reg) + pull_and_tag_test_image(container_engine, container_registry) # Login to local registry with tls verify disabled cmd = [container_engine, "login", "-u", f"{config['username']}", "-p", - f"{config['password']}", f"{config['url'].split(parsed_url.path)[0]}"] + f"{config['password']}", container_registry] if container_engine == 'podman': cmd.append("--tls-verify=false") subprocess.check_call(cmd) # Push image to local registry - cmd = [container_engine, "push", f"{cont_reg}/alpine:latest"] + cmd = [container_engine, "push", f"{container_registry}/alpine:latest"] if container_engine == 'podman': cmd.append("--tls-verify=false") subprocess.check_call(cmd)