Add PUBTOOLS_PULP3_* env var fallbacks [RHELDST-45461] - #412
crungehottman merged 2 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #412 +/- ##
=======================================
Coverage 99.81% 99.81%
=======================================
Files 56 56
Lines 3224 3228 +4
=======================================
+ Hits 3218 3222 +4
Misses 6 6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
lgtm, though naming of env vars feels a bit generic and theoretically may get mixed up with with another env vars.
I believe adding at least PUBTOOLS_ prefix would be fine.
In another PR for pushsource release-engineering/pushsource#720 we can support both:
- PUSHSOURCE_KONFLUX_PULP_URL
- PUBTOOLS_PULP3_URL
Add environment variable fallbacks for `--pulp3-url` (`PUBTOOLS_PULP3_URL`), `--domain` (`PUBTOOLS_PULP3_DOMAIN`), and `--pulp3-user` (`PUBTOOLS_PULP3_USER`) in `Pulp3ClientService`, and update existing `PULP3_PASSWORD` env var pattern to use a `PUBTOOLS_PULP3_` prefix (as opposed to the generic `PULP3` variant). This allows the Konflux Tekton task to configure Hosted Pulp credentials entirely via env vars. These env vars are also supported by pushsource's KonfluxSource. The pubtools-pulp-push command no longer needs `--pulp3-url`, `--domain`, or `--pulp3-user` CLI args. Though, when provided, CLI args still take precedence over env vars.
f5cdcb6 to
4a724d6
Compare
for more information, see https://pre-commit.ci
+1, agreed. Done! |
Add environment variable fallbacks for
--pulp3-url(PUBTOOLS_PULP3_URL),--domain(PUBTOOLS_PULP3_DOMAIN), and--pulp3-user(PUBTOOLS_PULP3_USER) inPulp3ClientService, and update existingPULP3_PASSWORDenv var pattern to use aPUBTOOLS_PULP3_prefix (as opposed to the genericPULP3variant).This allows the Konflux Tekton task to configure Hosted Pulp credentials entirely via env vars. These env vars are also supported by pushsource's KonfluxSource.
The pubtools-pulp-push command no longer needs
--pulp3-url,--domain, or--pulp3-userCLI args. Though, when provided, CLI args still take precedence over env vars.