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

Cannot install package from Azure Artifacts #709

Open
cesarcoatl opened this issue May 3, 2023 · 0 comments
Open

Cannot install package from Azure Artifacts #709

cesarcoatl opened this issue May 3, 2023 · 0 comments
Labels

Comments

@cesarcoatl
Copy link

cesarcoatl commented May 3, 2023

Current Behavior

Locally nox does install packages from Azure Artifacts, but when running nox on Azure Pipelines, the task "hangs" as it is expecting me to provide credentials.

Expected Behavior

The package should install without asking for credentials.

Steps To Reproduce

noxfile.py

"""Nox config."""
import nox

BASE_PYTHON = "3.10"
PIP_INDEXES = {
    "PIP_INDEX_URL": "https://company.pkgs.visualstudio.com/Project/_packaging/Company_Project/pypi/simple/",
    "PIP_EXTRA_INDEX_URL": "https://pypi.org/simple/",
}

nox.options.reuse_existing_virtualenvs = True
nox.options.sessions = ["test"]
nox.options.stop_on_first_error = True


@nox.session(python=BASE_PYTHON, venv_params=["--system-site-packages"])
def test(session: nox.Session) -> None:
    """Run type check on code base."""
    session.install(private-package, env=PIP_INDEXES)

azure-pipelines.yaml

      - task: PipAuthenticate@1
        inputs:
          artifactFeeds: "Project/Company_Project"

      - script: |
          nox
        displayName: Run tests

Output:

nox > Running session test
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/test
nox > python -m pip install private-package
nox > Command python -m pip install private-package failed with exit code 2:
Looking in indexes: https://company.pkgs.visualstudio.com/Project/_packaging/Company_Project/pypi/simple/, https://pypi.org/simple/
User for company.pkgs.visualstudio.com:

Environment

- OS: Ubuntu 20.04
- Python: 3.10.11
- Nox: 2023.4.22

Anything else?

It works in tox.

@cesarcoatl cesarcoatl added the bug label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant