diff --git a/conda_smithy/templates/azure-pipelines-win.yml.tmpl b/conda_smithy/templates/azure-pipelines-win.yml.tmpl index d33e3fe37..a7f7cafb5 100644 --- a/conda_smithy/templates/azure-pipelines-win.yml.tmpl +++ b/conda_smithy/templates/azure-pipelines-win.yml.tmpl @@ -16,15 +16,12 @@ jobs: displayName: "Install Chocolatey Package: {{ choco_pkg }}" {% endfor %} - - task: PythonScript@0 - displayName: 'Download Miniforge' - inputs: - scriptSource: inline - script: | - import urllib.request - url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe' - path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" - urllib.request.urlretrieve(url, path) + - powershell: | + Invoke-WebRequest $env:MINIFORGE_URL -OutFile $env:MINIFORGE_PATH + displayName: "Download Miniforge" + env: + MINIFORGE_URL: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe + MINIFORGE_PATH: $(Build.ArtifactStagingDirectory)/Miniforge.exe - script: | start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge diff --git a/news/azure_win_download_miniforge_powershell.rst b/news/azure_win_download_miniforge_powershell.rst new file mode 100644 index 000000000..2c8118cf1 --- /dev/null +++ b/news/azure_win_download_miniforge_powershell.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Switch to using PowerShell to download Miniforge + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*