【问题标题】:How do I get Kudu to leave out a few folders from my repo?如何让 Kudu 从我的仓库中删除一些文件夹?
【发布时间】:2019-01-31 10:19:39
【问题描述】:

我有一个 git 存储库,其网站结构如下:

repo_root:
 - what_a_nice_day_it_is_today.txt
 reference
  - countries.txt
 docs
  - foo.txt
 src
  - index.html
  content
    - index.css
  scripts
    - index.js

我使用 Web App 模板为我的 Web 应用程序创建了一个 Azure App Service。在 部署中心,我选择从我的 GitHub 存储库进行部署,并选择 Kudu 作为构建服务器。

如何让 Kudu 在部署我的 Web 应用程序时不复制任何内容src 文件夹(及其子文件夹)的内容

也就是说,我希望它忽略docs 文件夹和reference 文件夹以及repo_root 中但不在src 文件夹中的任何文件,其中,在这个例子中是what_a_nice_day_it_is_today.txt 文件。

【问题讨论】:

  • 你可以用 gitignore 从 repo 中删除它们吗?
  • @4c74356b41 我希望它们在仓库中,因为我想维护它们。我只是不想部署它们。
  • 好的,抱歉,想不出办法。对不起(并不意味着它不存在)

标签: azure azure-web-app-service kudu


【解决方案1】:

相应地定义 SCM_TARGET_PATH 和 PROJECT 环境。见https://github.com/projectkudu/kudu/wiki/Deploying-inplace-and-without-repository

【讨论】:

  • 据我所知,这指向了 OP 需要的解决方案。但是,值得详细说明 PROJECT env 的用途。
猜你喜欢
  • 2014-08-22
  • 2014-12-28
  • 2017-06-17
  • 2017-07-12
  • 1970-01-01
  • 1970-01-01
  • 2015-02-24
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多