From 4602313f34ffcfbc89a33d1dc5ce9df8fe4fcce8 Mon Sep 17 00:00:00 2001 From: Victoria Jeffrey Date: Mon, 18 Sep 2023 22:58:54 -0600 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix=20discovery=20of=20terra?= =?UTF-8?q?form=20gitlab=20assets=20(missing=20path=20option)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- motor/discovery/gitlab/gitlab.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/motor/discovery/gitlab/gitlab.go b/motor/discovery/gitlab/gitlab.go index 49ef9ae4fe..5ffcd57dfe 100644 --- a/motor/discovery/gitlab/gitlab.go +++ b/motor/discovery/gitlab/gitlab.go @@ -170,17 +170,19 @@ func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, pCfg *provide if err == nil && len(terraformFiles) > 0 { terraformCfg := pCfg.Clone() terraformCfg.Backend = providers.ProviderType_TERRAFORM + // git+https://gitlab.com/mondoolabs/example-gitlab.git + terraformCfg.Options["path"] = "git" + "+" + project.HTTPURLToRepo assets, err := (&terraform_resolver.Resolver{}).Resolve(ctx, projectAsset, terraformCfg, credsResolver, sfn) if err == nil && len(assets) > 0 { for i := range assets { if len(assets[i].PlatformIds) > 0 { assets[i].PlatformIds[0] = assets[i].PlatformIds[0] + "/" + project.Name + list = append(list, assets[i]) } else { log.Debug().Msg("missing platform id for asset") continue } } - list = append(list, assets...) } } } From a928366b0fd5a3a9d59890ebf772447f9119871d Mon Sep 17 00:00:00 2001 From: Victoria Jeffrey Date: Mon, 18 Sep 2023 23:21:24 -0600 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A7=B9=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- motor/discovery/gitlab/gitlab.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/motor/discovery/gitlab/gitlab.go b/motor/discovery/gitlab/gitlab.go index 5ffcd57dfe..1253f026ee 100644 --- a/motor/discovery/gitlab/gitlab.go +++ b/motor/discovery/gitlab/gitlab.go @@ -171,7 +171,7 @@ func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, pCfg *provide terraformCfg := pCfg.Clone() terraformCfg.Backend = providers.ProviderType_TERRAFORM // git+https://gitlab.com/mondoolabs/example-gitlab.git - terraformCfg.Options["path"] = "git" + "+" + project.HTTPURLToRepo + terraformCfg.Options["path"] = "git+" + project.HTTPURLToRepo assets, err := (&terraform_resolver.Resolver{}).Resolve(ctx, projectAsset, terraformCfg, credsResolver, sfn) if err == nil && len(assets) > 0 { for i := range assets {