Azure DevOps - 在构建管道运行期间,代理在本地下载文件的路径是什么?

2023-12-05

我们正在使用 Microsoft 托管代理来运行应用程序自动化测试场景的构建管道。我们想要实现的是,通过自动化程序下载文件(从无头 Chrome 浏览器),然后导航到下载路径并打开它。

如何找到代理内下载文件的路径?


快速编译与在 Linux 和 Windows 自托管代理上构建的路径相关的预定义变量列表官方文档链接.

您正在寻找的是Agent.BuildDirectory or Pipeline.Workspace.

预定义变量列表:

Variable type Variable Description Example
Agent Agent.BuildDirectory The local path on the agent where all folders for a given build pipeline are created D:\..\agent\_work\1
Agent Agent.HomeDirectory The directory the agent is installed into C:\agent
Agent Agent.TempDirectory A temporary folder that is cleaned after each pipeline job D:\..\agent\_work\_temp
Agent Agent.ToolsDirectory The directory used by tasks such as Node Tool Installer and Use Python Version to switch between multiple versions of a tool D:\..\agent\_work\_tool
Agent Agent.WorkFolder The working directory for agent c:\agent_work
Build Build.SourcesDirectory The local path on the agent where your source code files are downloaded. c:\agent_work\1\s
Build Build.ArtifactStagingDirectory The local path on the agent where any artifacts are copied to before being pushed to their destination. A typical way to use this folder is to publish your build artifacts with the Copy files and Publish build artifacts tasks c:\agent_work\1\a
Build Build.StagingDirectory The local path on the agent where any artifacts are copied to before being pushed to their destination. c:\agent_work\1\a
Build Build.BinariesDirectory The local path on the agent you can use as an output folder for compiled binaries c:\agent_work\1\b
Build Build.Repository.LocalPath The local path on the agent where your source code files are downloaded. c:\agent_work\1\s
Build Common.TestResultsDirectory The local path on the agent where the test results are created. c:\agent_work\1\TestResults
Pipeline Pipeline.Workspace The Workspace directory for a particular pipeline /home/vsts/work/1
System System.DefaultWorkingDirectory The local path on the agent where your source code files are downloaded. c:\agent_work\1\s
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Azure DevOps - 在构建管道运行期间,代理在本地下载文件的路径是什么? 的相关文章

