gpt4 book ai didi

azure - 在 azure 管道中将文件从一个作业模板移动或复制到另一个作业模板

转载 作者:行者123 更新时间:2023-12-03 06:58:15 25 4
gpt4 key购买 nike

我在 azure pipeline 中有两个作业。一个是 infrastruction.yml,另一个是 keyvault.ymlkeyvault.yml 首先被部署。然后 infrastruction.yml 正在部署。

我正在使用以下代码从存储帐户下载 keyvault.yml 中的一个证书(pfx 文件):

az storage blob download \
--blob-url "${blob_url}" \
--file "${pfx_path}" \
--sas-token "${cert_DownloadUrlToken_Custom}"

我想在 infrastruction.yml 作业中使用此下载的证书。我想使用以下命令将证书(pfx 文件)上传到 infrastruct.yml 中的另一个存储帐户

 az storage blob upload --account-name ${sa_name} \
--account-key ${access_key} \
--container-name "certificate" \
--file "${pfx_path}" \
--name "cert" \
--overwrite true

。现在我正在关注

error certificate not found

是否可以在另一个作业中使用在一个作业中下载的证书文件?

最佳答案

Is it possible to use cert file downloaded in one job in another job?

是的。要在不同作业或管道之间传输文件,您需要使用Publish Pipeline Artifact任务和Download Pipeline Artifact任务。

请引用官方doc了解详情。

关于azure - 在 azure 管道中将文件从一个作业模板移动或复制到另一个作业模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72710139/

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