我的存盤庫中存盤了 python 腳本,我正在嘗試創建管道來運行它。我不知道如何提供存盤它的 repo 的正確路徑。我收到no such file or directory, stat '/home/vsts/work/1/s/vg/main.py'
回購: vg
yaml:
steps:
- task: PythonScript@0
inputs:
scriptSource: 'filePath' # Options: filePath, inline
scriptPath: $(Build.SourcesDirectory)/vg/main.py # Required when scriptSource == filePath
#script: # Required when scriptSource == inline
arguments: $(file_path) $(pat) $(organization) $(project) $(vg_name)
#pythonInterpreter: # Optional
#workingDirectory: # Optional
#failOnStderr: false # Optional
- bash: python $(Build.SourcesDirectory)/vg/main.py
- script: python $(Build.SourcesDirectory)/poc/main.py
uj5u.com熱心網友回復:
如果這是你唯一的倉庫,它會直接下載到源檔案夾,所以你的腳本應該在這里 $(Build.SourcesDirectory)/main.py
請檢查此結帳路徑部分以了解下載源代碼的方式和位置。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/355187.html
標籤:天蓝色 azure-devops 天蓝色管道