随机推荐

  • 如何在 com 自动化中启动特定的 excel 版本?

    我通过 COM 自动化 在 c 中 使用 Excel 但问题似乎无法控制在盒子上启动哪个版本的 excel 我们同时使用 Excel 9 和 Excel 11 并且一组特定的电子表格需要 excel 9 否则它们不会工作的 我包含了 exc
  • 在 CMakeLIsts.txt 中只编写 target_link_libraries(不指定包含路径)

    我发现当我使用target link libraries在 CMaksList txt 中 我忽略包含路径 target include directories 并成功运行应用程序 例如 cmake minimum required VER
  • 自动删除 Subversion 未版本控制的文件

    有谁知道一种方法来递归删除工作副本中不受版本控制的所有文件 我需要这个才能在自动构建 VMware 中获得更可靠的结果 这在 bash 中对我有用 svn status egrep cut c8 xargs rm 塞斯 雷诺的更好 svn
  • Admob 碎片

    我使用 appcompact 创建了一个空项目 并尝试向其中添加 AdMob 块 片段 main xml
  • 如何从 Sinatra 中的 URL 检测语言

    我有一个多语言网站 我将语言放入 URL 中 例如domain com en 当用户没有将语言放入 URL 中时 我想将他重定向到主要语言的页面 例如 domain com posts 到 domain com en posts 有没有简单
  • 使用 MVVM 在 wpf 中进行对话框的做法是好是坏?

    我最近遇到了为我的 wpf 应用程序创建添加和编辑对话框的问题 我想要在我的代码中做的就是这样的事情 我主要使用视图模型优先方法和 mvvm ViewModel 调用对话框窗口 var result this uiDialogService
  • 警报无法唤醒我的服务

    我有以下代码 我希望无论电话状态如何 此警报都会调用我的服务 即使它处于睡眠模式 我也需要它来访问互联网并进行一些网络调用 为什么手机处于睡眠模式时不起作用 报警管理器 Calendar cal Calendar getInstance c
  • R 聚合错误:“替换有 行,数据有

    我正在尝试聚合数据框 但收到一个我不明白的错误 我有一个名为 M15 的数据框 它包含 33 个变量的 200k 条记录 我无法使用可以与社区共享的数据重现此错误 M15 lt M15backup c 600 700 setting the
  • 添加 Visual Studio 2015 的先决条件

    I want to add new prerequisites to visual studio 2015 but can not find out the solution 如您所见 Visual Studio 2015 缺少先决条件 V
  • swiftui、动画应用于父效果子动画(下)

    上一个问题 swiftui 动画应用于父效果子动画 现在 TextView 有了自己的状态 RectangleView 和 TextView 在 3 秒内滑入屏幕 但 TextView 滑动一秒后状态发生变化 现在可以看到TextView停
  • javafx Bindings.createStringBinding 但绑定实际上不起作用

    我正在尝试绑定textProperty of the Label到对象的SimpleIntegerProperty在 的帮助下Bindings但当我更改时它不会更改文本SimpleIntegerProperty实时显示对象的信息 任何有关如
  • SQL使用unix时间戳计算一个月内的记录

    我试图返回每个月内的记录数 并按月 年对结果进行分组 架构看起来像这样 id title timestamp 我一直在四处寻找 但无法得到我期望的结果 谢谢 设置时间戳的格式 然后按其分组 按月分组 SELECT DATE FORMAT t
  • 保护 Android 应用程序敏感数据的最佳方法?

    是的 这是一个非常普遍的问题 但我试图了解处理与将敏感数据分发到应用程序的网络服务器相关的应用程序的最佳方法 任何链接 一般信息建议等 将不胜感激 由于应用程序会在一定时间内存储从数据库检索到的持久数据 一切都变得有些敏感 在设备上存储敏感
  • 使用 R:创建一个新列,计算“n”个其他列中“n”个条件发生的次数

    我有第 1 列和第 2 列 ID 和值 接下来 我想要一个计数列 列出每个 id 出现相同值的次数 如果发生多次 显然会重复该值 该数据集中还有其他变量 但新的计数变量只需以其中 2 个为条件 我已经浏览了这个博客 但我找不到一种方法使新变
  • 无法将整数从 javascript 传递到 npapi 插件

    我正在编写一个简单的napapi插件 我必须在html页面中打印从javascript函数传递的值 但我在做的时候遇到了问题 它在火狐浏览器上运行正常 但我想在 qt fancybrowser 示例上执行此操作 无论我在 javascrip
  • 将 for 循环的输出保存在单独的数据帧中

    我有一个简单的问题 尽管有很多类似的帖子 但我一直无法解决 因为我在 R 方面有点笨蛋 而且我没有得到我应该得到的任何东西 我有两组文件 All Files lt objects pattern constant country 0 9 4
  • 在 Node.js 中加载基本 HTML

    我正在尝试找出如何加载和渲染基本的 HTML 文件 这样我就不必编写如下代码 response write p blahblahblah p 我刚刚发现one方式使用FS库 我不确定它是否是最干净的 var http require htt
  • CUDA SASS 到 Cubin

    通过 CuObjDump 可以使用 Cubin 文件生成 SASScuobjdump sass
  • MySQL 表中的常量列值

    我在 MySQL 中有一个表 我想将表的列值设置为常量整数 我怎样才能做到这一点 不幸的是 MySQL 不支持 SQL 检查约束 你可以 出于兼容性原因 在 DDL 查询中定义它们 但它们是 只是忽略了 您可以创建 BEFORE INSER
  • Azure DevOps - 在构建管道运行期间,代理在本地下载文件的路径是什么?

    我们正在使用 Microsoft 托管代理来运行应用程序自动化测试场景的构建管道 我们想要实现的是 通过自动化程序下载文件 从无头 Chrome 浏览器 然后导航到下载路径并打开它 如何找到代理内下载文件的路径 快速编译与在 Linux 和