-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add django ansible base * Bump to python 3.9 No-Issue
- Loading branch information
1 parent
bfd6fe1
commit 1b7dbbb
Showing
14 changed files
with
77 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# galaxy_ng/dab | ||
|
||
## Usage | ||
|
||
This profile is used for running Galaxy NG with the JWT authentication integrations provided by django-ansible-base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
galaxy_ng/base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PULP_GALAXY_AUTHENTICATION_CLASSES="['ansible_base.jwt_consumer.hub.auth.HubJWTAuth', 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.BasicAuthentication']" | ||
|
||
PULP_ANSIBLE_BASE_JWT_VALIDATE_CERT=false | ||
PULP_ANSIBLE_BASE_JWT_KEY=https://localhost | ||
PULP_CSRF_TRUSTED_ORIGINS = ['https://localhost'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,8 @@ | |
class PrepareStaticCommand(Command): | ||
DEV_UI_DOWNLOAD_URL = ( | ||
"https://github.com/ansible/ansible-hub-ui/" | ||
"releases/download/dev/automation-hub-ui-dist.tar.gz") | ||
"releases/download/dev/automation-hub-ui-dist.tar.gz" | ||
) | ||
|
||
ALTERNATE_UI_DOWNLOAD_URL = os.environ.get("ALTERNATE_UI_DOWNLOAD_URL") | ||
|
||
|
@@ -31,9 +32,9 @@ class PrepareStaticCommand(Command): | |
|
||
user_options = [ | ||
( | ||
'force-download-ui', | ||
"force-download-ui", | ||
None, | ||
'Replace any existing static files with the ones downloaded from github.' | ||
"Replace any existing static files with the ones downloaded from github.", | ||
), | ||
] | ||
|
||
|
@@ -76,13 +77,13 @@ def _download_tarball(self, url, download_file): | |
|
||
class SDistCommand(_SDistCommand): | ||
def run(self): | ||
self.run_command('prepare_static') | ||
self.run_command("prepare_static") | ||
return super().run() | ||
|
||
|
||
class BuildPyCommand(_BuildPyCommand): | ||
def run(self): | ||
self.run_command('prepare_static') | ||
self.run_command("prepare_static") | ||
return super().run() | ||
|
||
|
||
|
@@ -105,8 +106,7 @@ def _format_pulp_requirement(plugin, specifier=None, ref=None, gh_namespace="pul | |
else: | ||
repo = plugin.replace("-", "_") | ||
return ( | ||
f"{plugin}@git+https://[email protected]/" | ||
f"{gh_namespace}/{repo}.git@{ref}#egg={plugin}" | ||
f"{plugin}@git+https://[email protected]/" f"{gh_namespace}/{repo}.git@{ref}#egg={plugin}" | ||
) | ||
|
||
|
||
|
@@ -124,6 +124,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 | ||
# From vendored automated_logging | ||
"marshmallow<4.0.0,>=3.6.1", | ||
"django-picklefield<4.0.0,>=3.0.1", | ||
|
@@ -133,7 +134,7 @@ def _format_pulp_requirement(plugin, specifier=None, ref=None, gh_namespace="pul | |
|
||
# https://softwareengineering.stackexchange.com/questions/223634/what-is-meant-by-now-you-have-two-problems | ||
def strip_package_name(spec): | ||
operators = ['=', '>', '<', '~', '!', '^', '@'] | ||
operators = ["=", ">", "<", "~", "!", "^", "@"] | ||
for idc, char in enumerate(spec): | ||
if char in operators: | ||
return spec[:idc] | ||
|
@@ -152,13 +153,11 @@ def strip_package_name(spec): | |
#steps-to-run-dev-environment-with-specific-upstream-branch | ||
""" | ||
DEV_SOURCE_PATH = os.getenv( | ||
"DEV_SOURCE_PATH", | ||
default="pulpcore:pulp_ansible:pulp_container:galaxy_importer" | ||
"DEV_SOURCE_PATH", default="pulpcore:pulp_ansible:pulp_container:galaxy_importer" | ||
).split(":") | ||
DEV_SOURCE_PATH += [path.replace("_", "-") for path in DEV_SOURCE_PATH] | ||
requirements = [ | ||
strip_package_name(req) | ||
if req.lower().startswith(tuple(DEV_SOURCE_PATH)) else req | ||
strip_package_name(req) if req.lower().startswith(tuple(DEV_SOURCE_PATH)) else req | ||
for req in requirements | ||
] | ||
print("Installing with unpinned DEV_SOURCE_PATH requirements", requirements) | ||
|
@@ -171,7 +170,7 @@ def strip_package_name(spec): | |
author="Red Hat, Inc.", | ||
author_email="[email protected]", | ||
url="https://github.com/ansible/galaxy_ng/", | ||
python_requires=">=3.8", | ||
python_requires=">=3.9", | ||
setup_requires=["wheel"], | ||
install_requires=requirements, | ||
include_package_data=True, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,7 @@ pulp_settings_s3: null | |
pulpprojectdotorg_key_id: null | ||
pydocstyle: true | ||
pypi_username: null | ||
python_version: '3.8' | ||
python_version: '3.9' | ||
release_email: [email protected] | ||
release_user: ansible | ||
run_pulpcore_tests_for_plugins: false | ||
|