From d7fbea4380edbc9df0d3490f630d6ff4f299cf46 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 25 Oct 2022 19:04:57 +0200 Subject: [PATCH] Remove base --- .gitignore | 2 - CONFIGURATION_SERVER.md | 1 - assets/octopush.png | Bin 32918 -> 0 bytes assets/octopush.svg | 10 - cmd/octopush/commands/process.go | 61 ----- cmd/octopush/commands/root.go | 18 -- cmd/octopush/commands/server/process.go | 73 ----- cmd/octopush/commands/server/server.go | 16 -- cmd/octopush/octopush.go | 28 -- cmd/server/commands/root.go | 16 -- cmd/server/commands/start.go | 19 -- cmd/server/server.go | 29 -- example/testkey.private.pgp | 17 -- go.mod | 61 ----- go.sum | 285 -------------------- integration_test/main_test.go | 25 -- integration_test/storage_test.go | 74 ------ internal/actions/action.go | 77 ------ internal/actions/action_creator.go | 85 ------ internal/actions/builders/docker.go | 95 ------- internal/actions/builders/go.go | 46 ---- internal/actions/querier/ripgrep.go | 106 -------- internal/api/health.go | 16 -- internal/api/process_command.go | 44 --- internal/api/root.go | 12 - internal/cli/cli.go | 30 --- internal/commands/process_repos.go | 241 ----------------- internal/gitproviders/gitea.go | 143 ---------- internal/logger/zap.go | 33 --- internal/schema/kraken.go | 32 --- internal/server/http_server.go | 54 ---- internal/server/server.go | 22 -- internal/server/storage_server.go | 28 -- internal/serverdeps/server_deps.go | 74 ------ internal/services/actions/action.go | 43 --- internal/services/jobs/models.go | 4 - internal/services/providers/git.go | 1 - internal/services/providers/gogit.go | 339 ------------------------ internal/services/signer/openpgp.go | 81 ------ internal/services/storage/models.go | 7 - internal/services/storage/storage.go | 77 ------ roadmap.md | 63 ----- scripts/push_github.sh | 7 - scripts/run.sh | 15 -- scripts/run_client.sh | 13 - scripts/run_server.sh | 7 - templates/build_release.Dockerfile | 7 - 47 files changed, 2537 deletions(-) delete mode 100644 .gitignore delete mode 100644 CONFIGURATION_SERVER.md delete mode 100644 assets/octopush.png delete mode 100644 assets/octopush.svg delete mode 100644 cmd/octopush/commands/process.go delete mode 100644 cmd/octopush/commands/root.go delete mode 100644 cmd/octopush/commands/server/process.go delete mode 100644 cmd/octopush/commands/server/server.go delete mode 100644 cmd/octopush/octopush.go delete mode 100644 cmd/server/commands/root.go delete mode 100644 cmd/server/commands/start.go delete mode 100644 cmd/server/server.go delete mode 100644 example/testkey.private.pgp delete mode 100644 go.mod delete mode 100644 go.sum delete mode 100644 integration_test/main_test.go delete mode 100644 integration_test/storage_test.go delete mode 100644 internal/actions/action.go delete mode 100644 internal/actions/action_creator.go delete mode 100644 internal/actions/builders/docker.go delete mode 100644 internal/actions/builders/go.go delete mode 100644 internal/actions/querier/ripgrep.go delete mode 100644 internal/api/health.go delete mode 100644 internal/api/process_command.go delete mode 100644 internal/api/root.go delete mode 100644 internal/cli/cli.go delete mode 100644 internal/commands/process_repos.go delete mode 100644 internal/gitproviders/gitea.go delete mode 100644 internal/logger/zap.go delete mode 100644 internal/schema/kraken.go delete mode 100644 internal/server/http_server.go delete mode 100644 internal/server/server.go delete mode 100644 internal/server/storage_server.go delete mode 100644 internal/serverdeps/server_deps.go delete mode 100644 internal/services/actions/action.go delete mode 100644 internal/services/jobs/models.go delete mode 100644 internal/services/providers/git.go delete mode 100644 internal/services/providers/gogit.go delete mode 100644 internal/services/signer/openpgp.go delete mode 100644 internal/services/storage/models.go delete mode 100644 internal/services/storage/storage.go delete mode 100644 roadmap.md delete mode 100755 scripts/push_github.sh delete mode 100755 scripts/run.sh delete mode 100755 scripts/run_client.sh delete mode 100755 scripts/run_server.sh delete mode 100644 templates/build_release.Dockerfile diff --git a/.gitignore b/.gitignore deleted file mode 100644 index dddecf9..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.cuddle/ -.env diff --git a/CONFIGURATION_SERVER.md b/CONFIGURATION_SERVER.md deleted file mode 100644 index 04d5c69..0000000 --- a/CONFIGURATION_SERVER.md +++ /dev/null @@ -1 +0,0 @@ -# Configuration server diff --git a/assets/octopush.png b/assets/octopush.png deleted file mode 100644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TPM)4>UTt(;z^7Bu~H7XUlj{E(@`c*_vg z`PPzY^49u|M5jm^M`g$JY=-`R~cvE7VbpSsT;)jS;l)5NZtfr?%fw?l%FiN!&Rl-S7ey9 ztFl9|wD}*=Wmp{*0~b&%cJPJd2ZCa4`Hm0z)9?ROy(nIHjrT?R z_;$2$H#)b-)<}mVkN-C%%P%(2W!$F^Z`tP{W1)S4lm;j*i6MCHniBY#n|t zm7X(8*A3%}oY7>$swBMK`&gLr>@rbu^=+%-EqW|A(F$QhB>-ydc~awLABOsg?7TgE zr;Rh4)tKn@Vk!fO zq)xK^+n7<;y;WteZ8X+?-Ji$1S~6RhqUXeH$5mq|gTHu(Iwy}H`f;wJeS`@TV8l{q z=0UHBfhTjVACzY&&%LVs?q~Gf_qTuR&hLHouqu`awjcg#NYOAb;(~vB_KU~3JnhwA z4cGg`^~vZHo{|<5&yc;Om=Nsz(xDA*88V}7ykac zga-=pky>OM|Ip&->o&`FA0IvbA=Y!9@Y}uIo_o$pGDUmqc2)mI=*bRthX%%P{<&YWw_^;R zM7P(hnR{OTk(fe7KC)|^bCUDZP+N7Tzjz)K1Gb~*`U|xZ-O)OOFX-XyV)1u^)yJ8e z1U+`|qi=tExQm*9JxfBMcx%|&O6)Z6#mTG2u=%kTlg(Rl8_isKOyUN-jg}Xfdh2jb zO+U`DEPj*fNQQdCi0aLMiN+A7U$4m4+#k7i;|Y=v8NY9`r}{r2B>2To$Q-95cOLHn zIq(0|wjCeWdh0v*vk#GED-F_D#&ddAZ>~h7j3p^n}N=kc*??; WPnyP`2RU5+r>c_HGsIJ?(EktLL<~6q diff --git a/assets/octopush.svg b/assets/octopush.svg deleted file mode 100644 index 8812c64..0000000 --- a/assets/octopush.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/cmd/octopush/commands/process.go b/cmd/octopush/commands/process.go deleted file mode 100644 index dcfa8ba..0000000 --- a/cmd/octopush/commands/process.go +++ /dev/null @@ -1,61 +0,0 @@ -package commands - -import ( - "context" - "time" - - "git.front.kjuulh.io/kjuulh/octopush/internal/cli" - "git.front.kjuulh.io/kjuulh/octopush/internal/commands" - "github.com/spf13/cobra" - "go.uber.org/zap" -) - -func CreateOctopushProcessCmd(logger *zap.Logger) *cobra.Command { - - var ( - actionsRepo string - branch string - path string - ) - cmd := &cobra.Command{ - Use: "process", - RunE: func(cmd *cobra.Command, args []string) error { - if err := cmd.ParseFlags(args); err != nil { - return err - } - - ctx := cmd.Context() - - deps, cleanupFunc, err := cli.Start(ctx, logger) - if err != nil { - return err - } - - defer func() { - ctx, _ = context.WithTimeout(ctx, time.Second*5) - if err := cleanupFunc(ctx); err != nil { - panic(err) - } - }() - - err = commands. - NewProcessRepos(logger, deps). - Process(ctx, actionsRepo, branch, path) - if err != nil { - return err - } - - return nil - }, - } - - pf := cmd.PersistentFlags() - - pf.StringVar(&actionsRepo, "actions-repo", "", "actions repo is the location of your actions, not where to apply the actions themselves, that should be self contained") - cmd.MarkPersistentFlagRequired("actions-repo") - pf.StringVar(&branch, "branch", "main", "which branch to look for actions in, will default to main") - pf.StringVar(&path, "path", "", "the location of the path inside the repository") - cmd.MarkPersistentFlagRequired("path") - - return cmd -} diff --git a/cmd/octopush/commands/root.go b/cmd/octopush/commands/root.go deleted file mode 100644 index 3a6654f..0000000 --- a/cmd/octopush/commands/root.go +++ /dev/null @@ -1,18 +0,0 @@ -package commands - -import ( - "git.front.kjuulh.io/kjuulh/octopush/cmd/octopush/commands/server" - "github.com/spf13/cobra" - "go.uber.org/zap" -) - -func CreateOctopushCmd(logger *zap.Logger) *cobra.Command { - cmd := &cobra.Command{ - Use: "octopush", - } - - cmd.AddCommand(CreateOctopushProcessCmd(logger)) - cmd.AddCommand(server.CreateOctopushServerCmd(logger)) - - return cmd -} diff --git a/cmd/octopush/commands/server/process.go b/cmd/octopush/commands/server/process.go deleted file mode 100644 index 04f2041..0000000 --- a/cmd/octopush/commands/server/process.go +++ /dev/null @@ -1,73 +0,0 @@ -package server - -import ( - "bytes" - "encoding/json" - "net/http" - - "github.com/spf13/cobra" -) - -func CreateOctopushProcessCmd() *cobra.Command { - - var ( - actionsRepo string - branch string - path string - ) - cmd := &cobra.Command{ - Use: "process", - RunE: func(cmd *cobra.Command, args []string) error { - if err := cmd.ParseFlags(args); err != nil { - return err - } - - client := http.Client{} - - var buf bytes.Buffer - err := json.NewEncoder(&buf). - Encode(struct { - Repository string `json:"repository"` - Branch string `json:"branch"` - Path string `json:"path"` - }{ - Repository: actionsRepo, - Branch: branch, - Path: path, - }) - if err != nil { - panic(err) - } - - req, err := http.NewRequestWithContext( - cmd.Context(), - http.MethodPost, - "http://localhost:3000/commands/processRepos", - &buf, - ) - if err != nil { - panic(err) - } - - resp, err := client.Do(req) - if err != nil { - panic(err) - } - if resp.StatusCode >= 300 { - panic(resp.Status) - } - - return nil - }, - } - - pf := cmd.PersistentFlags() - - pf.StringVar(&actionsRepo, "actions-repo", "", "actions repo is the location of your actions, not where to apply the actions themselves, that should be self contained") - cmd.MarkPersistentFlagRequired("actions-repo") - pf.StringVar(&branch, "branch", "main", "which branch to look for actions in, will default to main") - pf.StringVar(&path, "path", "", "the location of the path inside the repository") - cmd.MarkPersistentFlagRequired("path") - - return cmd -} diff --git a/cmd/octopush/commands/server/server.go b/cmd/octopush/commands/server/server.go deleted file mode 100644 index 90287a6..0000000 --- a/cmd/octopush/commands/server/server.go +++ /dev/null @@ -1,16 +0,0 @@ -package server - -import ( - "github.com/spf13/cobra" - "go.uber.org/zap" -) - -func CreateOctopushServerCmd(logger *zap.Logger) *cobra.Command { - cmd := &cobra.Command{ - Use: "server", - } - - cmd.AddCommand(CreateOctopushProcessCmd()) - - return cmd -} diff --git a/cmd/octopush/octopush.go b/cmd/octopush/octopush.go deleted file mode 100644 index f75223c..0000000 --- a/cmd/octopush/octopush.go +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "os" - - "git.front.kjuulh.io/kjuulh/octopush/cmd/octopush/commands" - "git.front.kjuulh.io/kjuulh/octopush/internal/logger" - "go.uber.org/zap" -) - -func main() { - logger, err := logger.New() - if err != nil { - panic(err) - } - _ = logger.Sync() - - zap.ReplaceGlobals(logger) - - Execute(logger) -} - -func Execute(logger *zap.Logger) { - err := commands.CreateOctopushCmd(logger).Execute() - if err != nil { - os.Exit(1) - } -} diff --git a/cmd/server/commands/root.go b/cmd/server/commands/root.go deleted file mode 100644 index 379f24e..0000000 --- a/cmd/server/commands/root.go +++ /dev/null @@ -1,16 +0,0 @@ -package commands - -import ( - "github.com/spf13/cobra" - "go.uber.org/zap" -) - -func CreateServerCmd(logger *zap.Logger) *cobra.Command { - cmd := &cobra.Command{ - Use: "octopushserver", - } - - cmd.AddCommand(NewStartServerCommand(logger)) - - return cmd -} diff --git a/cmd/server/commands/start.go b/cmd/server/commands/start.go deleted file mode 100644 index 7849f57..0000000 --- a/cmd/server/commands/start.go +++ /dev/null @@ -1,19 +0,0 @@ -package commands - -import ( - "git.front.kjuulh.io/kjuulh/octopush/internal/server" - "github.com/spf13/cobra" - "go.uber.org/zap" -) - -func NewStartServerCommand(logger *zap.Logger) *cobra.Command { - cmd := &cobra.Command{ - Use: "start", - Short: "Start the octopush server", - RunE: func(cmd *cobra.Command, args []string) error { - return server.Start(logger) - }, - } - - return cmd -} diff --git a/cmd/server/server.go b/cmd/server/server.go deleted file mode 100644 index f050505..0000000 --- a/cmd/server/server.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "os" - - "git.front.kjuulh.io/kjuulh/octopush/cmd/server/commands" - "git.front.kjuulh.io/kjuulh/octopush/internal/logger" - "go.uber.org/zap" -) - -func main() { - logger, err := logger.New() - if err != nil { - panic(err) - } - _ = logger.Sync() - - zap.ReplaceGlobals(logger) - - Execute(logger) -} - -func Execute(logger *zap.Logger) { - err := commands.CreateServerCmd(logger).Execute() - if err != nil { - logger.Error("execution failed", zap.Error(err)) - os.Exit(1) - } -} diff --git a/example/testkey.private.pgp b/example/testkey.private.pgp deleted file mode 100644 index b31f2d7..0000000 --- a/example/testkey.private.pgp +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP PRIVATE KEY BLOCK----- - -lIYEYx8kxRYJKwYBBAHaRw8BAQdAwlYhGGWpLSSxZoHUmzvl6iJeZgtfKu/8/cjt -LLQ8Swf+BwMCGPF3fdZbweT7+Y/bMMnelXmhYsTgEk30h+FeXOnGy/ZvJgnqoBed -eRPRO5VDN4xq30D8zp04em8tgPXXS50yXvf7PUIKcx4u0IDteTC/Q7QjS3Jha2Vu -IDxrcmFrZW5Aa2FzcGVyaGVybWFuc2VuLmNvbT6IkwQTFgoAOxYhBKh3AMKI2yc/ -qX90YXHawJCw+EZkBQJjHyTFAhsDBQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheA -AAoJEHHawJCw+EZkJMQA/AgeMkam18RasuPcl9kiiFkE2EA2TvO25IieZesbCEf5 -APwLjuXkMNYrPSAGPk0VZY7Eq8hWQd3qh9GHV9vDEUvND5yLBGMfJMUSCisGAQQB -l1UBBQEBB0D4pGbjQW+s2aYO3DZX7M0yyq4JkZ+Wana3v2BuAXXYEwMBCAf+BwMC -7hV7XuPdNrP7q1BylZe5GKz0TP0LSRbVjPgnetTyDqOaWEtdRzc996rBR0WcvUJO -xN7oRR8XNMp1v6Up2LcvUs6XDpJ4f1MBGh3npytF7oh4BBgWCgAgFiEEqHcAwojb -Jz+pf3RhcdrAkLD4RmQFAmMfJMUCGwwACgkQcdrAkLD4RmTvQgEAqGhqQuiZQskW -Zbr27HBpQIukcIOVFle+wNXNyhKTJlkBAKoM/wTrQNIyS2gnGPQ1IE/AtDhMvwsV -hCIzhb/ybLMH -=9Nw9 ------END PGP PRIVATE KEY BLOCK----- diff --git a/go.mod b/go.mod deleted file mode 100644 index 25bc5ba..0000000 --- a/go.mod +++ /dev/null @@ -1,61 +0,0 @@ -module git.front.kjuulh.io/kjuulh/octopush - -go 1.19 - -require ( - code.gitea.io/sdk/gitea v0.15.1 - git.front.kjuulh.io/kjuulh/curre v1.3.5 - github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 - github.com/gin-contrib/zap v0.1.0 - github.com/gin-gonic/gin v1.8.1 - github.com/go-git/go-git/v5 v5.4.2 - github.com/google/uuid v1.3.0 - github.com/spf13/cobra v1.6.1 - github.com/stretchr/testify v1.8.1 - github.com/whilp/git-urls v1.0.0 - go.uber.org/zap v1.23.0 - golang.org/x/net v0.2.0 - gopkg.in/yaml.v3 v3.0.1 -) - -require ( - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/acomagu/bufpipe v1.0.3 // indirect - github.com/cloudflare/circl v1.1.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.3.1 // indirect - github.com/go-playground/locales v0.14.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect - github.com/go-playground/validator/v10 v10.10.0 // indirect - github.com/goccy/go-json v0.9.7 // indirect - github.com/hashicorp/go-version v1.2.1 // indirect - github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/leodido/go-urn v1.2.1 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/sergi/go-diff v1.2.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/ugorji/go/codec v1.2.7 // indirect - github.com/xanzy/ssh-agent v0.3.2 // indirect - go.opentelemetry.io/otel v1.10.0 // indirect - go.opentelemetry.io/otel/trace v1.10.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.8.0 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/sys v0.2.0 // indirect - golang.org/x/text v0.4.0 // indirect - google.golang.org/protobuf v1.28.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect -) diff --git a/go.sum b/go.sum deleted file mode 100644 index 74463fc..0000000 --- a/go.sum +++ /dev/null @@ -1,285 +0,0 @@ -code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE= -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= -git.front.kjuulh.io/kjuulh/curre v1.3.5 h1:oKYh5Z0vInjViLnS4ppzK0G2Mnj7vXq8mA5i/rsWId4= -git.front.kjuulh.io/kjuulh/curre v1.3.5/go.mod h1:m7WpSehONLqPh/XF3F0BI0UOpLOfGuDmDEFI1XsM6fE= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/ProtonMail/go-crypto v0.0.0-20220822140716-1678d6eb0cbe h1:R2HeCk7SG/XpoYZlEeI1v7sId7w2AMWwzOaVqXn45FE= -github.com/ProtonMail/go-crypto v0.0.0-20220822140716-1678d6eb0cbe/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= -github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0AE5csawV4YXMNGNQQXvLRps3z2Z59OPO+I= -github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= -github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-contrib/zap v0.0.2 h1:VnIucI+kUsxgzmcrX0gMk19a2I12KirTxi+ufuT2xZk= -github.com/gin-contrib/zap v0.0.2/go.mod h1:2vZj8gTuOYOfottCirxZr9gNM/Q1yk2iSVn15SUVG5A= -github.com/gin-contrib/zap v0.1.0 h1:RMSFFJo34XZogV62OgOzvrlaMNmXrNxmJ3bFmMwl6Cc= -github.com/gin-contrib/zap v0.1.0/go.mod h1:hvnZaPs478H1PGvRP8w89ZZbyJUiyip4ddiI/53WG3o= -github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= -github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0= -github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -github.com/goccy/go-json v0.9.7 h1:IcB+Aqpx/iMHu5Yooh7jEzJk1JZ7Pjtmys2ukPr7EeM= -github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= -github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/whilp/git-urls v1.0.0 h1:95f6UMWN5FKW71ECsXRUd3FVYiXdrE7aX4NZKcPmIjU= -github.com/whilp/git-urls v1.0.0/go.mod h1:J16SAmobsqc3Qcy98brfl5f5+e0clUvg1krgwk/qCfE= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -github.com/xanzy/ssh-agent v0.3.2 h1:eKj4SX2Fe7mui28ZgnFW5fmTz1EIr7ugo5s6wDxdHBM= -github.com/xanzy/ssh-agent v0.3.2/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= -go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= -go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= -go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 h1:wM1k/lXfpc5HdkJJyW9GELpd8ERGdnh8sMGL6Gzq3Ho= -golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/integration_test/main_test.go b/integration_test/main_test.go deleted file mode 100644 index d6132b5..0000000 --- a/integration_test/main_test.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build integration -// +build integration - -package integrationtest_test - -import ( - "os" - "testing" - - "git.front.kjuulh.io/kjuulh/octopush/internal/server" - "go.uber.org/zap" -) - -func MainTest(t *testing.M) { - logger, err := zap.NewDevelopment() - if err != nil { - panic(err) - } - err = server.Start(logger) - if err != nil { - panic(err) - } - - os.Exit(t.Run()) -} diff --git a/integration_test/storage_test.go b/integration_test/storage_test.go deleted file mode 100644 index b77e6b1..0000000 --- a/integration_test/storage_test.go +++ /dev/null @@ -1,74 +0,0 @@ -//go:build integration -// +build integration - -package integrationtest_test - -import ( - "context" - "os" - "path" - "testing" - - "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" - "github.com/stretchr/testify/require" -) - -func TestInitializeStorage(t *testing.T) { - t.Parallel() - storage, cfg := prepareService(t) - err := storage.InitializeStorage(context.Background()) - require.NoError(t, err) - - if _, err := os.Stat(path.Join(cfg.Path, "storage")); os.IsNotExist(err) { - require.NoError(t, err, "could not create storage directory") - } -} - -func TestCleanupStorage(t *testing.T) { - t.Parallel() - storage, _ := prepareService(t) - err := storage.InitializeStorage(context.Background()) - require.NoError(t, err) - - err = storage.CleanupStorage(context.Background()) - require.NoError(t, err) -} - -func TestCreateArea(t *testing.T) { - t.Parallel() - storage, cfg := prepareService(t) - err := storage.InitializeStorage(context.Background()) - require.NoError(t, err) - - area, err := storage.CreateArea(context.Background()) - require.NoError(t, err) - require.NotNil(t, area) - require.NotEmpty(t, area.Path) - require.Contains(t, area.Path, cfg.Path) -} - -func TestRemoveArea(t *testing.T) { - t.Parallel() - storage, _ := prepareService(t) - err := storage.InitializeStorage(context.Background()) - require.NoError(t, err) - area, err := storage.CreateArea(context.Background()) - require.NoError(t, err) - - err = storage.RemoveArea(context.Background(), area) - require.NoError(t, err) - - if _, err := os.Stat(area.Path); os.IsNotExist(err) { - require.Error(t, err, "directory could not be removed") - return - } - t.Fatal("directory could not be removed") -} - -func prepareService(t *testing.T) (*storage.Service, *storage.StorageConfig) { - cfg := &storage.StorageConfig{ - Path: t.TempDir(), - } - - return storage.NewService(cfg), cfg -} diff --git a/internal/actions/action.go b/internal/actions/action.go deleted file mode 100644 index 07b4245..0000000 --- a/internal/actions/action.go +++ /dev/null @@ -1,77 +0,0 @@ -package actions - -import ( - "context" - "errors" - - "git.front.kjuulh.io/kjuulh/octopush/internal/actions/builders" - "git.front.kjuulh.io/kjuulh/octopush/internal/actions/querier" - "git.front.kjuulh.io/kjuulh/octopush/internal/schema" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" - "go.uber.org/zap" -) - -type Action struct { - Schema *schema.OctopushSchema - SchemaPath string -} - -func (a *Action) Execute(ctx context.Context, area *storage.Area) error { - for _, action := range a.Schema.Actions { - switch action.Type { - case "go": - exe, err := builders.NewGo(zap.L()).Build(ctx, a.SchemaPath, action.Entry) - if err != nil { - return err - } - err = exe(ctx, area.Path) - if err != nil { - return err - } - - zap.L().Debug("Execution done") - - case "docker-build": - zap.L().Debug("Building docker-build") - runCmd, err := builders.NewDockerBuild(zap.L()).Build(ctx, a.SchemaPath, action.Entry) - if err != nil { - return err - } - err = runCmd(ctx, area.Path) - if err != nil { - return err - } - return nil - - default: - return errors.New("could not determine action type") - } - } - - return nil -} - -func (a *Action) Query(ctx context.Context, area *storage.Area) ([]string, bool, error) { - for _, query := range a.Schema.Queries { - switch query.Type { - case "grep": - exe, err := querier.NewRipGrep(zap.L()).Build(ctx, a.SchemaPath, query.Query) - if err != nil { - return nil, false, err - } - output, found, err := exe(ctx, area.Path) - if err != nil { - return nil, false, err - } - - zap.L().Debug("Execution done") - - return output, found, nil - - default: - return nil, false, errors.New("could not determine query type") - } - } - - return nil, false, nil -} diff --git a/internal/actions/action_creator.go b/internal/actions/action_creator.go deleted file mode 100644 index 7fe4ef0..0000000 --- a/internal/actions/action_creator.go +++ /dev/null @@ -1,85 +0,0 @@ -package actions - -import ( - "context" - "fmt" - "os" - "path" - "time" - - "git.front.kjuulh.io/kjuulh/octopush/internal/schema" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/providers" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" - "go.uber.org/zap" -) - -type ( - ActionCreatorOps struct { - RepositoryUrl string - Branch string - Path string - } - - ActionCreator struct { - logger *zap.Logger - storage *storage.Service - git *providers.GoGit - } - - ActionCreatorDeps interface { - GetStorageService() *storage.Service - GetGitProvider() *providers.GoGit - } -) - -func NewActionCreator(logger *zap.Logger, deps ActionCreatorDeps) *ActionCreator { - return &ActionCreator{ - logger: logger, - storage: deps.GetStorageService(), - git: deps.GetGitProvider(), - } -} - -func (ac *ActionCreator) Prepare(ctx context.Context, ops *ActionCreatorOps) (*Action, error) { - area, err := ac.storage.CreateArea(ctx) - if err != nil { - ac.logger.Error("failed to allocate area", zap.Error(err)) - return nil, err - } - - cloneCtx, _ := context.WithTimeout(ctx, time.Second*10) - _, err = ac.git.CloneBranch(cloneCtx, area, ops.RepositoryUrl, ops.Branch) - if err != nil { - ac.logger.Error("could not clone repo", zap.Error(err)) - return nil, err - } - - executorUrl := path.Join(area.Path, ops.Path) - if _, err = os.Stat(executorUrl); os.IsNotExist(err) { - return nil, fmt.Errorf("path is invalid: %s", ops.Path) - } - - contents, err := os.ReadFile(path.Join(executorUrl, "octopush.yml")) - if err != nil { - return nil, err - } - - octopushSchema, err := schema.Unmarshal(string(contents)) - if err != nil { - return nil, err - } - - ac.logger.Debug("Action creator done") - return &Action{ - Schema: octopushSchema, - SchemaPath: executorUrl, - }, nil -} - -func (ac *ActionCreator) Cleanup(ctx context.Context, area *storage.Area) { - ac.logger.Debug("Removing area", zap.String("path", area.Path)) - err := ac.storage.RemoveArea(ctx, area) - if err != nil { - panic(err) - } -} diff --git a/internal/actions/builders/docker.go b/internal/actions/builders/docker.go deleted file mode 100644 index ae11be7..0000000 --- a/internal/actions/builders/docker.go +++ /dev/null @@ -1,95 +0,0 @@ -package builders - -import ( - "context" - "crypto/rand" - "encoding/hex" - "errors" - "fmt" - "os" - "os/exec" - - "go.uber.org/zap" - "go.uber.org/zap/zapio" -) - -type DockerBuild struct { - logger *zap.Logger -} - -func NewDockerBuild(logger *zap.Logger) *DockerBuild { - return &DockerBuild{logger: logger} -} - -type DockerRunCommand func(ctx context.Context, victimPath string) error - -func (g *DockerBuild) Build(ctx context.Context, modulePath, entryPath string) (DockerRunCommand, error) { - g.logger.Debug("Building docker image", zap.String("actiondir", modulePath), zap.String("entry", entryPath)) - - if _, err := os.Stat(fmt.Sprintf("%s/%s", modulePath, entryPath)); os.IsNotExist(err) { - return nil, errors.New("could not find entry") - } - - b := make([]byte, 20) - _, err := rand.Reader.Read(b) - if err != nil { - return nil, err - } - tag := hex.EncodeToString(b) - buildDockerCmd := fmt.Sprintf("(cd %s; docker build -f %s --tag octopush/%s .)", modulePath, entryPath, tag) - g.logger.Debug("Running command", zap.String("command", buildDockerCmd)) - - cmd := exec.CommandContext( - ctx, - "/bin/bash", - "-c", - buildDockerCmd, - ) - - debugwriter := &zapio.Writer{ - Log: g.logger, - Level: zap.DebugLevel, - } - defer debugwriter.Close() - - cmd.Stdout = debugwriter - cmd.Stderr = debugwriter - err = cmd.Start() - if err != nil { - return nil, err - } - - err = cmd.Wait() - if err != nil { - return nil, err - } - - g.logger.Debug("Docker image built!") - - return func(ctx context.Context, victimPath string) error { - g.logger.Debug("Executing script", zap.String("victim", victimPath)) - - cmd := exec.CommandContext( - ctx, - "/bin/bash", - "-c", - fmt.Sprintf("docker run --rm -v %s/:/src/work/ octopush/%s", victimPath, tag), - ) - - runDockerWriter := &zapio.Writer{ - Log: g.logger, - Level: zap.DebugLevel, - } - defer runDockerWriter.Close() - - cmd.Stdout = runDockerWriter - cmd.Stderr = runDockerWriter - - err = cmd.Start() - if err != nil { - return err - } - - return cmd.Wait() - }, nil -} diff --git a/internal/actions/builders/go.go b/internal/actions/builders/go.go deleted file mode 100644 index 6d828ee..0000000 --- a/internal/actions/builders/go.go +++ /dev/null @@ -1,46 +0,0 @@ -package builders - -import ( - "context" - "errors" - "fmt" - "os" - "os/exec" - - "go.uber.org/zap" -) - -type Go struct { - logger *zap.Logger -} - -func NewGo(logger *zap.Logger) *Go { - return &Go{logger: logger} -} - -type GoExecutable func(ctx context.Context, victimPath string) error - -func (g *Go) Build(ctx context.Context, modulePath, entryPath string) (GoExecutable, error) { - g.logger.Debug("Building go binary", zap.String("actiondir", modulePath), zap.String("entry", entryPath)) - - if _, err := os.Stat(fmt.Sprintf("%s/%s", modulePath, entryPath)); os.IsNotExist(err) { - return nil, errors.New("could not find entry") - } - - err := exec.CommandContext( - ctx, - "/bin/bash", - "-c", - fmt.Sprintf("(cd %s; go build -o main %s)", modulePath, entryPath), - ).Run() - if err != nil { - return nil, err - } - - g.logger.Debug("Go binary built!") - - return func(ctx context.Context, victimPath string) error { - g.logger.Debug("Executing script", zap.String("victim", victimPath)) - return exec.CommandContext(ctx, "/bin/bash", "-c", fmt.Sprintf("(cd %s; %s/main)", victimPath, modulePath)).Run() - }, nil -} diff --git a/internal/actions/querier/ripgrep.go b/internal/actions/querier/ripgrep.go deleted file mode 100644 index 99a415b..0000000 --- a/internal/actions/querier/ripgrep.go +++ /dev/null @@ -1,106 +0,0 @@ -package querier - -import ( - "context" - "fmt" - "io" - "os/exec" - "strings" - - "go.uber.org/zap" - "go.uber.org/zap/zapio" -) - -type RipGrep struct { - logger *zap.Logger -} - -func NewRipGrep(logger *zap.Logger) *RipGrep { - return &RipGrep{logger: logger} -} - -type RipGrepCommand func(ctx context.Context, victimPath string) ([]string, bool, error) - -func (g *RipGrep) Build(ctx context.Context, modulePath, query string) (RipGrepCommand, error) { - g.logger.Debug("Pulling docker image", zap.String("actiondir", modulePath), zap.String("query", query)) - - pullDockerImage := "docker pull mbologna/docker-ripgrep" - g.logger.Debug("Running command", zap.String("command", pullDockerImage)) - - cmd := exec.CommandContext( - ctx, - "/bin/bash", - "-c", - pullDockerImage, - ) - - debugwriter := &zapio.Writer{ - Log: g.logger, - Level: zap.DebugLevel, - } - defer debugwriter.Close() - - cmd.Stdout = debugwriter - cmd.Stderr = debugwriter - err := cmd.Start() - if err != nil { - return nil, err - } - - err = cmd.Wait() - if err != nil { - return nil, err - } - - g.logger.Debug("Docker image pulled") - - return func(ctx context.Context, victimPath string) ([]string, bool, error) { - g.logger.Debug("Executing script", zap.String("victim", victimPath)) - - runRipGrepCmd := fmt.Sprintf("docker run --rm -v %s/:/data:ro mbologna/docker-ripgrep rg -i '%s' || true", victimPath, query) - - g.logger.Debug("Execute ripgrep query", zap.String("command", runRipGrepCmd)) - - cmd := exec.CommandContext( - ctx, - "/bin/bash", - "-c", - runRipGrepCmd, - ) - - runDockerWriter := &zapio.Writer{ - Log: g.logger, - Level: zap.DebugLevel, - } - defer runDockerWriter.Close() - - builder := &strings.Builder{} - combinedWriter := io.MultiWriter(runDockerWriter, builder) - - cmd.Stdout = combinedWriter - cmd.Stderr = combinedWriter - - err = cmd.Start() - if err != nil { - return nil, false, err - } - - err = cmd.Wait() - if err != nil { - return nil, false, err - } - - contents := strings.Split(builder.String(), "\n") - validatedOutput := make([]string, 0) - - for _, c := range contents { - if !strings.Contains(c, "WARNING:") { - validatedOutput = append(validatedOutput, c) - } - } - - found := len(validatedOutput) > 0 - - return validatedOutput, found, nil - }, nil -} diff --git a/internal/api/health.go b/internal/api/health.go deleted file mode 100644 index 3373220..0000000 --- a/internal/api/health.go +++ /dev/null @@ -1,16 +0,0 @@ -package api - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -func HealthRoute(app *gin.Engine) { - healthRoute := app.Group("/health") - healthRoute.GET("/ready", func(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{ - "message": "healthy", - }) - }) -} diff --git a/internal/api/process_command.go b/internal/api/process_command.go deleted file mode 100644 index b067615..0000000 --- a/internal/api/process_command.go +++ /dev/null @@ -1,44 +0,0 @@ -package api - -import ( - "context" - "net/http" - - "git.front.kjuulh.io/kjuulh/octopush/internal/commands" - "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/jobs" - "github.com/gin-gonic/gin" - "github.com/google/uuid" - "go.uber.org/zap" -) - -func CommandRoute(logger *zap.Logger, app *gin.Engine, deps *serverdeps.ServerDeps) { - commandRoute := app.Group("commands") - commandRoute.POST("processRepos", func(c *gin.Context) { - type processReposRequest struct { - Repository string `json:"repository"` - Branch string `json:"branch"` - Path string `json:"path"` - } - var request processReposRequest - err := c.BindJSON(&request) - if err != nil { - logger.Info("could not bind request", zap.String("request", "processRepo"), zap.Error(err)) - c.AbortWithStatus(http.StatusBadRequest) - return - } - - jobId := uuid.New().String() - - go func(repository string, branch string, path string, jobId string) { - ctx := context.WithValue(context.Background(), jobs.JobId{}, jobId) - processRepos := commands.NewProcessRepos(logger, deps) - err = processRepos.Process(ctx, repository, branch, path) - if err != nil { - logger.Error("could not process repo", zap.Error(err)) - } - }(request.Repository, request.Branch, request.Path, jobId) - - c.Status(http.StatusAccepted) - }) -} diff --git a/internal/api/root.go b/internal/api/root.go deleted file mode 100644 index c4f36a4..0000000 --- a/internal/api/root.go +++ /dev/null @@ -1,12 +0,0 @@ -package api - -import ( - "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" - "github.com/gin-gonic/gin" - "go.uber.org/zap" -) - -func BuildApi(logger *zap.Logger, app *gin.Engine, deps *serverdeps.ServerDeps) { - HealthRoute(app) - CommandRoute(logger, app, deps) -} diff --git a/internal/cli/cli.go b/internal/cli/cli.go deleted file mode 100644 index d128ad9..0000000 --- a/internal/cli/cli.go +++ /dev/null @@ -1,30 +0,0 @@ -package cli - -import ( - "context" - - "git.front.kjuulh.io/kjuulh/curre" - "git.front.kjuulh.io/kjuulh/octopush/internal/server" - "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/signer" - "go.uber.org/zap" -) - -func Start(ctx context.Context, logger *zap.Logger) (*serverdeps.ServerDeps, curre.CleanupFunc, error) { - deps := serverdeps.NewServerDeps(logger) - - readyChan := make(chan curre.ComponentsAreReady, 1) - - cleanupFunc, err := curre.NewManager(). - Register( - server.NewStorageServer(logger.With(zap.Namespace("storage")), deps), - ). - Register( - signer.NewOpenPGPApp(deps.GetOpenPGP()), - ). - RunNonBlocking(ctx, readyChan) - - <-readyChan - - return deps, cleanupFunc, err -} diff --git a/internal/commands/process_repos.go b/internal/commands/process_repos.go deleted file mode 100644 index 316298e..0000000 --- a/internal/commands/process_repos.go +++ /dev/null @@ -1,241 +0,0 @@ -package commands - -import ( - "context" - "fmt" - "strings" - "sync" - "time" - - "git.front.kjuulh.io/kjuulh/octopush/internal/actions" - "git.front.kjuulh.io/kjuulh/octopush/internal/gitproviders" - "git.front.kjuulh.io/kjuulh/octopush/internal/schema" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/providers" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" - giturls "github.com/whilp/git-urls" - "go.uber.org/zap" -) - -type ( - ProcessRepos struct { - logger *zap.Logger - storage *storage.Service - git *providers.GoGit - actionCreator *actions.ActionCreator - gitea *gitproviders.Gitea - } - - ProcessReposDeps interface { - GetStorageService() *storage.Service - GetGitProvider() *providers.GoGit - GetActionCreator() *actions.ActionCreator - GetGitea() *gitproviders.Gitea - } -) - -func NewProcessRepos(logger *zap.Logger, deps ProcessReposDeps) *ProcessRepos { - return &ProcessRepos{ - logger: logger, - storage: deps.GetStorageService(), - git: deps.GetGitProvider(), - actionCreator: deps.GetActionCreator(), - gitea: deps.GetGitea(), - } -} - -func (pr *ProcessRepos) Process(ctx context.Context, repository string, branch string, actionPath string) error { - action, err := pr.actionCreator.Prepare(ctx, &actions.ActionCreatorOps{ - RepositoryUrl: repository, - Branch: branch, - Path: actionPath, - }) - if err != nil { - return err - } - - repositoryUrls, err := pr.getRepoUrls(ctx, action.Schema) - if err != nil { - return err - } - - wg := sync.WaitGroup{} - wg.Add(len(repositoryUrls)) - - for _, repoUrl := range repositoryUrls { - go func(ctx context.Context, repoUrl string) { - defer func() { - wg.Done() - }() - err := pr.processRepo(ctx, repoUrl, action) - if err != nil { - pr.logger.Error("could not process repo", zap.Error(err)) - } - }(ctx, repoUrl) - } - - wg.Wait() - pr.logger.Debug("finished processing all repos", zap.Strings("repos", repositoryUrls)) - - return nil -} - -func (pr *ProcessRepos) getRepoUrls(ctx context.Context, schema *schema.OctopushSchema) ([]string, error) { - repoUrls := make([]string, 0) - - repoUrls = append(repoUrls, schema.Select.Repositories...) - - for _, provider := range schema.Select.Providers { - repos, err := pr.gitea.ListRepositoriesForOrganization(ctx, provider.Gitea, provider.Organisation) - if err != nil { - return nil, err - } - - repoUrls = append(repoUrls, repos...) - } - - return repoUrls, nil -} - -func (pr *ProcessRepos) processRepo(ctx context.Context, repoUrl string, action *actions.Action) error { - cleanup, area, err := pr.prepareAction(ctx) - defer func() { - if cleanup != nil { - cleanup(ctx) - } - }() - if err != nil { - return err - } - - repo, err := pr.clone(ctx, area, repoUrl) - if err != nil { - return err - } - - if len(action.Schema.Queries) > 0 { - result, found, err := action.Query(ctx, area) - if err != nil { - return err - } - - if found { - pr.logger.Info("Query result", zap.Strings("result", result)) - // TODO: Append to real result, and return together - } - } - - if len(action.Schema.Actions) > 0 { - err = action.Execute(ctx, area) - if err != nil { - return err - } - - err = pr.commit(ctx, area, repo, repoUrl) - if err != nil { - return err - } - } - - pr.logger.Debug("processing done", zap.String("path", area.Path), zap.String("repoUrl", repoUrl)) - - return nil -} - -func (pr *ProcessRepos) prepareAction( - ctx context.Context, -) (func(ctx context.Context), *storage.Area, error) { - pr.logger.Debug("Creating area") - area, err := pr.storage.CreateArea(ctx) - if err != nil { - return nil, nil, err - } - - cleanupfunc := func(ctx context.Context) { - pr.logger.Debug("Removing area", zap.String("path", area.Path)) - err = pr.storage.RemoveArea(ctx, area) - if err != nil { - panic(err) - } - } - - return cleanupfunc, area, nil -} - -func (pr *ProcessRepos) clone(ctx context.Context, area *storage.Area, repoUrl string) (*providers.GoGitRepo, error) { - pr.logger.Debug("Cloning repo", zap.String("path", area.Path), zap.String("repoUrl", repoUrl)) - cloneCtx, _ := context.WithTimeout(ctx, time.Second*5) - repo, err := pr.git.Clone(cloneCtx, area, repoUrl) - if err != nil { - return nil, err - } - - err = pr.git.CreateBranch(ctx, repo) - if err != nil { - return nil, err - } - - return repo, nil -} - -func (pr *ProcessRepos) commit(ctx context.Context, area *storage.Area, repo *providers.GoGitRepo, repoUrl string) error { - wt, err := pr.git.Add(ctx, area, repo) - if err != nil { - return fmt.Errorf("could not add file: %w", err) - } - - status, err := wt.Status() - if err != nil { - return err - } - - if status.IsClean() { - // TODO: check for pr - pr.logger.Info("Returning early, as no modifications are detected") - //return nil - } - - err = pr.git.Commit(ctx, repo) - if err != nil { - return fmt.Errorf("could not get diff: %w", err) - } - - dryrun := false - if !dryrun { - - err = pr.git.Push(ctx, repo) - if err != nil { - return fmt.Errorf("could not push to repo: %w", err) - } - - url, err := giturls.Parse(repoUrl) - if err != nil { - return err - } - - head, err := repo.GetHEAD() - if err != nil { - return err - } - - path := strings.Split(url.Path, "/") - pr.logger.Debug("path string", zap.Strings("paths", path), zap.String("HEAD", head)) - - org := path[0] - repoName := path[1] - semanticName, _, ok := strings.Cut(repoName, ".") - if !ok { - semanticName = repoName - } - - originHead, err := pr.git.GetOriginHEADForRepo(ctx, repo) - if err != nil { - return err - } - - err = pr.gitea.CreatePr(ctx, fmt.Sprintf("%s://%s", "https", url.Host), org, semanticName, head, originHead, "octopush-apply") - if err != nil { - return err - } - } - return nil -} diff --git a/internal/gitproviders/gitea.go b/internal/gitproviders/gitea.go deleted file mode 100644 index fcc277a..0000000 --- a/internal/gitproviders/gitea.go +++ /dev/null @@ -1,143 +0,0 @@ -package gitproviders - -import ( - "context" - "errors" - "fmt" - "os" - "sync" - - "code.gitea.io/sdk/gitea" - "go.uber.org/zap" -) - -type Gitea struct { - logger *zap.Logger - giteamu sync.Mutex - giteaClients map[string]*gitea.Client -} - -func NewGitea(logger *zap.Logger) *Gitea { - return &Gitea{ - logger: logger, - giteamu: sync.Mutex{}, - giteaClients: make(map[string]*gitea.Client, 0), - } -} - -func (g *Gitea) ListRepositoriesForOrganization( - ctx context.Context, - server string, - organization string, -) ([]string, error) { - client, err := g.getOrCreateClient(ctx, server) - if err != nil { - return nil, err - } - - g.logger.Debug("Listing repos for gitea", zap.String("server", server)) - repos, resp, err := client.ListOrgRepos(organization, gitea.ListOrgReposOptions{ - ListOptions: gitea.ListOptions{ - Page: 0, - PageSize: 20, - }, - }) - if err != nil { - return nil, fmt.Errorf("could not list repos: %w", err) - } - - if resp.StatusCode >= 300 { - return nil, fmt.Errorf("gitea responded with a non 200 status code (gitea response: %s)", resp.Status) - } - - repoUrls := make([]string, len(repos)) - for i, repo := range repos { - repoUrls[i] = repo.SSHURL - } - - return repoUrls, err -} - -func (g *Gitea) CreatePr( - ctx context.Context, - server string, - organization string, - repository string, - head string, - base string, - actionName string, -) error { - client, err := g.getOrCreateClient(ctx, server) - if err != nil { - return err - } - - prs, _, err := client.ListRepoPullRequests(organization, repository, gitea.ListPullRequestsOptions{ - ListOptions: gitea.ListOptions{ - Page: 0, - PageSize: 30, - }, - State: gitea.StateOpen, - Sort: "recentupdate", - Milestone: 0, - }) - if err != nil { - return fmt.Errorf( - "could not list repos, needed because we need to check for conflicts. Original error: %w", - err, - ) - } - for _, pr := range prs { - if pr.Head.Name == head { - g.logger.Info( - "returning early from creating pull-request, as it already exists.", - zap.String("repository", repository), - zap.String("pull-request", pr.URL), - ) - return nil - } - } - - pr, _, err := client.CreatePullRequest(organization, repository, gitea.CreatePullRequestOption{ - Head: head, - Base: base, - Title: actionName, - }) - if err != nil { - return err - } - - g.logger.Debug( - "Created pr", - zap.String("repository", repository), - zap.String("branch", head), - zap.String("pull-request", pr.URL), - ) - - return nil -} - -func (g *Gitea) getOrCreateClient(ctx context.Context, server string) (*gitea.Client, error) { - g.giteamu.Lock() - defer g.giteamu.Unlock() - client, ok := g.giteaClients[server] - if !ok || client == nil { - c, err := gitea.NewClient(server) - username, ok := os.LookupEnv("GITEA_USERNAME") - if !ok { - return nil, errors.New("missing environment variable GITEA_USERNAME") - } - apitoken, ok := os.LookupEnv("GITEA_API_TOKEN") - if !ok { - return nil, errors.New("missing environment variable GITEA_API_TOKEN") - } - c.SetBasicAuth(username, apitoken) - if err != nil { - return nil, err - } - g.giteaClients[server] = c - return c, nil - } - - return client, nil -} diff --git a/internal/logger/zap.go b/internal/logger/zap.go deleted file mode 100644 index b3b10c9..0000000 --- a/internal/logger/zap.go +++ /dev/null @@ -1,33 +0,0 @@ -package logger - -import ( - "os" - - "go.uber.org/zap" - "go.uber.org/zap/zapcore" -) - -func New() (*zap.Logger, error) { - highPriority := zap.LevelEnablerFunc(func(lvl zapcore.Level) bool { - return lvl >= zapcore.ErrorLevel - }) - lowPriority := zap.LevelEnablerFunc(func(lvl zapcore.Level) bool { - return lvl < zapcore.ErrorLevel // && lvl > zapcore.DebugLevel - }) - - config := zap.NewDevelopmentEncoderConfig() - config.EncodeTime = nil - config.EncodeLevel = zapcore.CapitalColorLevelEncoder - consoleEncoder := zapcore.NewConsoleEncoder(config) - consoleDebugging := zapcore.Lock(os.Stdout) - consoleErrors := zapcore.Lock(os.Stderr) - - core := zapcore.NewTee( - zapcore.NewCore(consoleEncoder, consoleErrors, highPriority), - zapcore.NewCore(consoleEncoder, consoleDebugging, lowPriority), - ) - - logger := zap.New(core) - - return logger, nil -} diff --git a/internal/schema/kraken.go b/internal/schema/kraken.go deleted file mode 100644 index afa6f2d..0000000 --- a/internal/schema/kraken.go +++ /dev/null @@ -1,32 +0,0 @@ -package schema - -import "gopkg.in/yaml.v3" - -type OctopushSchema struct { - ApiVersion string `yaml:"apiVersion"` - Name string `yaml:"name"` - Select struct { - Repositories []string `yaml:"repositories"` - Providers []struct { - Gitea string `yaml:"gitea"` - Organisation string `yaml:"organisation"` - } `yaml:"providers"` - } `yaml:"select"` - Actions []struct { - Type string `yaml:"type"` - Entry string `yaml:"entry"` - } `yaml:"actions"` - Queries []struct { - Type string `yaml:"type"` - Query string `yaml:"query"` - } `yaml:"queries"` -} - -func Unmarshal(raw string) (*OctopushSchema, error) { - k := &OctopushSchema{} - err := yaml.Unmarshal([]byte(raw), k) - if err != nil { - return nil, err - } - return k, nil -} diff --git a/internal/server/http_server.go b/internal/server/http_server.go deleted file mode 100644 index b367049..0000000 --- a/internal/server/http_server.go +++ /dev/null @@ -1,54 +0,0 @@ -package server - -import ( - "context" - "errors" - "net/http" - "time" - - "git.front.kjuulh.io/kjuulh/curre" - "git.front.kjuulh.io/kjuulh/octopush/internal/api" - "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" - ginzap "github.com/gin-contrib/zap" - "github.com/gin-gonic/gin" - "go.uber.org/zap" -) - -func NewGinHttpServer(logger *zap.Logger, deps *serverdeps.ServerDeps) curre.Component { - var app *gin.Engine - var server *http.Server - - return curre.NewFunctionalComponent(&curre.FunctionalComponent{ - InitFunc: func(_ *curre.FunctionalComponent, _ context.Context) error { - app = gin.New() - app.UseH2C = true - app.Use(ginzap.Ginzap(logger, time.RFC3339, true)) - app.Use(ginzap.RecoveryWithZap(logger, true)) - - api.BuildApi(logger, app, deps) - - server = &http.Server{ - Addr: "127.0.0.1:3000", - Handler: app, - } - - return nil - }, - StartFunc: func(_ *curre.FunctionalComponent, _ context.Context) error { - if server != nil { - err := server.ListenAndServe() - if err != nil && !errors.Is(err, http.ErrServerClosed) { - return err - } - } - return nil - }, - StopFunc: func(_ *curre.FunctionalComponent, ctx context.Context) error { - ctx, _ = context.WithTimeout(ctx, time.Second*10) - if server != nil { - server.Shutdown(ctx) - } - return nil - }, - }) -} diff --git a/internal/server/server.go b/internal/server/server.go deleted file mode 100644 index cc946eb..0000000 --- a/internal/server/server.go +++ /dev/null @@ -1,22 +0,0 @@ -package server - -import ( - "context" - - "git.front.kjuulh.io/kjuulh/curre" - "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/signer" - "go.uber.org/zap" -) - -func Start(logger *zap.Logger) error { - ctx := context.Background() - - deps := serverdeps.NewServerDeps(logger) - - return curre.NewManager(). - Register(NewGinHttpServer(logger.With(zap.Namespace("ginHttpServer")), deps)). - Register(NewStorageServer(logger.With(zap.Namespace("storageServer")), deps)). - Register(signer.NewOpenPGPApp(deps.GetOpenPGP())). - Run(ctx) -} diff --git a/internal/server/storage_server.go b/internal/server/storage_server.go deleted file mode 100644 index 9a18493..0000000 --- a/internal/server/storage_server.go +++ /dev/null @@ -1,28 +0,0 @@ -package server - -import ( - "context" - "time" - - "git.front.kjuulh.io/kjuulh/curre" - "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" - "go.uber.org/zap" -) - -func NewStorageServer(logger *zap.Logger, deps *serverdeps.ServerDeps) curre.Component { - storage := deps.GetStorageService() - return curre.NewFunctionalComponent(&curre.FunctionalComponent{ - InitFunc: func(_ *curre.FunctionalComponent, ctx context.Context) error { - logger.Debug("Initializing storage") - return storage.InitializeStorage(ctx) - }, - StartFunc: func(fc *curre.FunctionalComponent, ctx context.Context) error { - return nil - }, - StopFunc: func(_ *curre.FunctionalComponent, ctx context.Context) error { - logger.Debug("Cleaning up storage") - ctx, _ = context.WithTimeout(ctx, time.Second*10) - return storage.CleanupStorage(ctx) - }, - }) -} diff --git a/internal/serverdeps/server_deps.go b/internal/serverdeps/server_deps.go deleted file mode 100644 index f52a88c..0000000 --- a/internal/serverdeps/server_deps.go +++ /dev/null @@ -1,74 +0,0 @@ -package serverdeps - -import ( - actionc "git.front.kjuulh.io/kjuulh/octopush/internal/actions" - "git.front.kjuulh.io/kjuulh/octopush/internal/gitproviders" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/actions" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/providers" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/signer" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" - "go.uber.org/zap" -) - -type ServerDeps struct { - logger *zap.Logger - - storageConfig *storage.StorageConfig - gitCfg *providers.GitConfig - - openPGP *signer.OpenPGP -} - -func NewServerDeps(logger *zap.Logger) *ServerDeps { - deps := &ServerDeps{ - logger: logger.With(zap.Namespace("serverdeps")), - } - - if storageCfg, err := storage.NewDefaultStorageConfig(); err != nil { - panic(err) - } else { - deps.storageConfig = storageCfg - } - - deps.gitCfg = &providers.GitConfig{ - AuthOption: providers.GIT_AUTH_SSH, - User: "git", - Password: "", - AccessToken: "", - SshPublicKeyFilePath: "/Users/kah/.ssh/id_ed25519", - SshPrivateKeyPassword: "", - } - - openPGPConfig := &signer.OpenPgpConfig{ - PrivateKeyFilePath: "./example/testkey.private.pgp", - PrivateKeyPassword: "somepassword", - PrivateKeyIdentity: "kraken@kasperhermansen.com", - } - deps.openPGP = signer.NewOpenPGP(logger.With(zap.Namespace("openpgp")), openPGPConfig) - - return deps -} - -func (deps *ServerDeps) GetStorageService() *storage.Service { - return storage.NewService(deps.logger.With(zap.Namespace("storage")), deps.storageConfig) -} - -func (deps *ServerDeps) GetGitProvider() *providers.GoGit { - return providers.NewGit(deps.logger.With(zap.Namespace("gitProvider")), deps.gitCfg, deps.openPGP) -} - -func (deps *ServerDeps) GetAction() *actions.Action { - return actions.NewAction(deps.logger.With(zap.Namespace("action"))) -} - -func (deps *ServerDeps) GetActionCreator() *actionc.ActionCreator { - return actionc.NewActionCreator(deps.logger.With(zap.Namespace("action")), deps) -} - -func (deps *ServerDeps) GetGitea() *gitproviders.Gitea { - return gitproviders.NewGitea(deps.logger.With(zap.Namespace("gitea"))) -} - -func (deps *ServerDeps) GetOpenPGP() *signer.OpenPGP { - return deps.openPGP -} diff --git a/internal/services/actions/action.go b/internal/services/actions/action.go deleted file mode 100644 index c711b47..0000000 --- a/internal/services/actions/action.go +++ /dev/null @@ -1,43 +0,0 @@ -package actions - -import ( - "context" - - "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" - "go.uber.org/zap" -) - -type Predicate func(ctx context.Context, area *storage.Area) (bool, error) -type ActionFunc func(ctx context.Context, area *storage.Area) error - -type Action struct { - logger *zap.Logger -} - -func NewAction(logger *zap.Logger) *Action { - return &Action{logger: logger} -} - -func (a *Action) Run(ctx context.Context, area *storage.Area, predicate Predicate, action ActionFunc, dryrun bool) error { - matches, err := predicate(ctx, area) - if err != nil { - return err - } - - if !matches { - a.logger.Debug("repo doesn't match, skipping", zap.String("path", area.Path)) - return nil - } - - if dryrun { - a.logger.Panic("dryrun selected, but not implemented yet") - return nil - } - - err = action(ctx, area) - if err != nil { - return err - } - - return nil -} diff --git a/internal/services/jobs/models.go b/internal/services/jobs/models.go deleted file mode 100644 index 1dea285..0000000 --- a/internal/services/jobs/models.go +++ /dev/null @@ -1,4 +0,0 @@ -package jobs - -type JobId struct { -} diff --git a/internal/services/providers/git.go b/internal/services/providers/git.go deleted file mode 100644 index cf2a3ba..0000000 --- a/internal/services/providers/git.go +++ /dev/null @@ -1 +0,0 @@ -package providers diff --git a/internal/services/providers/gogit.go b/internal/services/providers/gogit.go deleted file mode 100644 index 3e1eacd..0000000 --- a/internal/services/providers/gogit.go +++ /dev/null @@ -1,339 +0,0 @@ -package providers - -import ( - "context" - "errors" - "fmt" - "time" - - "git.front.kjuulh.io/kjuulh/octopush/internal/services/signer" - "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" - "github.com/go-git/go-git/v5" - "github.com/go-git/go-git/v5/config" - "github.com/go-git/go-git/v5/plumbing" - "github.com/go-git/go-git/v5/plumbing/object" - "github.com/go-git/go-git/v5/plumbing/transport" - "github.com/go-git/go-git/v5/plumbing/transport/http" - "github.com/go-git/go-git/v5/plumbing/transport/ssh" - "go.uber.org/zap" - "go.uber.org/zap/zapio" -) - -// GoGit is a native git provider, it can clone, pull -// , push and as in abstraction on native git operations -type GoGit struct { - logger *zap.Logger - gitConfig *GitConfig - openPGP *signer.OpenPGP -} - -type GoGitRepo struct { - repo *git.Repository -} - -func (gr *GoGitRepo) GetHEAD() (string, error) { - head, err := gr.repo.Head() - if err != nil { - return "", err - } - - return head.Name().Short(), nil -} - -type GitAuth string - -const ( - GIT_AUTH_SSH GitAuth = "ssh" - GIT_AUTH_USERNAME_PASSWORD GitAuth = "username_password" - GIT_AUTH_ACCESS_TOKEN GitAuth = "access_token" - GIT_AUTH_ANONYMOUS GitAuth = "anonymous" - GIT_AUTH_SSH_AGENT GitAuth = "ssh_agent" -) - -type GitConfig struct { - AuthOption GitAuth - User string - Password string - AccessToken string - SshPublicKeyFilePath string - SshPrivateKeyPassword string -} - -func NewGit(logger *zap.Logger, gitConfig *GitConfig, openPGP *signer.OpenPGP) *GoGit { - return &GoGit{logger: logger, gitConfig: gitConfig, openPGP: openPGP} -} - -func (g *GoGit) GetOriginHEADForRepo(ctx context.Context, gitRepo *GoGitRepo) (string, error) { - auth, err := g.GetAuth() - if err != nil { - return "", err - } - - remote, err := gitRepo.repo.Remote("origin") - if err != nil { - return "", err - } - - refs, err := remote.ListContext(ctx, &git.ListOptions{ - Auth: auth, - }) - if err != nil { - return "", err - } - - headRef := "" - for _, ref := range refs { - //g.logger.Debug(ref.String()) - if ref.Target().IsBranch() { - headRef = ref.Target().Short() - } - } - - if headRef == "" { - return "", errors.New("no upstream HEAD branch could be found") - } - - return headRef, nil -} - -func (g *GoGit) CloneBranch(ctx context.Context, storageArea *storage.Area, repoUrl string, branch string) (*GoGitRepo, error) { - g.logger.Debug( - "cloning repository", - zap.String("repoUrl", repoUrl), - zap.String("path", storageArea.Path), - ) - - auth, err := g.GetAuth() - if err != nil { - return nil, err - } - - cloneOptions := git.CloneOptions{ - URL: repoUrl, - Auth: auth, - RemoteName: "origin", - ReferenceName: plumbing.NewBranchReferenceName(branch), - SingleBranch: false, - NoCheckout: false, - Depth: 1, - RecurseSubmodules: 1, - Progress: g.getProgressWriter(), - Tags: 0, - InsecureSkipTLS: false, - CABundle: []byte{}, - } - - repo, err := git.PlainCloneContext(ctx, storageArea.Path, false, &cloneOptions) - if err != nil && !errors.Is(err, git.NoErrAlreadyUpToDate) { - return nil, err - } - - g.logger.Debug("done cloning repo") - - return &GoGitRepo{repo: repo}, nil -} - -func (g *GoGit) Clone(ctx context.Context, storageArea *storage.Area, repoUrl string) (*GoGitRepo, error) { - g.logger.Debug( - "cloning repository", - zap.String("repoUrl", repoUrl), - zap.String("path", storageArea.Path), - ) - - auth, err := g.GetAuth() - if err != nil { - return nil, err - } - - cloneOptions := git.CloneOptions{ - URL: repoUrl, - Auth: auth, - RemoteName: "origin", - ReferenceName: "", - SingleBranch: false, - NoCheckout: false, - Depth: 1, - RecurseSubmodules: 1, - Progress: g.getProgressWriter(), - Tags: 0, - InsecureSkipTLS: false, - CABundle: []byte{}, - } - - repo, err := git.PlainCloneContext(ctx, storageArea.Path, false, &cloneOptions) - if err != nil { - return nil, err - } - - g.logger.Debug("done cloning repo") - - return &GoGitRepo{repo: repo}, nil -} - -func (g *GoGit) getProgressWriter() *zapio.Writer { - return &zapio.Writer{ - Log: g.logger.With(zap.String("process", "go-git")), - Level: zap.DebugLevel, - } -} - -func (g *GoGit) Add(ctx context.Context, storageArea *storage.Area, gitRepo *GoGitRepo) (*git.Worktree, error) { - worktree, err := gitRepo.repo.Worktree() - if err != nil { - return nil, err - } - - err = worktree.AddWithOptions(&git.AddOptions{ - All: true, - }) - if err != nil { - return nil, err - } - - status, err := worktree.Status() - if err != nil { - return nil, err - } - - g.logger.Debug("git status", zap.String("status", status.String())) - - return worktree, nil -} - -func (g *GoGit) CreateBranch(ctx context.Context, gitRepo *GoGitRepo) error { - worktree, err := gitRepo.repo.Worktree() - if err != nil { - return err - } - - refSpec := plumbing.NewBranchReferenceName("octopush-apply") - err = gitRepo.repo.CreateBranch(&config.Branch{ - Name: "octopush-apply", - Remote: "origin", - Merge: refSpec, - Rebase: "", - }) - if err != nil { - return fmt.Errorf("could not create branch: %w", err) - } - - err = worktree.Checkout(&git.CheckoutOptions{ - Branch: plumbing.ReferenceName(refSpec.String()), - Create: true, - Force: false, - Keep: false, - }) - if err != nil { - return fmt.Errorf("could not checkout branch: %w", err) - } - - //remoteRef := plumbing.NewRemoteReferenceName("origin", "octopush-apply") - //ref := plumbing.NewSymbolicReference(refSpec, remoteRef) - //err = gitRepo.repo.Storer.SetReference(ref) - //if err != nil { - // return fmt.Errorf("could not set reference: %w", err) - //} - - auth, err := g.GetAuth() - if err != nil { - return err - } - - err = worktree.PullContext(ctx, &git.PullOptions{ - RemoteName: "origin", - ReferenceName: "", - SingleBranch: false, - Depth: 1, - Auth: auth, - RecurseSubmodules: 1, - Progress: g.getProgressWriter(), - Force: true, - InsecureSkipTLS: false, - CABundle: []byte{}, - }) - if err != nil && !errors.Is(err, git.NoErrAlreadyUpToDate) { - return fmt.Errorf("could not pull from origin: %w", err) - } - - g.logger.Debug("done creating branches") - - return nil -} - -func (g *GoGit) Commit(ctx context.Context, gitRepo *GoGitRepo) error { - worktree, err := gitRepo.repo.Worktree() - if err != nil { - return err - } - - _, err = worktree.Commit("some-commit", &git.CommitOptions{ - All: true, - Author: &object.Signature{Name: "octopush", Email: "octopush@kasperhermansen.com", When: time.Now()}, - Committer: &object.Signature{Name: "octopush", Email: "octopush@kasperhermansen.com", When: time.Now()}, - SignKey: g.openPGP.SigningKey, - }) - if err != nil { - return err - } - - g.logger.Debug("done commiting objects") - - return nil -} - -func (g *GoGit) Push(ctx context.Context, gitRepo *GoGitRepo) error { - auth, err := g.GetAuth() - if err != nil { - return err - } - - err = gitRepo.repo.PushContext(ctx, &git.PushOptions{ - RemoteName: "origin", - RefSpecs: []config.RefSpec{}, - Auth: auth, - Progress: g.getProgressWriter(), - Prune: false, - Force: true, - InsecureSkipTLS: false, - CABundle: []byte{}, - RequireRemoteRefs: []config.RefSpec{}, - }) - if err != nil { - return err - } - - g.logger.Debug("done pushing branch") - - return nil -} - -func (g *GoGit) GetAuth() (transport.AuthMethod, error) { - switch g.gitConfig.AuthOption { - case GIT_AUTH_SSH: - sshKey, err := ssh.NewPublicKeysFromFile( - g.gitConfig.User, - g.gitConfig.SshPublicKeyFilePath, - g.gitConfig.SshPrivateKeyPassword, - ) - if err != nil { - return nil, err - } - return sshKey, nil - case GIT_AUTH_USERNAME_PASSWORD: - return &http.BasicAuth{ - Username: g.gitConfig.User, - Password: g.gitConfig.Password, - }, nil - case GIT_AUTH_ACCESS_TOKEN: - return &http.BasicAuth{ - Username: "required-username", - Password: g.gitConfig.AccessToken, - }, nil - case GIT_AUTH_ANONYMOUS: - return nil, nil - case GIT_AUTH_SSH_AGENT: - return ssh.NewSSHAgentAuth(g.gitConfig.User) - default: - return nil, nil - } -} diff --git a/internal/services/signer/openpgp.go b/internal/services/signer/openpgp.go deleted file mode 100644 index 0d53fc2..0000000 --- a/internal/services/signer/openpgp.go +++ /dev/null @@ -1,81 +0,0 @@ -package signer - -import ( - "context" - "errors" - "os" - "strings" - - "git.front.kjuulh.io/kjuulh/curre" - "github.com/ProtonMail/go-crypto/openpgp" - "go.uber.org/zap" -) - -type OpenPGP struct { - logger *zap.Logger - SigningKey *openpgp.Entity - config *OpenPgpConfig -} - -type OpenPgpConfig struct { - PrivateKeyFilePath string - PrivateKeyPassword string - PrivateKeyIdentity string -} - -func NewOpenPGP(logger *zap.Logger, config *OpenPgpConfig) *OpenPGP { - return &OpenPGP{ - logger: logger, - config: config, - } -} - -func NewOpenPGPApp(openPGP *OpenPGP) curre.Component { - return curre.NewFunctionalComponent(&curre.FunctionalComponent{ - InitFunc: func(_ *curre.FunctionalComponent, ctx context.Context) error { - keyring, err := buildKeyring(ctx, openPGP) - if err != nil { - openPGP.logger.Panic("could not build keyring", zap.Error(err)) - return err - } - - openPGP.SigningKey = keyring - - return nil - }, - StartFunc: func(fc *curre.FunctionalComponent, ctx context.Context) error { - return nil - }, - StopFunc: func(fc *curre.FunctionalComponent, ctx context.Context) error { - return nil - }, - }) -} - -func buildKeyring(_ context.Context, openPGP *OpenPGP) (*openpgp.Entity, error) { - content, err := os.ReadFile(openPGP.config.PrivateKeyFilePath) - if err != nil { - return nil, err - } - reader := strings.NewReader(string(content)) - - es, err := openpgp.ReadArmoredKeyRing(reader) - if err != nil { - return nil, err - } - - for _, key := range es { - for k := range key.Identities { - if strings.Contains(k, openPGP.config.PrivateKeyIdentity) { - err = key.PrivateKey.Decrypt([]byte(openPGP.config.PrivateKeyPassword)) - if err != nil { - return nil, err - } - return key, nil - } - } - } - - return nil, errors.New("could not find key matching identity") - -} diff --git a/internal/services/storage/models.go b/internal/services/storage/models.go deleted file mode 100644 index eac33dc..0000000 --- a/internal/services/storage/models.go +++ /dev/null @@ -1,7 +0,0 @@ -package storage - -type ( - Area struct { - Path string - } -) diff --git a/internal/services/storage/storage.go b/internal/services/storage/storage.go deleted file mode 100644 index 89b8a90..0000000 --- a/internal/services/storage/storage.go +++ /dev/null @@ -1,77 +0,0 @@ -package storage - -import ( - "errors" - "os" - "path" - - "go.uber.org/zap" - "golang.org/x/net/context" -) - -// The idea behind storage is that we have file dir, with a git repo. -// This file repo can now take certain actions - -type StorageConfig struct { - Path string -} - -func NewDefaultStorageConfig() (*StorageConfig, error) { - tempDir, err := os.MkdirTemp(os.TempDir(), "") - if err != nil { - return nil, err - } - return &StorageConfig{ - Path: path.Join(tempDir, "octopush"), - }, nil -} - -type Service struct { - logger *zap.Logger - cfg *StorageConfig -} - -func NewService(logger *zap.Logger, cfg *StorageConfig) *Service { - return &Service{logger: logger, cfg: cfg} -} - -func (s *Service) getStoragePath(ctx context.Context) string { - return path.Join(s.cfg.Path, "storage") -} - -func (s *Service) InitializeStorage(ctx context.Context) error { - return os.MkdirAll(s.getStoragePath(ctx), 0755) -} - -func (s *Service) CleanupStorage(ctx context.Context) error { - doneRemovingChan := make(chan struct{}, 1) - go func(ctx context.Context) { - s.logger.Debug("Removing all temp storage") - os.RemoveAll(s.getStoragePath(ctx)) - doneRemovingChan <- struct{}{} - }(ctx) - - select { - case <-ctx.Done(): - return errors.New("could not cleanup storage aborting") - case <-doneRemovingChan: - return nil - } - - return nil -} - -func (s *Service) CreateArea(ctx context.Context) (*Area, error) { - dir, err := os.MkdirTemp(s.getStoragePath(ctx), "*") - if err != nil { - return nil, err - } - - return &Area{ - Path: dir, - }, nil -} - -func (s *Service) RemoveArea(ctx context.Context, area *Area) error { - return os.RemoveAll(area.Path) -} diff --git a/roadmap.md b/roadmap.md deleted file mode 100644 index 2e91660..0000000 --- a/roadmap.md +++ /dev/null @@ -1,63 +0,0 @@ -# Roadmap - -## POC: - -- [x] Add cuddle -- [x] Create storage mechanism -- [x] Pull repository into storage -- [x] Create test action to run on repository -- [x] Sign commit using gpg -- [x] Push commits to branch - -### Not in scope - -- Pooled runners -- CLI with options -- Server app -- Git hosting providers - -## Version 0.1 - -- [x] Setup a way to choose actions and predicates -- [x] Allow instantiation of actions, octopush template repo etc. -- [x] Implement docker action -- [x] Create pr for gitea provider -- [x] Providing query results -- [x] Create CLI to trigger action - -## Version 0.2 - -- [x] Write README -- [x] Fix git issues -- [x] Allow octopush to run directly on the cli - -## Version 0.3 - -- [ ] Make select depend on query -- [ ] Make configurable ssh user -- [ ] Make configurable gpg keyset -- [ ] Make configurable git provider - - [ ] Add github -- [ ] Create templating function for easily creating new actions -- [ ] Add way to see progress of runners -- [ ] Implement global .octopush store for easy access to settings -- [ ] Move builders to start instead of every building on every action -- [ ] Setup releases on github -- [ ] Setup CI -- [ ] Setup static analysis -- [ ] Setup releases on gitea using drone -- [ ] Figure out a license (probably MIT) - -## Version 0.4 - -- [ ] Create setup version for local actions -- [ ] Create setup version for server actions -- [ ] Create json schema -- [ ] Move roadmap to release / changelog - -## Version 0.x - -- Think about some sort of isolation -- Run authenticated on servers -- Create queuing system -- Setup pool of runners diff --git a/scripts/push_github.sh b/scripts/push_github.sh deleted file mode 100755 index f8032db..0000000 --- a/scripts/push_github.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e - -git remote add github git@github.com:kjuulh/octopush.git || true - -git push -f github main diff --git a/scripts/run.sh b/scripts/run.sh deleted file mode 100755 index e2f75ac..0000000 --- a/scripts/run.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -run_server="cuddle_cli x run_server" - -$run_server & - -sleep 1s - -cuddle_cli x run_client - -sleep 5s - -kill %1 diff --git a/scripts/run_client.sh b/scripts/run_client.sh deleted file mode 100755 index 8ab48f4..0000000 --- a/scripts/run_client.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e - -current_branch=$(git branch --show-current) - -export $(cat .env | xargs) - -#go run cmd/octopush/octopush.go process --actions-repo "git@git.front.kjuulh.io:kjuulh/octopush.git" --branch "$current_branch" --path "_examples/actions/write_a_readme" -go run cmd/octopush/octopush.go process \ - --actions-repo "git@git.front.kjuulh.io:kjuulh/octopush.git"\ - --branch "$current_branch" \ - --path "_examples/actions/add_releaserc" diff --git a/scripts/run_server.sh b/scripts/run_server.sh deleted file mode 100755 index 59ec179..0000000 --- a/scripts/run_server.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e - -export $(cat .env | xargs) - -go run cmd/server/server.go start diff --git a/templates/build_release.Dockerfile b/templates/build_release.Dockerfile deleted file mode 100644 index ac7b134..0000000 --- a/templates/build_release.Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM golang - -COPY . . - -RUN go build cmd/server/server.go - -CMD [ "server", "start" ]