diff --git a/tools/ci_build/github/azure-pipelines/templates/setup-build-tools.yml b/tools/ci_build/github/azure-pipelines/templates/setup-build-tools.yml index 2cd51eb9f5bb2..436b98d3a3191 100644 --- a/tools/ci_build/github/azure-pipelines/templates/setup-build-tools.yml +++ b/tools/ci_build/github/azure-pipelines/templates/setup-build-tools.yml @@ -31,11 +31,18 @@ steps: displayName: 'Display Node.js Version' - script: | - python3 -m pip install requests + python3 -m pip install requests truststore displayName: 'Install Python requests package' -- task: PythonScript@0 - displayName: 'Run GitHub Action via Python Wrapper' - inputs: - scriptPath: 'tools/ci_build/run_gh_action.py' - arguments: '${{ parameters.action_version }}' +- powershell: | + Write-Host "Process: $env:NO_PROXY" + Write-Host "User: $([Environment]::GetEnvironmentVariable('NO_PROXY', 'User'))" + Write-Host "Machine: $([Environment]::GetEnvironmentVariable('NO_PROXY', 'Machine'))" + displayName: Inspect proxy environment + +- powershell: | + $env:NO_PROXY = (($env:NO_PROXY -split ',') | + Where-Object { $_ -ne '::1' -and $_ -notmatch '/' }) -join ',' + + python tools/ci_build/run_gh_action.py ${{ parameters.action_version }} + displayName: Run GitHub Action via Python Wrapper diff --git a/tools/ci_build/run_gh_action.py b/tools/ci_build/run_gh_action.py index 52c71311f0ec8..37dfe6e3a471c 100644 --- a/tools/ci_build/run_gh_action.py +++ b/tools/ci_build/run_gh_action.py @@ -7,6 +7,9 @@ from pathlib import Path import requests +import truststore + +truststore.inject_into_ssl() SCRIPT_DIR = Path(__file__).resolve().parent REPO_DIR = (SCRIPT_DIR / ".." / "..").resolve()