From 994872945df7d0b666e5fb1379e5ad788e84dfdf Mon Sep 17 00:00:00 2001 From: Scott Carda Date: Thu, 18 Jun 2026 13:11:55 -0700 Subject: [PATCH] change publish to use AzureArtifacts feed instead of directly PyPi feed --- .ado/publish.yml | 20 ++++++++++++++++++++ azure-quantum/tox.ini | 5 +++++ 2 files changed, 25 insertions(+) diff --git a/.ado/publish.yml b/.ado/publish.yml index 877a807b..5914f451 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -42,6 +42,8 @@ variables: value: none # Disable usage telemetry for internal test pipelines - name: PYTEST_MAX_PARALLEL_TESTS value: "auto" + - name: PipFeed + value: "AzureQuantum/azure-quantum" resources: repositories: @@ -76,6 +78,12 @@ extends: versionSpec: "3.11" displayName: Set Python version + - task: PipAuthenticate@1 + displayName: Authenticate pip to Azure Artifacts feed + inputs: + artifactFeeds: $(PipFeed) + onlyAddExtraIndex: false + - script: | pip install wheel displayName: Install wheel @@ -109,6 +117,12 @@ extends: versionSpec: "3.11" displayName: Set Python version + - task: PipAuthenticate@1 + displayName: Authenticate pip to Azure Artifacts feed + inputs: + artifactFeeds: $(PipFeed) + onlyAddExtraIndex: false + - script: | python -m pip install --upgrade pip pip install pytest pytest-azurepipelines pytest-cov pytest-xdist tox @@ -170,6 +184,12 @@ extends: versionSpec: "3.11" displayName: Set Python version + - task: PipAuthenticate@1 + displayName: Authenticate pip to Azure Artifacts feed + inputs: + artifactFeeds: $(PipFeed) + onlyAddExtraIndex: false + - script: | python $(Pipeline.Workspace)/azure-quantum-wheels/set_version.py env: diff --git a/azure-quantum/tox.ini b/azure-quantum/tox.ini index d1e762cf..f17477b5 100644 --- a/azure-quantum/tox.ini +++ b/azure-quantum/tox.ini @@ -8,6 +8,11 @@ basepython = py311: python3.11 py312: python3.12 py313: python3.13 +# Forward the pip index/auth configured by PipAuthenticate@1 into tox's isolated +# environments so package restores go through the Azure Artifacts feed (CFS policy). +passenv = + PIP_INDEX_URL + PIP_EXTRA_INDEX_URL allowlist_externals = pytest deps = qiskit1: qiskit<2