Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1741)

Unified Diff: deploytool/cmd/luci_deploy/layout.go

Issue 2584893004: luci_deploy: Enable loading "index.yaml" directly. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « deploytool/cmd/luci_deploy/deploy_appengine.go ('k') | deploytool/cmd/luci_deploy/path.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: deploytool/cmd/luci_deploy/layout.go
diff --git a/deploytool/cmd/luci_deploy/layout.go b/deploytool/cmd/luci_deploy/layout.go
index 7d7275a9277b670090ba0e16a8711ed9e2623cb0..5b8bcf47ee5a453d040af716262c51cccf5224eb 100644
--- a/deploytool/cmd/luci_deploy/layout.go
+++ b/deploytool/cmd/luci_deploy/layout.go
@@ -231,6 +231,18 @@ func (comp *layoutDeploymentComponent) loadSourceComponent(reg componentRegistra
module.Handlers.Handler = append(module.Handlers.Handler, msg.Handler...)
}
+ // If the module specifies a direct "index.yaml" path, load index entries
+ // from there and translate them to resources.
+ if p := module.IndexYamlPath; p != "" {
+ path := module.comp.pathTo(p)
+ res, err := loadIndexYAMLResource(path)
+ if err != nil {
+ return errors.Annotate(err).Reason("failed to load 'index.yaml' from [%(path)s]").
+ D("path", path).Err()
+ }
+ dep.cloudProject.appendResources(res, &module)
+ }
+
// Append GAE Resources.
if r := module.Resources; r != nil {
dep.cloudProject.appendResources(r, &module)
« no previous file with comments | « deploytool/cmd/luci_deploy/deploy_appengine.go ('k') | deploytool/cmd/luci_deploy/path.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698