问题标签 [azure-pipelines-release-task]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
579 浏览

azure - 将 Azure 发布工件默认目录配置为 C(使用“1”参数调用“GetHostByName”:“No such host is known”)

我有两个 Devops Azure 发布阶段(DEV 和 TT)。Dev 能够从构建源 CI 管道中检索工件并复制到 C 驱动器(看起来不错),其中 TT 复制到 D 驱动器,我无法在构建服务器上找到路径,如 D:\a\r1\a.. ..并引发如下异常。

[错误]使用“1”参数调用“GetHostByName”的异常:“没有这样的主机是已知的”

如何将 TT 的默认复制驱动器设置为 C?

在此处输入图像描述

0 投票
2 回答
693 浏览

powershell - 使用 REST API Azure devops 传递变量组名称

有没有办法使用 REST API 将变量组名称传递给发布管道,而无需编辑发布定义。

我可以使用以下方法来做到这一点

但问题是“ Put ”请求更新原始定义。有没有办法在不编辑发布定义的情况下传递变量组。这是动态编辑发布定义以传递变量组的好习惯吗?

0 投票
1 回答
395 浏览

azure-devops - 我们如何在使用自定义映像创建的 Azure VMSS 上实施 CI/CD

我使用自定义映像创建了 VMSS。我在 VMSS 上的 .Net MVC 中托管了 Web 应用程序构建。我通过参考https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/cd/azure/deploy-azure-scaleset?view=azure-devops从 Azure DevOps 配置了 CI/CD 。

它显示错误D:\a\_temp\1575277721063\packer\packer.exe failed with return code: 1。任何建议/建议表示赞赏。以下是 Log 中一些失败的命令:

0 投票
1 回答
1068 浏览

terraform - 如何为 terraform 模块添加远程 azure repo 以使 terraform 代码在 Azure 管道上工作

下面给出的源定义适用于 terraform 模块,但它有一个 PAT TOKEN。在本地 VM 以及 Azure Pipelines 上运行良好。这个问题是关于如何定义 terraform 模块的源定义但没有硬编码 PAT TOKEN

代码的工作副本:

我尝试了以下方法:

这给了我如下错误:

添加了没有域部分的我的用户名,如下所示:

以下错误:

当构建管道即使不指定用户名和密码也可以进行结帐时,为什么我们必须在 terraform 代码中提及。

Azure Pipeline Agent 具有 git 凭据。不确定如果没有 PAT 令牌,这是否会起作用?

0 投票
2 回答
168 浏览

azure-devops - 将代码发布到 Azure Web 应用程序中的自定义文件夹

我有一个代码,我在 Azure DevOps 中有一个构建管道。我还有一个 Linux WebApp,我在 site/wwwroot 目录中创建了一个名为 test 的文件夹。当我创建发布管道时,我希望它发布到测试文件夹而不是默认路径。这可能吗??

0 投票
1 回答
65 浏览

azure-devops - azure pipeline 插件选择框如何使用自己的数据

images 如何使用我们自己的数据在选择框中动态获取数据

0 投票
1 回答
883 浏览

azure-devops - AutoParameterizationWebConfigConnectionStrings not working in azure devops release pipelines

I am setting up build and release pipelines in Azure DevOps for a new project. I mirrored this off an existing project that has been working for a while now.

The problem is that the connection strings aren't transforming by XML or by the release pipeline variable substitution.

I have the following arguments passed during the build phase:

/p:AutoParameterizationWebConfigConnectionStrings=false /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"

Yet, in both projects when I release with system.debug=true, I see this error:

ConnectionString attributes in Web.config is parameterized by default. Note that the transformation has no effect on connectionString attributes as the value is overridden during deployment by 'Parameters.xml or 'SetParameters.xml' files. You can disable the auto-parameterization by setting /p:AutoParameterizationWebConfigConnectionStrings=False during MSBuild package generation.

I do have both the XML transformation and the XML variable substitution boxes checked on the release pipeline.

I've tried to get this working all day to no avail.

Anyone have any other thoughts or suggestions?

0 投票
1 回答
590 浏览

azure-devops - Azure DevOps Pipeline - 发布 API - 更新发布定义添加和删除模板化阶段

我们有一个 Azure DevOps 管道发布定义,我正在考虑为在分支 x 上触发拉取请求时从模板创建新的“阶段”以及在分支时删除阶段进行一些自动化被删除。我将为此使用 github 操作。

API 文档不是很容易理解。

我的问题是:

  • 这可能吗,API 是否支持对 _releaseDefinition 进行此类添加和删除阶段?

  • 如果是这样,有没有关于如何做到这一点的例子?

文档的 https://docs.microsoft.com/en-us/rest/api/azure/devops/release/releases/update%20release?view=azure-devops-rest-5.1#releasedefinitionshallowreference

0 投票
0 回答
53 浏览

azure-devops - 通过 Azure DevOps 自定义任务查询 Azure StorageAccount blob 容器

我们正在 Azure DevOps 扩展中构建一个自定义任务,我们希望picklist使用所选存储帐户的可用 blob 容器填充一个。

task.json特定的数据源绑定中定义如下:

但是在使用任务 UI 期间执行时,服务端点代理返回以下错误:

我们做错了什么?

0 投票
1 回答
180 浏览

git - 从 Azure DevOps Pipeline 提交到 Git Repo 时文件夹重复

下面概述的过程被简化以演示我面临的问题。

过程:

在此处输入图像描述

  • 在工件暂存目录 ($.Build.ArtifactStagingDirectory) 中创建“解决方案”文件夹。

  • 安装所需工具

  • 将 .zip 包从 Dynamics 365 源系统导出到工件目录 ($.Build.ArtifactStagingDirectory\Solutions) 中的“解决方案”文件夹

  • 发布工件 ($.Build.ArtifactStagingDirectory)

  • 将工件提交到 Git 存储库

管道首次运行时的行为

  • 观察到正确的文件夹结构。

在此处输入图像描述

第二次运行管道时的行为

  • 根文件夹的复制

在此处输入图像描述

第三次运行管道的行为

  • 找到并更新了第二级解决方案文件夹。
  • 它只是复制根文件夹的管道的第二次运行。从这里开始,它将在重复的第二级文件夹中查找并更新文件。

在此处输入图像描述

手动清理

  • 我可以删除顶级解决方案文件夹的内容,以给我这个结构——看起来更干净。尽管如此,这并不理想,因为有一个没有内容的不必要的解决方案文件夹。

在此处输入图像描述

为什么该文件夹在管道的第二次运行时重复,并且无论如何要阻止它?