覆盖应用程序发布配置文件
Override appveyor publish profile
我有一个 MVC 5 应用程序,我们要从本地迁移到 Azure 云。目前,我们有几个发布配置文件,每个环境一个,我们使用 powershell 脚本确定。我们的目标之一是使构建脚本和基础设施尽可能简单,所以我想知道我是否可以只使用我的 appveyor.yml
文件来设置要使用的发布配置文件,所以
有没有办法从 appveyor.yml
文件设置发布配置文件?
如果不是,我的选择是什么?
您可以 运行 您的 PowerShell 脚本作为 pipeline. It is possible can run commands right from YAML file or UI or check-in your PowerShell script into repository and run .ps1
file. You might consider using secure variables 中所需构建步骤的一部分,以避免以明文形式将连接字符串等内容签入回购协议。
但是,这种自定义 script/profiles 方法不允许您使用 built-in WAP artifacts packaging and you will be also needed to use custom script instead of automatic MSBuild mode. Which is OK, but a little bit more scripting. Also you will be needed to publish artifacts,因此它可以用于部署。
也许更简单的选择是让 AppVeyor 做所有事情 build and WAP artifacts packaging/publishing automatically, and then use built-in Web Deployment with Web Deploy parametrization 而不是多个发布配置文件。
但是,如果您决定使用自定义脚本和多个发布配置文件,您仍然可以将 built-in Web Deployment 用于您的脚本创建的工件。
我有一个 MVC 5 应用程序,我们要从本地迁移到 Azure 云。目前,我们有几个发布配置文件,每个环境一个,我们使用 powershell 脚本确定。我们的目标之一是使构建脚本和基础设施尽可能简单,所以我想知道我是否可以只使用我的 appveyor.yml
文件来设置要使用的发布配置文件,所以
有没有办法从 appveyor.yml
文件设置发布配置文件?
如果不是,我的选择是什么?
您可以 运行 您的 PowerShell 脚本作为 pipeline. It is possible can run commands right from YAML file or UI or check-in your PowerShell script into repository and run .ps1
file. You might consider using secure variables 中所需构建步骤的一部分,以避免以明文形式将连接字符串等内容签入回购协议。
但是,这种自定义 script/profiles 方法不允许您使用 built-in WAP artifacts packaging and you will be also needed to use custom script instead of automatic MSBuild mode. Which is OK, but a little bit more scripting. Also you will be needed to publish artifacts,因此它可以用于部署。
也许更简单的选择是让 AppVeyor 做所有事情 build and WAP artifacts packaging/publishing automatically, and then use built-in Web Deployment with Web Deploy parametrization 而不是多个发布配置文件。
但是,如果您决定使用自定义脚本和多个发布配置文件,您仍然可以将 built-in Web Deployment 用于您的脚本创建的工件。