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

Support environment configuration #50

Open
ericcornelissen opened this issue Nov 17, 2024 · 1 comment
Open

Support environment configuration #50

ericcornelissen opened this issue Nov 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ericcornelissen
Copy link
Owner

Add support to depreman to ingest a configuration object from the environment.

The main use case I envision for this is that a user runs depreman in their CI on a regular schedule for their latest release (with the goal of knowing when a new release is necessary due to a deprecated dependency). But sometimes a deprecated dependency does not warrant a new release, hence you'd want to instruct depreman to ignore it. But in this scenario you can't push a commit with an updated depreman config because then it wouldn't be the release commit anymore. Hence you'd need some alternative way to do this.

For example, with GitHub Actions one could specify the config as a vars variable and provide it to Depreman as an env variable.

@ericcornelissen
Copy link
Owner Author

The following approach is recommended for CI setups for the time being:

# Load the configuration for the GitHub Actions variables
# that can be configured in the repository settings. Use
# 'tee' so that you can see what configuration was used in
# the logs at a later point in time (useful if you make
# changes).
- name: Insert custom configuration
  env:
    NDMRC: ${{ vars.NDMRC }}
  run: echo "${NDMRC}" | tee .ndmrc

# And then just use depreman as usual, e.g.
- name: Audit deprecation warnings
  run: npx depreman --errors-only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant