gpt4 book ai didi

azure - 更改 Azure Pipelines 中的当前工作目录

转载 作者:行者123 更新时间:2023-12-04 00:34:13 26 4
gpt4 key购买 nike

我正在 Azure Pipelines 中开发 Python 包的 CI ( https://github.com/scikit-image/scikit-image/blob/azure-pipelines/azure-pipelines.yml )。在某些时候,我需要退出源代码目录,以允许 pytest 发现此包的安装,并运行相应的测试。

我面临的问题与 cdcd C: 等命令似乎没有产生任何效果有关,因此当前的工作目录保持不变(在本例中为 D:\a\1\s)。

有没有办法克服所描述的限制?

最佳答案

花了很多时间才找到解决方案,但是,显然,有一种方法来指定特定脚本的工作目录 - https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/command-line?view=vsts&tabs=yaml :

- script: # script path or inline
workingDirectory: #
displayName: #
failOnStderr: #
env: # mapping of environment variables to add

关于azure - 更改 Azure Pipelines 中的当前工作目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53857085/

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