我有一个管道,正在顺利运行,并将我的软件部署到一个集装箱。 我想在《美国刑法》出版之前,在建筑阶段之前,加上签署法典。
我们的证书是用钥匙标识持有的,我正试图使用“SignTool”在部署之前作为试验签署前文件。
在通过AzureSignTool之后,你需要把两项任务补充到你的管道中。 第1个“SatignTool”和第2个“指挥”组织要签署。 我的问题是,在安装这一工具之后,我发现这一错误:
sh: Line 1:SignTool: 未发现
它是一个全球装置,我无法理解为什么会发现它?
值得注意的是,一位前同事写了原管道,选择使用“Unbunto”。 我是用来书写使用Windows服务器的管道的,因此无法确定这是否带来巨大变化。
管道的压缩版:
trigger:
tags:
include:
- *
branches:
include:
- develop
- release/*
variables:
- group: CodeSigningVariables #variable group
pool: ubuntu-20.04
stages:
# Build Project
- stage: Build
displayName: Build & Test Project
jobs:
- job: Build
steps:
- checkout: self
persistCredentials: true
clean: true
- #### BUILD SECTION REDACTED ####
- task: DotNetCoreCLI@2
displayName: Install AzureSignTool
inputs:
command: custom
custom: tool
arguments: update --global azuresigntool
- task: CmdLine@2
displayName: Sign Application
inputs:
script: |
AzureSignTool sign -kvu $(SigningVaultURL) -kvi $(SigningClientId) -tr $(SigningTimeStamp) -kvt $(SigningTennentId) -kvs $(SigningClientSecret) -kvc $(SigningCertName) -v $(Build.SourcesDirectory)/src/Project/bin/Release/Project.exe
InstallSignTool步骤的产出:
Starting: Install AzureSignTool
==============================================================================
Task : .NET Core
Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command
Version : 2.221.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
==============================================================================
Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you re using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
/usr/bin/dotnet tool update --global azuresigntool
Skipping NuGet package signature verification.
Tool azuresigntool was reinstalled with the latest stable version (version 4.0.1 ).
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
Finishing: Install AzureSignTool
The output from the Sign Application step:
Starting: Sign Application
==============================================================================
Task : Command line
Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version : 2.231.1
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents:
AzureSignTool sign -kvu https://keyvault.vault.azure.net/ -kvi *** -tr http://timestamp.digicert.com -kvt *** -kvs *** -kvc CertName -v /datadrive/agent/11/s/src/Project/bin/Release/Project.exe
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /datadrive/agent/_temp/b365c9f0-b063-4456-84b0-ab382de1b5ac.sh
/datadrive/agent/_temp/b365c9f0-b063-4456-84b0-ab382de1b5ac.sh: Line 1:SignTool: 未发现
##[error]Bash exited with code 127 .
Finishing: Sign Application
Any help with this will be greatly appreciated.