gpt4 book ai didi

azure - 在 DownloadBuildArtifact 任务中找不到下载的工件

转载 作者:行者123 更新时间:2023-12-02 06:07:22 27 4
gpt4 key购买 nike

我创建了一个管道来从另一个管道下载并安装工件。我使用了 DownloadPipelineArtifact 任务。这是我的 yaml:


jobs:
- job: DownloadLeaf
timeoutInMinutes: 180
pool:
vmImage: 'vs2017-win2016'

steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
project: 'Leaf'
pipeline: 'Leaf'
buildVersionToDownload: 'latest'
branchName: 'refs/heads/develop'
downloadType: 'specific'
itemPattern: '**/*.exe'
downloadPath: $(Build.ArtifactStagingDirectory)

- task: CmdLine@2
inputs:
script: |
cd $(Build.ArtifactStagingDirectory)
dir

显然下载成功了,因为使用 dir 命令已在下载的文件夹中识别出工件。

但是,我将下载任务切换为 DownloadBuildArtifact @ 0,因为警告:##[警告]请使用 Download Build Artifact 任务下载 Build Artifact 类型工件。 此后,尽管显示在下载成功的日志中,我无法使用 dir 命令找到该工件。我无法确定我可能做错了什么。我做错了什么吗?

这是我的 DownloadBuildArtifact 任务:

    steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
project: 'Leaf'
pipeline: 'Leaf'
buildVersionToDownload: 'latest'
branchName: 'refs/heads/develop'
downloadType: 'specific'
itemPattern: '**/*.exe'
downloadPath: $(Build.ArtifactStagingDirectory)

- task: CmdLine@2
inputs:
script: |
cd $(Build.ArtifactStagingDirectory)
dir

原始日志:

