Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin dab to a tag by default. Allow environment variable override for the branch. #2180

Merged
merged 3 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions profiles/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
FROM localhost/oci_env/pulp:base

# Define the build argument
ARG DJANGO_ANSIBLE_BASE_BRANCH=2024.6.11

# Set the environment variable based on the build argument
ENV DJANGO_ANSIBLE_BASE_BRANCH=${DJANGO_ANSIBLE_BASE_BRANCH}

RUN echo "fastestmirror=1" >> /etc/dnf/dnf.conf

COPY . /opt/galaxy_ng/
Expand Down
4 changes: 2 additions & 2 deletions profiles/base/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ services:
extra_hosts:
localhost: "host-gateway"
environment:
- PULP_WORKERS=1
#- LOCK_REQUIREMENTS=0
PULP_WORKERS: "1"
#LOCK_REQUIREMENTS=0
volumes:
- "pulp_certs:/etc/pulp/certs/"
depends_on:
Expand Down
20 changes: 20 additions & 0 deletions profiles/dab/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
version: "3.7"

services:

# pre installs all of the python dependencies, including for integration tests
_galaxy_base:
build:
args:
DJANGO_ANSIBLE_BASE_BRANCH: "devel"
environment:
DJANGO_ANSIBLE_BASE_BRANCH: "devel"

pulp:
environment:
PULP_WORKERS: "1"
DJANGO_ANSIBLE_BASE_BRANCH: "devel"

volumes:
pulp_certs:
24 changes: 16 additions & 8 deletions profiles/dab_jwt/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
---
version: "3.7"

services:
jwtproxy:

# pre installs all of the python dependencies, including for integration tests
_galaxy_base:
build:
context: "{SRC_DIR}/galaxy_ng/profiles/dab_jwt/proxy"
ports:
- "{JWT_PROXY_PORT}:{JWT_PROXY_PORT}"
args:
DJANGO_ANSIBLE_BASE_BRANCH: "devel"
environment:
UPSTREAM_URL: "http://pulp:{API_PORT}"
PROXY_PORT: "{JWT_PROXY_PORT}"
volumes:
- "{SRC_DIR}/galaxy_ng/profiles/dab_jwt/proxy:/app:rw"
DJANGO_ANSIBLE_BASE_BRANCH: "devel"

pulp:
environment:
PULP_WORKERS: "1"
DJANGO_ANSIBLE_BASE_BRANCH: "devel"

volumes:
pulp_certs:
4 changes: 2 additions & 2 deletions requirements/requirements.common.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements/requirements.common.txt setup.py
Expand Down Expand Up @@ -104,7 +104,7 @@ django==4.2.11
# insights-analytics-collector
# pulpcore
# social-auth-app-django
django-ansible-base[jwt_consumer] @ git+https://github.com/ansible/django-ansible-base@devel
django-ansible-base[jwt-consumer] @ git+https://github.com/ansible/django-ansible-base@2024.6.11
# via galaxy-ng (setup.py)
django-auth-ldap==4.0.0
# via galaxy-ng (setup.py)
Expand Down
4 changes: 2 additions & 2 deletions requirements/requirements.insights.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements/requirements.insights.txt requirements/requirements.insights.in setup.py
Expand Down Expand Up @@ -118,7 +118,7 @@ django==4.2.11
# insights-analytics-collector
# pulpcore
# social-auth-app-django
django-ansible-base[jwt_consumer] @ git+https://github.com/ansible/django-ansible-base@devel
django-ansible-base[jwt-consumer] @ git+https://github.com/ansible/django-ansible-base@2024.6.11
# via galaxy-ng (setup.py)
django-auth-ldap==4.0.0
# via galaxy-ng (setup.py)
Expand Down
4 changes: 2 additions & 2 deletions requirements/requirements.standalone.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements/requirements.standalone.txt requirements/requirements.standalone.in setup.py
Expand Down Expand Up @@ -104,7 +104,7 @@ django==4.2.11
# insights-analytics-collector
# pulpcore
# social-auth-app-django
django-ansible-base[jwt_consumer] @ git+https://github.com/ansible/django-ansible-base@devel
django-ansible-base[jwt-consumer] @ git+https://github.com/ansible/django-ansible-base@2024.6.11
# via galaxy-ng (setup.py)
django-auth-ldap==4.0.0
# via galaxy-ng (setup.py)
Expand Down
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ def _format_pulp_requirement(plugin, specifier=None, ref=None, gh_namespace="pul
)


django_ansible_base_branch = os.getenv('DJANGO_ANSIBLE_BASE_BRANCH', '2024.6.11')
django_ansible_base_dependency = (
'django-ansible-base[jwt_consumer] @ '
f'git+https://github.com/ansible/django-ansible-base@{django_ansible_base_branch}'
)

requirements = [
"galaxy-importer>=0.4.21,<0.5.0",
"pulpcore>=3.49.0,<3.50.0",
Expand All @@ -124,7 +130,7 @@ def _format_pulp_requirement(plugin, specifier=None, ref=None, gh_namespace="pul
"insights_analytics_collector>=0.3.0",
"boto3",
"distro",
"django-ansible-base[jwt_consumer] @ git+https://github.com/ansible/django-ansible-base@devel", # noqa 501
django_ansible_base_dependency, # noqa 501
"django-crum==0.7.9",
# From vendored automated_logging
"marshmallow<4.0.0,>=3.6.1",
Expand Down Expand Up @@ -153,8 +159,9 @@ def strip_package_name(spec):
ref: https://github.com/ansible/galaxy_ng/wiki/Development-Setup
#steps-to-run-dev-environment-with-specific-upstream-branch
"""
DEFAULT = "pulpcore:pulp_ansible:pulp_container:galaxy_importer:django-ansible-base"
DEV_SOURCE_PATH = os.getenv(
"DEV_SOURCE_PATH", default="pulpcore:pulp_ansible:pulp_container:galaxy_importer"
"DEV_SOURCE_PATH", default=DEFAULT
).split(":")
DEV_SOURCE_PATH += [path.replace("_", "-") for path in DEV_SOURCE_PATH]
requirements = [
Expand Down
Loading