Я пытаюсь создать простой конвейер, в котором код приложения Python будет извлекаться из предприятия GitHub и выполняться на самом сервере агента. Здесь я использую
Код: Выделить всё
Self hosted agentКод: Выделить всё
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'
Код: Выделить всё
UsePythonVersionЗадача Код: Выделить всё
##[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.
Thanks
Источник: https://stackoverflow.com/questions/781 ... sted-agent
Мобильная версия