我正在尝试从 AzureFileCopy 任务输出outputStorageUri并outputStorageContainerSasToken在 powershell 脚本中使用它们,我想要实现的一个简单示例是:
pool:
vmImage: 'VS2017-Win2016'
variables:
Parameters.outputStorageUri: ''
Parameters.outputStorageContainerSasToken: ''
steps:
- task: AzureFileCopy@3
inputs:
sourcePath: '$(Build.ArtifactStagingDirectory)\MyProgram.ext'
azureSubscription: 'MyAzureServiceRole'
Destination: 'AzureBlob'
storage: 'myfilestorage'
ContainerName: 'programs'
outputStorageUri: '$(Parameters.outputStorageUri)'
outputStorageContainerSasToken: '$(Parameters.outputStorageContainerSasToken)'
sasTokenTimeOutInMinutes: 5
displayName: Upload program to Blob storage
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
Write-Host 'URL = ' + $Env:PARAMETERS_OUTPUTSTORAGEURI
errorActionPreference: 'stop'
failOnStderr: 'false'
displayName: Send storage URL to Logger(s)
Run Code Online (Sandbox Code Playgroud)
文件已正确复制,但示例中的 write-Host 的 outputStorageUri 始终为空!我还尝试了许多其他方法都无济于事...请有人告诉我我做错了什么...
关于为 UWP 设置 Azure Pipelines 的文档没有说明如何对包进行签名。它确实说证书文件应该位于存储库中,但没有解释如何使用该证书对包进行签名。
所以我的问题是如何在 Azure Pipelines 上签署 UWP 包?我应该创建一个 powershell 脚本来运行吗SignTool?
我正在使用 Visual Studio Build In Azure Pipeline 构建 C# 应用程序。
我的解决方案包含多个项目(ManagerWeb 和 WebAPI)。
我想分别发布两个单独的 Artifact ManagerWeb 和 WebAPI。
所有必需的文件都存在于Build.ArtifactStagingDirectory.
我如何指定一个模式,使用它可以获得两个单独的工件?WebAPI示例第一个工件和ManagerWeb另一个工件中的所有文件名。
ArtifactStaging 目录中的文件名如下
Something.Manager.WebAPI.deploy.cmd
Something.Manager.WebAPI.deploy-readme.txt
Something.Manager.WebAPI.SetParameters.xml
Something.Manager.WebAPI.SourceManifest.xml
Something.Manager.WebAPI.zip
Something.ManagerWeb.deploy.cmd
Something.ManagerWeb.deploy-readme.txt
Something.ManagerWeb.SetParameters.xml
Something.ManagerWeb.SourceManifest.xml
Something.ManagerWeb.zip
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激。
提前致谢。
c# azure-devops azure-pipelines-build-task azure-pipelines azure-artifacts
在 DevOps 中,您可以创建一个dotnet build任务,其中可以设置“项目路径”**/*.csproj来构建所有项目。
这工作得很好,但它(显然)也构建了我的*.Test.csproj项目。
我发现一些帖子提到了排除模式,因此我尝试执行与这些帖子中相同的操作,并尝试了以下组合:
**/*.csproj;-**/*.Test.csproj
**/*.csproj;!**/*.Test.csproj
**/*.csproj;-:**/*.Test.csproj
**/*.csproj;!:**/*.Test.csproj
Run Code Online (Sandbox Code Playgroud)
对于所有尝试,我都会在 DevOps 日志中收到以下错误:
未找到与指定模式匹配的项目文件。
那么,如何创建一个dotnet build任务来构建除项目之外的所有项目呢*.Test.csproj?
.net-core azure-devops azure-pipelines-build-task azure-pipelines
azure-devops azure-pipelines-build-task azure-pipelines azure-pipelines-release-pipeline
我试图了解 Azure 构建管道中两个 nuget restore 命令之间的区别:
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
Run Code Online (Sandbox Code Playgroud)
和
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: '$(solution)'
feedsToUse: 'select'
Run Code Online (Sandbox Code Playgroud)
我试图理解,但在微软页面上,我所看到的是可以同时使用两者 - 我真的找不到任何说明差异的内容。(我也不是很明白这个feedsToUse: 'select'说法)
而且,作为第二个问题,后者和
- task: DotNetCoreCLI@2
inputs:
command: restore
projects: '**/*.csproj'
Run Code Online (Sandbox Code Playgroud)
鉴于该解决方案包含所有 csproj(并且仅包含 csproj)?
azure azure-pipelines-build-task azure-pipelines azure-pipelines-yaml
我面临许可问题。
我正在 Azure DevOps 中开发一个 yaml 管道,它使用同一项目下其他存储库中的模板。
这些模板非常简单。
parameters:
- name: jobName
type: string
- name: projectPath
type: string
- name: projectName
type: string
- name: filesToDelete
type: object
jobs:
- job:
displayName: ${{ parameters.jobName }}
steps:
- task: DotNetCoreCLI@2
displayName: Dotnet build
inputs:
command: 'build'
projects: '${{ parameters.projectPath }}/${{ parameters.projectName }}.csproj'
arguments: '-c Debug'
- task: DotNetCoreCLI@2
displayName: Dotnet pack …Run Code Online (Sandbox Code Playgroud) azure-devops azure-pipelines-build-task azure-pipelines azure-artifacts azure-pipelines-yaml
我正在使用Visual Studio测试任务在VSTS构建管道中执行NUnit测试用例。下面是我正在使用的配置设置: Visual Studio测试配置
2016-05-09T04:54:10.9189232Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.98.1\tasks\VSTest\1.0.34\VSTest.ps1
2016-05-09T04:54:11.8291853Z ##[debug]Calling Invoke-VSTest for all test assemblies
2016-05-09T04:54:11.8971852Z Working folder: C:\a\1
2016-05-09T04:54:11.8981845Z Executing C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "C:\a\1\s\Code\DAM\Honeywell.ACS.EP.DAM\Honeywell.ACS.EP.DAM.CIP.Client.Tests\bin\Release\Honeywell.ACS.EP.DAM.CIP.Client.Tests.dll" "C:\a\1\s\Code\DAM\Honeywell.ACS.EP.DAM\Honeywell.ACS.EP.DAM.Tests\bin\Release\Honeywell.ACS.EP.DAM.Tests.dll" /TestCaseFilter:"TestCategory=Unit" /EnableCodeCoverage /logger:trx /TestAdapterPath:"C:\a\1\s"
2016-05-09T04:54:12.0751854Z Microsoft (R) Test Execution Command Line Tool Version 12.0.30723.0
2016-05-09T04:54:12.0761850Z Copyright (c) Microsoft Corporation. All rights reserved.
2016-05-09T04:54:13.1769952Z Starting test execution, please wait...
2016-05-09T04:54:13.2629955Z Warning: Using Isolation mode to run the tests as diagnostic data adapters were enabled in the runsettings. Use …Run Code Online (Sandbox Code Playgroud) tfs visual-studio visual-studio-2015 nunit-3.0 azure-pipelines-build-task
我们有一个CI构建服务器执行自动构建,并希望在程序集版本中包含当前的sprint/iteration编号.是否有环境变量或简单的方法来获取构建过程中的当前sprint数?TFS On Permise 2015 Update 3
所以我有一个默认的发布构建定义,我希望有另一个与它同步并执行所有相同的步骤,但最后还有一个额外的步骤.
我可以将另一个构建定义作为另一个构建定义中的步骤之一吗?
这个问题适用于最新的Visual Studio Team Services.
tfs tfsbuild azure-devops azure-pipelines-build-task azure-pipelines
azure-pipelines-build-task ×10
azure-devops ×6
tfs ×2
.net-core ×1
azure ×1
azure-pipelines-release-pipeline ×1
c# ×1
certificate ×1
nunit-3.0 ×1
powershell ×1
tfs-2015 ×1
tfsbuild ×1
uwp ×1