我在 YML 文件中创建了一个多阶段管道,包括构建阶段以及部署到开发、测试和生产。我希望有一个仪表板来显示部署状态以及部署到每个阶段的发布版本?我检查“部署状态”小部件,但它仅适用于发布选项。那么有人有经验支持我吗?
azure-devops azure-pipelines azure-pipelines-release-pipeline azure-pipelines-yaml azure-dashboard
我计划将我的 Azure 管道源文件移动到新的 Azure 存储库。如何更新现有管道设置以指向新的 Azure 私有存储库位置?我不想重新创建存储库和变量。现在,如果我编辑当前管道设置,它只允许我从当前存储库中选择 .yml 文件。没有更改回购的选项。
谢谢
在我的 Azure DevOps 管道中
(https://dev.azure.com/TheNewThinkTank/dark-matter-attractor/_build?definitionId=2&_a=summary)
我有一个测试阶段,我希望在相应的 Azure DevOps 存储库中的所有 Python 文件上安装并运行 pytest
(https://dev.azure.com/TheNewThinkTank/_git/dark-matter-attractor)。
Pytest的安装和运行方式遵循微软官方文档:
- script: |
pip install pytest
pip install pytest-cov
pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html
displayName: 'Test with pytest'
Run Code Online (Sandbox Code Playgroud)
可以在以下位置找到:https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python ?view=azure-devops
运行 Pipeline 会导致上述步骤出错:
pytest: command not found
如果您想查看完整的回溯:
我尝试过的其他事情:
在官方 pytest 网站(https://docs.pytest.org/en/stable/getting-started.html)之后,我尝试向安装命令添加一个标志:
pip install -U pytest,但结果相同。
是什么阻止管道发现已安装的 pytest 模块?
我希望在 Azure Pipeline 任务中运行一些 CURL 命令(主要是 GET),以从几个来源列出/下载一些工件。如果有任何关于如何使用 CURL、Powershell、Windows 命令或任何其他适当方法通过管道任务实现此目的的示例,我将不胜感激。
谢谢
rest curl azure-pipelines azure-artifacts azure-pipelines-tasks
我希望该PublishTestResults@2任务仅在前一个任务script(运行单元测试)实际运行时才运行。
condition: succeededOrFailed()thenPublishTestResults@2运行,即使上一步没有运行 - 我认为这就是目的condition: always()。always()和 和有什么区别succeededOrFailed()? # This step only runs if the previous step was successful - OK
- script: |
cd $(System.DefaultWorkingDirectory)/application/src
yarn test:unit --silent --ci --reporters=jest-junit
displayName: 'Jest Unit Tests'
env:
JEST_JUNIT_OUTPUT_DIR: $(System.DefaultWorkingDirectory)/testresults
JEST_JUNIT_OUTPUT_NAME: 'jest-junit.xml'
# This step ALWAYS runs - NO
# This step should ONLY run if the previous step RAN (success OR fail)
- task: PublishTestResults@2
displayName: …Run Code Online (Sandbox Code Playgroud) 以下天蓝色管道代码给出错误
“在此上下文中不允许使用模板表达式”
variables:
major: 2020
minor: 3
patch: 1
major_minor_patch: $(major).$(minor).$(patch)
trigger:
- master
- Dev
- release/R${{variables.major_minor_patch}}
- release/${{variables.major_minor_patch}}/*
Run Code Online (Sandbox Code Playgroud)
我的目的是使用主要、次要和补丁变量来指定形成 CI 触发器的分支,而不是在管道 YAML 中对其进行硬编码。
谢谢
我正在尝试使用 Docker 映像作为 Azure 管道中的构建代理。我正在使用 Azure DevOps Server 2019 和 Docker 企业版。
管道运行时出现此错误:
##[section]Starting: Initialize containers
##[command]C:\Program Files\Docker\docker.EXE version --format '{{.Server.APIVersion}}'
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/version: open //./pipe/docker_engine: Access is denied. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
'
##[error]Exit code 1 returned from process: file name 'C:\Program Files\Docker\docker.EXE', arguments 'version --format '{{.Server.APIVersion}}''.
##[section]Finishing: Initialize containers
Run Code Online (Sandbox Code Playgroud)
我已经验证服务器上安装了 Docker。我运行了以下命令来确保 Docker …
我想在 Azure Devops Pipelines 上使用 flutter 驱动程序运行自动化 UI 测试,并且我正在使用Alois Daniel 的 Flutter Tasks。azure flutter 任务插件目前不支持 flutter 驱动程序。我们正在寻找在运行 flutter 驱动程序测试时启动 Android 和 iOS 模拟器的任务。我们正在 azure devops pipeline yml 文件中运行 macos-latest 的 vm-image。
I have a CI pipeline (YAML) that builds a repo that will deploy into an existing Azure Function. The CI pipeline is doing it is job. However, after it is done, and I go to Function App -> App files -> I can see the azure-pipeline.yml is included in there (or i think it was included in the build process). I have tried using paths and exclude but they dont work. My question is, how do I exclude only that …
azure-pipelines ×10
azure-devops ×8
azure ×1
azure-pipelines-release-pipeline ×1
bash ×1
curl ×1
docker ×1
flutter-test ×1
git ×1
pytest ×1
python ×1
rest ×1
yaml ×1