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

Credentials from env #1463

Merged
merged 3 commits into from
Jan 8, 2024
Merged

Credentials from env #1463

merged 3 commits into from
Jan 8, 2024

Conversation

dmach
Copy link
Contributor

@dmach dmach commented Jan 4, 2024

No description provided.

@pep8speaks
Copy link

pep8speaks commented Jan 4, 2024

Hello @dmach! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1881:121: E501 line too long (137 > 120 characters)
Line 1903:121: E501 line too long (137 > 120 characters)
Line 1982:121: E501 line too long (124 > 120 characters)

Comment last updated at 2024-01-08 14:21:58 UTC

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (a0a7865) 31.07% compared to head (82216c7) 31.25%.
Report is 1 commits behind head on master.

Files Patch % Lines
osc/conf.py 81.53% 12 Missing ⚠️
osc/credentials.py 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1463      +/-   ##
==========================================
+ Coverage   31.07%   31.25%   +0.18%     
==========================================
  Files          49       49              
  Lines       17779    17820      +41     
==========================================
+ Hits         5524     5570      +46     
+ Misses      12255    12250       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@AvengerMoJo AvengerMoJo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this patch in https://src.opensuse.org/alexlau/bash-custom-action/actions/runs/9 container and it is working. Thanks

dmach added 3 commits January 8, 2024 15:21
Options for apiurls can be set via OSC_HOST_<ALIAS>_<OPTION>=...
This requires a configured alias in the config file.

Setting the default apiurl via OSC_APIURL=... was working already.
Also OSC_CONFIG= / --config= was already implemented to skip loading configuration entirely.

Options for the default apiurl can be now set via:
  OSC_USERNAME=...
  OSC_CREDENTIALS_MGR_CLASS=...
  OSC_PASSWORD=...

This, for example, makes running osc in containers with
credentials stored in environmental variables possible:
OSC_CONFIG= OSC_APIURL=<url> OSC_USERNAME=<user> OSC_PASSWORD=<password> osc ...
@dmach dmach force-pushed the credentials-from-env branch from 41b968b to 82216c7 Compare January 8, 2024 14:21
@dmach dmach marked this pull request as ready for review January 8, 2024 14:22
@dmach dmach merged commit 2408417 into openSUSE:master Jan 8, 2024
34 of 35 checks passed
@dmach dmach linked an issue Jan 8, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Take environment variable for username and password for the initial run
3 participants