Как устранить сбой задачи UsePythonVersion@0 на локальном агентеLinux

Ответить
Гость
 Как устранить сбой задачи UsePythonVersion@0 на локальном агенте

Сообщение Гость »


Я пытаюсь создать простой конвейер, в котором код приложения Python будет извлекаться из предприятия GitHub и выполняться на самом сервере агента. Здесь я использую

Код: Выделить всё

Self hosted agent
на виртуальной машине Linux.

Код: Выделить всё

trigger:
branches:
include:
- master
- refs/tags/*
- feature*

stages:
- stage: Deploy
condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/tags'), startsWith(variables['Build.SourceBranch'], 'refs/heads/feature')))
jobs:
- job: 'RunDeploymentCommandJob'
displayName: Deploying job
pool:
name: Ppe-Gear-Price-Agent-Pool
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'  # Use Python 3.x
addToPath: true
- script: |
cd gear-price-publisher
# Install dependencies if needed
pip install -r requirements.txt
# Run the Python code
gunicorn -w 1 -b 0.0.0.0:80 controller:app
displayName: 'Run Python Code'
Пока код успешно извлечен из Github Enterprise,

Код: Выделить всё

UsePythonVersionЗадача 
завершается неудачно из-за следующей ошибки для Gihub:

Код: Выделить всё

##[warning]You should provide GitHub token if you want to download a python release. Otherwise you may hit the GitHub anonymous download limit.
##[error]Failed to download Python from the Github Actions python registry (https://github.com/actions/python-versions). Error: AggregateError
##[error]Version spec 3.6 for architecture x64 did not match any version in Agent.ToolsDirectory.
Could you please suggest on this.
Thanks


Источник: https://stackoverflow.com/questions/781 ... sted-agent
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Linux»