*2020-10-24T22:25:44.6766419Z ==============================================================================
2020-10-24T22:25:44.6766756Z Task : Download build artifacts
2020-10-24T22:25:44.6767272Z Description : Download files that were saved as artifacts of a completed build
2020-10-24T22:25:44.6767721Z Version : 0.167.2
2020-10-24T22:25:44.6767954Z Author : Microsoft Corporation
2020-10-24T22:25:44.6768343Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/download-build-artifacts
2020-10-24T22:25:44.6768815Z ==============================================================================
2020-10-24T22:25:44.7132255Z ##[debug]Using node path: C:\agents\2.175.2\externals\node\bin\node.exe
2020-10-24T22:25:45.6767362Z ##[debug]agent.TempDirectory=D:\a\_temp
2020-10-24T22:25:45.6799878Z ##[debug]loading inputs and endpoints
2020-10-24T22:25:45.6809455Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2020-10-24T22:25:45.6830354Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2020-10-24T22:25:45.6834904Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2020-10-24T22:25:45.6838469Z ##[debug]loading INPUT_ALLOWPARTIALLYSUCCEEDEDBUILDS
2020-10-24T22:25:45.6841199Z ##[debug]loading INPUT_BRANCHNAME
2020-10-24T22:25:45.6843928Z ##[debug]loading INPUT_BUILDTYPE
2020-10-24T22:25:45.6846813Z ##[debug]loading INPUT_BUILDVERSIONTODOWNLOAD
2020-10-24T22:25:45.6849185Z ##[debug]loading INPUT_DEFINITION
2020-10-24T22:25:45.6851986Z ##[debug]loading INPUT_DOWNLOADPATH
2020-10-24T22:25:45.6854370Z ##[debug]loading INPUT_DOWNLOADTYPE
2020-10-24T22:25:45.6855945Z ##[debug]loading INPUT_ITEMPATTERN
2020-10-24T22:25:45.6859404Z ##[debug]loading INPUT_PARALLELIZATIONLIMIT
2020-10-24T22:25:45.6873519Z ##[debug]loading INPUT_PROJECT
2020-10-24T22:25:45.6876551Z ##[debug]loading INPUT_SPECIFICBUILDWITHTRIGGERING
2020-10-24T22:25:45.6882628Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2020-10-24T22:25:45.6890968Z ##[debug]loaded 15
2020-10-24T22:25:45.6933342Z ##[debug]Agent.ProxyUrl=undefined
2020-10-24T22:25:45.6934438Z ##[debug]Agent.CAInfo=undefined
2020-10-24T22:25:45.6935114Z ##[debug]Agent.ClientCert=undefined
2020-10-24T22:25:45.6935697Z ##[debug]Agent.SkipCertValidation=undefined
2020-10-24T22:25:45.9788900Z ##[debug]check path : D:\a\_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.167.2\node_modules\artifact-engine\lib.json
2020-10-24T22:25:45.9790062Z ##[debug]adding resource file: D:\a\_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.167.2\node_modules\artifact-engine\lib.json
2020-10-24T22:25:45.9790858Z ##[debug]system.culture=en-US
2020-10-24T22:25:46.1254482Z ##[debug]check path : D:\a\_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.167.2\task.json
2020-10-24T22:25:46.1255912Z ##[debug]adding resource file: D:\a\_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.167.2\task.json
2020-10-24T22:25:46.1258030Z ##[debug]system.culture=en-US
2020-10-24T22:25:46.4230574Z ##[debug]buildType=current
2020-10-24T22:25:46.4234210Z ##[debug]specificBuildWithTriggering=false
2020-10-24T22:25:46.4237891Z ##[debug]buildVersionToDownload=latest
2020-10-24T22:25:46.4240323Z ##[debug]allowPartiallySucceededBuilds=false
2020-10-24T22:25:46.4243177Z ##[debug]branchName=refs/heads/develop
2020-10-24T22:25:46.4246085Z ##[debug]downloadPath=D:\a\1\a
2020-10-24T22:25:46.4250041Z ##[debug]downloadType=specific
2020-10-24T22:25:46.4250962Z ##[debug]tags=null
2020-10-24T22:25:46.4253431Z ##[debug]System.TeamFoundationCollectionUri=https://dev.azure.com/isystemsbr/
2020-10-24T22:25:46.4260547Z ##[debug]SYSTEMVSSCONNECTION auth param AccessToken = ***
2020-10-24T22:25:46.4347429Z ##[debug]VSTS_HTTP_RETRY=undefined
2020-10-24T22:25:46.8211875Z ##[debug]System.TeamProjectId=8c3c84b6-802b-4187-a1bb-b75ac9c7d48e
2020-10-24T22:25:46.8212703Z ##[debug]Build.BuildId=265
2020-10-24T22:25:46.8258573Z Downloading artifacts for build: 265
2020-10-24T22:25:46.8262012Z ##[debug]set BuildNumber=265
2020-10-24T22:25:46.8291773Z ##[debug]Processed: ##vso[task.setvariable variable=BuildNumber;issecret=false;]265
2020-10-24T22:25:46.8987923Z Linked artifacts count: 0
2020-10-24T22:25:46.8992590Z Successfully downloaded artifacts to D:\a\1\a
2020-10-24T22:25:46.8994991Z ##[debug]task result: Succeeded
2020-10-24T22:25:46.9008324Z ##[debug]Processed: ##vso[task.complete result=Succeeded;]
2020-10-24T22:25:46.9143509Z ##[section]Finishing: DownloadBuildArtifacts
2020-10-24T22:25:46.9183934Z ##[debug]Evaluating condition for step: 'CmdLine'
2020-10-24T22:25:46.9186164Z ##[debug]Evaluating: SucceededNode()
2020-10-24T22:25:46.9187490Z ##[debug]Evaluating SucceededNode:
2020-10-24T22:25:46.9188768Z ##[debug]=> True
2020-10-24T22:25:46.9189395Z ##[debug]Result: True
2020-10-24T22:25:46.9189994Z ##[section]Starting: CmdLine
2020-10-24T22:25:46.9610741Z ==============================================================================
2020-10-24T22:25:46.9611091Z Task : Command line
2020-10-24T22:25:46.9611430Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2020-10-24T22:25:46.9611980Z Version : 2.177.1
2020-10-24T22:25:46.9612217Z Author : Microsoft Corporation
2020-10-24T22:25:46.9612579Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2020-10-24T22:25:46.9612967Z ==============================================================================
2020-10-24T22:25:48.2360119Z ##[debug]VstsTaskSdk 0.9.0 commit 6c48b16164b9a1c9548776ad2062dad5cd543352
2020-10-24T22:25:48.4556832Z ##[debug]Entering D:\a\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.177.1\cmdline.ps1.
2020-10-24T22:25:48.4707161Z ##[debug]Loading resource strings from: D:\a\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.177.1\task.json
2020-10-24T22:25:48.5034641Z ##[debug]Loaded 6 strings.
2020-10-24T22:25:48.5099803Z ##[debug]SYSTEM_CULTURE: 'en-US'
2020-10-24T22:25:48.5132208Z ##[debug]Loading resource strings from: D:\a\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.177.1\Strings\resources.resjson\en-US\resources.resjson
2020-10-24T22:25:48.5393625Z ##[debug]Loaded 6 strings.
2020-10-24T22:25:48.5873858Z ##[debug]INPUT_FAILONSTDERR: 'false'
2020-10-24T22:25:48.5923127Z ##[debug] Converted to bool: False
2020-10-24T22:25:48.5982469Z ##[debug]INPUT_SCRIPT: 'cd D:\a\1\a
2020-10-24T22:25:48.6062147Z ##[debug]dir'
2020-10-24T22:25:48.6109157Z ##[debug]INPUT_WORKINGDIRECTORY: 'D:\a\1\s'
2020-10-24T22:25:48.6346759Z ##[debug]Asserting container path exists: 'D:\a\1\s'
2020-10-24T22:25:48.6430456Z Generating script.
2020-10-24T22:25:48.6693519Z ##[debug]AGENT_VERSION: '2.175.2'
2020-10-24T22:25:48.6827782Z ##[debug]AGENT_TEMPDIRECTORY: 'D:\a\_temp'
2020-10-24T22:25:48.6866567Z ##[debug]Asserting container path exists: 'D:\a\_temp'
2020-10-24T22:25:48.7195168Z ##[debug]Asserting leaf path exists: 'C:\windows\system32\cmd.exe'
2020-10-24T22:25:48.7219612Z ========================== Starting Command Output ===========================
2020-10-24T22:25:48.7415327Z ##[debug]Entering Invoke-VstsTool.
2020-10-24T22:25:48.7529249Z ##[debug] Arguments: '/D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\34a60bd8-2b0b-4817-a73f-9a15c7a05e67.cmd""'
2020-10-24T22:25:48.7616224Z ##[debug] FileName: 'C:\windows\system32\cmd.exe'
2020-10-24T22:25:48.7648172Z ##[debug] WorkingDirectory: 'D:\a\1\s'
2020-10-24T22:25:48.7742359Z ##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\34a60bd8-2b0b-4817-a73f-9a15c7a05e67.cmd""
2020-10-24T22:25:48.7991894Z Volume in drive D is Temp
2020-10-24T22:25:48.7992528Z Volume Serial Number is F090-063D
2020-10-24T22:25:48.7993309Z
2020-10-24T22:25:48.7993950Z Directory of D:\a\1\a
2020-10-24T22:25:48.7994230Z
2020-10-24T22:25:48.7994896Z 10/24/2020 10:24 PM <DIR> .
2020-10-24T22:25:48.7995491Z 10/24/2020 10:24 PM <DIR> ..
2020-10-24T22:25:48.7999544Z 0 File(s) 0 bytes
2020-10-24T22:25:48.8000346Z 2 Dir(s) 11,552,690,176 bytes free
2020-10-24T22:25:48.8061024Z ##[debug]Exit code: 0
2020-10-24T22:25:48.8122555Z ##[debug]Leaving Invoke-VstsTool.
2020-10-24T22:25:48.8169679Z ##[debug]Leaving D:\a\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.177.1\cmdline.ps1.
2020-10-24T22:25:48.8756691Z ##[section]Finishing: CmdLine
2020-10-24T22:25:48.8903823Z ##[debug]Evaluating condition for step: 'Checkout core_is/leaf-flowe@leaf/qa to s'
2020-10-24T22:25:48.8909144Z ##[debug]Evaluating: AlwaysNode()
2020-10-24T22:25:48.8910130Z ##[debug]Evaluating AlwaysNode:
2020-10-24T22:25:48.8912646Z ##[debug]=> True
2020-10-24T22:25:48.8913941Z ##[debug]Result: True
2020-10-24T22:25:48.8915107Z ##[section]Starting: Checkout core_is/leaf-flowe@leaf/qa to s
2020-10-24T22:25:48.9124816Z ==============================================================================
2020-10-24T22:25:48.9125153Z Task : Get sources
2020-10-24T22:25:48.9125469Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-10-24T22:25:48.9125797Z Version : 1.0.0
2020-10-24T22:25:48.9126173Z Author : Microsoft
2020-10-24T22:25:48.9127181Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-10-24T22:25:48.9127812Z ==============================================================================
2020-10-24T22:25:49.5279710Z Cleaning any cached credential from repository: core_is/leaf-flowe (Bitbucket)
2020-10-24T22:25:49.5286724Z ##[debug]Repository url=https://bitbucket.org/core_is/leaf-flowe
2020-10-24T22:25:49.5287323Z ##[debug]targetPath=D:\a\1\s
2020-10-24T22:25:49.5403584Z ##[section]Finishing: Checkout core_is/leaf-flowe@leaf/qa to s
2020-10-24T22:25:49.5493692Z ##[section]Starting: Finalize Job
2020-10-24T22:25:49.5536041Z Cleaning up task key
2020-10-24T22:25:49.5537617Z Start cleaning up orphan processes.
2020-10-24T22:25:49.5637572Z ##[section]Finishing: Finalize Job
2020-10-24T22:25:49.5741505Z ##[debug]Starting diagnostic file upload.
2020-10-24T22:25:49.5741821Z ##[debug]Setting up diagnostic log folders.
2020-10-24T22:25:49.5750076Z ##[debug]Creating diagnostic log files folder.
2020-10-24T22:25:49.5751523Z ##[debug]Creating diagnostic log environment file.
2020-10-24T22:25:50.0152319Z ##[debug]Creating capabilities file.
2020-10-24T22:25:50.0262750Z ##[debug]Copying 1 worker diag logs.
2020-10-24T22:25:50.0330190Z ##[debug]Copying 1 agent diag logs.
2020-10-24T22:25:50.0334272Z ##[debug]Zipping diagnostic files.
2020-10-24T22:25:50.0388793Z ##[debug]Uploading diagnostic metadata file.
2020-10-24T22:25:50.0490506Z ##[debug]Diagnostic file upload complete.
2020-10-24T22:25:50.0565102Z ##[section]Finishing: DownloadLeaf*

最佳答案

@安东·西兹科夫,

感谢您的回复,但我的问题是另一个。与 Downloadpipelinertifact@2 不同,DownloadBuildArtifacts@0 任务无法通过输入项目名称和管道来完成:

- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
project: 'Leaf'
pipeline: 'Leaf'
buildVersionToDownload: 'latest'
branchName: 'refs/heads/develop'
downloadType: 'specific'
itemPattern: '**/*.exe'
downloadPath: $(Build.ArtifactStagingDirectory)

一个偶然的机会,我决定通过azure界面创建下载任务,这使得“pipeline”和“project”字段的值改变了它们的值(会是ID吗?)。

无论如何,任务看起来像这样:


- task: DownloadBuildArtifacts@0
inputs:
buildType: 'specific'
project: '8c3c84b6-802b-4187-a1bb-b75ac9c7d48e'
pipeline: '4'
specificBuildWithTriggering: true
buildVersionToDownload: 'latest'
allowPartiallySucceededBuilds: true
downloadType: 'specific'
itemPattern: '**/*.exe'
downloadPath: '$(System.ArtifactsDirectory)'

知道,我可以识别使用 dir 命令下载的工件。

关于azure - 在 DownloadBuildArtifact 任务中找不到下载的工件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64518657/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com