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

DOC: Environment variables in build command #1355

Open
sbalian opened this issue Dec 19, 2023 · 1 comment
Open

DOC: Environment variables in build command #1355

sbalian opened this issue Dec 19, 2023 · 1 comment
Labels
documentation Triaged as a documentation issue question Triaged as a question, not requiring action after answering

Comments

@sbalian
Copy link

sbalian commented Dec 19, 2023

Is there a way to pass an environment variable to the build command? This is to avoid putting secrets in the JSON config.

For example, USER and PASSWORD in ...

    "build_command": [
        ...
        "python -m poetry config http-basic.private-repo $USER $PASSWORD",
        ...
    ]

Edit: with poetry, I solved my issue using:

export POETRY_HTTP_BASIC_MY_REPOSITORY_USERNAME=user
export POETRY_HTTP_BASIC_MY_REPOSITORY_PASSWORD=secret

This way, there is no need to enter the username and password into the JSON file.

Doc here.

@HaoZeke
Copy link
Member

HaoZeke commented Jan 27, 2024

I would suggest consuming the json, modifying it in-place in python and then streaming it to asv. However, a documentation update regarding this would be most welcome :)

@HaoZeke HaoZeke changed the title Environment variables in build command DOC: Environment variables in build command Jan 27, 2024
@HaoZeke HaoZeke added question Triaged as a question, not requiring action after answering documentation Triaged as a documentation issue labels Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Triaged as a documentation issue question Triaged as a question, not requiring action after answering
Projects
None yet
Development

No branches or pull requests

2 participants