diff --git a/.vscode/launch.json b/.vscode/launch.json index 56140bf..b78cdb9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,7 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { "name": "Split", "type": "go", @@ -12,6 +13,14 @@ "program": "main.go", "args": ["split", "/home/schlatter/tmp/argo-apps/out/all.yaml", "--output-dir=out/split"] }, + { + "name": "Issue 67", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "main.go", + "args": ["argocd","app","./foo/bar","--repo-server=localhost:8081","--output-dir=/tmp/source/"] + }, { "name": "ArgoCD", "type": "go", diff --git a/argocd/appSet_test.go b/argocd/appSet_test.go index f7c5ba9..cf778c9 100644 --- a/argocd/appSet_test.go +++ b/argocd/appSet_test.go @@ -31,6 +31,6 @@ OUTER: continue OUTER } } - t.Errorf("no matching file found for: %s", e.Name()) + t.Errorf("no matching file found for: %s", e.Name()) } } diff --git a/argocd/repoClient.go b/argocd/repoClient.go index dfd5196..8544936 100644 --- a/argocd/repoClient.go +++ b/argocd/repoClient.go @@ -43,10 +43,10 @@ func Render(dir, repoServerUrl, outputDir string, creds RepoCredentails) error { var lastErr error for _, file := range files { - log.Debugf("processing ArgoCD Application at: %s", file) + log.Debugf("processing ArgoCD Application: %s", file) err = renderFile(file, repoServerUrl, outputDir, client, creds) if err != nil { - log.Errorf("could not render argoCD Application: %v", err) + log.Errorf("could not render ArgoCD Application: %v", err) lastErr = err } } diff --git a/argocd/repoClient_test.go b/argocd/repoClient_test.go index 4955570..fb8fe65 100644 --- a/argocd/repoClient_test.go +++ b/argocd/repoClient_test.go @@ -3,7 +3,6 @@ package argocd import "testing" func TestRender(t *testing.T) { - //deactivate until https://github.com/dagger/dagger/issues/5382 is fixed err := Render("../testdata/argocd/helm_app.yaml", "reposerver:8081", "../out/argocd/app/", RepoCredentails{}) if err != nil { t.Error(err) diff --git a/error.log b/error.log new file mode 100644 index 0000000..31ee474 --- /dev/null +++ b/error.log @@ -0,0 +1,2 @@ +┃ panic: input:1: container.from.withMountedCache.withMountedCache.withWorkdir.withExec.withExec.withDirectory.withExec.withDirectory.withServiceBindin +┃ g.withExec.sync start L8N20DJ2O3M6M (aliased as reposerver): health check errored: exit code: 1 \ No newline at end of file diff --git a/go.mod b/go.mod index 9efed92..7f22626 100755 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/puzzle/goff -go 1.20 +go 1.21 + +toolchain go1.21.3 require ( github.com/pkg/errors v0.9.1 @@ -65,7 +67,7 @@ require ( require ( cloud.google.com/go/compute v1.14.0 // indirect - dagger.io/dagger v0.9.2 + dagger.io/dagger v0.9.5 github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect github.com/Masterminds/semver/v3 v3.2.0 // indirect diff --git a/go.sum b/go.sum index 8d2d2e4..e9a2921 100755 --- a/go.sum +++ b/go.sum @@ -50,6 +50,8 @@ code.gitea.io/sdk/gitea v0.15.1 h1:WJreC7YYuxbn0UDaPuWIe/mtiNKTvLN8MLkaw71yx/M= code.gitea.io/sdk/gitea v0.15.1/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA= dagger.io/dagger v0.9.2 h1:BE1l1MpX4Slay9kUx5NddL9NRDnFDVLY9kw3w7LWqN8= dagger.io/dagger v0.9.2/go.mod h1:Nm6DnabJ6px/8AZByAr4y9C3+QQwGoIqopOnytcn368= +dagger.io/dagger v0.9.5 h1:44ypKgOjKZKrzqHSoa/wIfqnrSZM87tuoAKJpo5tGV4= +dagger.io/dagger v0.9.5/go.mod h1:ic2UD6gS5iBp2e6VWPxyb7h6VpAyhFN6U7/TDlriox8= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/gqlgen v0.17.31 h1:VncSQ82VxieHkea8tz11p7h/zSbvHSxSDZfywqWt158= diff --git a/local.env b/local.env index 66326f4..61ca57b 100644 --- a/local.env +++ b/local.env @@ -5,4 +5,4 @@ export REGISTRY_PASSWORD=bar export REGISTRY_URL=ttl.sh export REGISTRY_USER=foo export OTEL_EXPORTER_JAEGER_ENDPOINT=http://localhost:14268/api/traces -export OTEL_RESOURCE_ATTRIBUTES="commit=SHA111,group=puzzle,project=goff,job=123,pipeline=local" \ No newline at end of file +export OTEL_RESOURCE_ATTRIBUTES="commit=SHA111,group=puzzle,project=goff,job=123,pipeline=local"