diff --git a/README.md b/README.md index ffcf0b8..10ea947 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@

- +

-

Kraken - Your cute action executor

+

Octopush - Your cute action executor

## Purpose The goal of this project is to easily do batch changes or queries on a host of repositories. In large organisations using multi-repository strategies, it may be painful to change even small things across many repositories, because there -are so many of them. Kraken aims to change that. +are so many of them. Octopush aims to change that. **DISCLAIMER:** It is still early days, and the api is subject to change. @@ -34,36 +34,36 @@ Refer to [roadmap.md](roadmap.md) ## Installation -Kraken comes in two modes. Client or Client -> Server. Kraken can stand alone as +Octopush comes in two modes. Client or Client -> Server. Octopush can stand alone as a client, for smaller and less secure changes. However, for organisations, it -may be useful to use Kraken in server mode, which supports more features, and +may be useful to use Octopush in server mode, which supports more features, and has extra security built in. ### Client (CLI) -Download executable from [releases](https://github.com/kjuulh/kraken/releases) +Download executable from [releases](https://github.com/kjuulh/octopush/releases) #### Or Use docker image ```bash -docker run --rm kasperhermansen/krakencli:latest version +docker run --rm kasperhermansen/octopushcli:latest version ``` #### Or Build from source ```bash -git clone https://github.com/kjuulh/kraken.git -cd kraken +git clone https://github.com/kjuulh/octopush.git +cd octopush -go build cmd/kraken/kraken.go -./kraken version +go build cmd/octopush/octopush.go +./octopush version ``` #### Or Build with cuddle ```bash -git clone https://github.com/kjuulh/kraken.git -cd kraken +git clone https://github.com/kjuulh/octopush.git +cd octopush cuddle_cli x build_cli ``` @@ -73,15 +73,15 @@ cuddle_cli x build_cli We prefer to run the server directly as a docker image. ```bash -docker pull kasperhermansen/krakenserver:latest -docker run -p 9090:80 --rm kasperhermansen/krakenserver:latest +docker pull kasperhermansen/octopushserver:latest +docker run -p 9090:80 --rm kasperhermansen/octopushserver:latest ``` #### Or Build from source ```bash -git clone https://github.com/kjuulh/kraken.git -cd kraken +git clone https://github.com/kjuulh/octopush.git +cd octopush go build cmd/server/server.go ./server version @@ -90,8 +90,8 @@ go build cmd/server/server.go #### Or Build with cuddle ```bash -git clone https://github.com/kjuulh/kraken.git -cd kraken +git clone https://github.com/kjuulh/octopush.git +cd octopush cuddle_cli x build_server ``` @@ -106,10 +106,10 @@ I will focus on the client here, as the server provides the same features, though available through the cli, but instead as configuration options (see [CONFIGURATION_SERVER.md](CONFIGURATION_SERVER.md)) -Kraken ships with autocomplete built in (courtesy of spf13/cobra). To add: +Octopush ships with autocomplete built in (courtesy of spf13/cobra). To add: -- Bash: `echo 'source <(kraken completion bash)' >> ~/.bashrc` -- Zsh: `echo 'source <(kraken completion zsh)' >> ~/.zshrc` +- Bash: `echo 'source <(octopush completion bash)' >> ~/.bashrc` +- Zsh: `echo 'source <(octopush completion zsh)' >> ~/.zshrc` ### Creating a new action @@ -118,11 +118,11 @@ Creating a new action ```bash git init my-actions # should only be done once cd my-actions -kraken tmpl init write-a-readme --command -cat write-a-readme/kraken.yml +octopush tmpl init write-a-readme --command +cat write-a-readme/octopush.yml # Output -# apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +# apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 # name: write-a-readme # select: # repositories: [] @@ -131,7 +131,7 @@ cat write-a-readme/kraken.yml # entry: "main.sh" ``` -Kraken also ships with yaml schema, which should help write the yaml +Octopush also ships with yaml schema, which should help write the yaml configuration. #### Add upstream repositories (victims) @@ -139,8 +139,8 @@ configuration. Now add a preferred repository ``` -cat << EOF > write-a-readme/kraken.yml -apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +cat << EOF > write-a-readme/octopush.yml +apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 name: write-a-readme select: providers: # new @@ -158,13 +158,13 @@ on. Another could be to use ```bash -cat << EOF > write-a-readme/kraken.yml -apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +cat << EOF > write-a-readme/octopush.yml +apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 name: write-a-readme select: repositories: #new - - git@git.front.kjuulh.io:kjuulh/kraken.git #new - - git@git.front.kjuulh.io:kjuulh/kraken-test.git #new + - git@git.front.kjuulh.io:kjuulh/octopush.git #new + - git@git.front.kjuulh.io:kjuulh/octopush-test.git #new actions: - type: shell entry: "main.sh" @@ -179,24 +179,24 @@ for a shared effect. To run the script use ```bash -kraken process --path "write-a-readme" +octopush process --path "write-a-readme" ``` -This will cause the kraken process to automatically apply the action on the repo +This will cause the octopush process to automatically apply the action on the repo and open a pr. ### Query repositories -Kraken can also be used to query. +Octopush can also be used to query. ```bash -cat << EOF > write-a-readme/kraken.yml -apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +cat << EOF > write-a-readme/octopush.yml +apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 name: write-a-readme select: repositories: - - git@git.front.kjuulh.io:kjuulh/kraken.git - - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/octopush.git + - git@git.front.kjuulh.io:kjuulh/octopush-test.git queries: - type: grep query: "# README" @@ -210,10 +210,10 @@ tools. Do note: All actions will be run as dry-run unless `--apply` is added. This is to help test locally, as well as not cause serious issues. The server configuration is pretty much the same, except the command would look like so: -`kraken server process --path "write-a-readme" --apply`. Kraken will try to +`octopush server process --path "write-a-readme" --apply`. Octopush will try to infer as much as possible, but it may be needed to apply some extra flags to -specify upstream repositories and such. Kraken will also help you setup keys and -such on the first run, using `kraken setup` or `kraken server setup`. +specify upstream repositories and such. Octopush will also help you setup keys and +such on the first run, using `octopush setup` or `octopush server setup`. ## Contributing @@ -223,7 +223,7 @@ are welcome, though they are at your own risk. ### Bugs & features requests -Please use [issues](https://github.com/kjuulh/kraken/issues) +Please use [issues](https://github.com/kjuulh/octopush/issues) ### Development @@ -234,7 +234,7 @@ outside core maintainers. Simply: ```bash -go run cmd/kraken/kraken.go # CLI +go run cmd/octopush/octopush.go # CLI go run cmd/server/server.go # Server ``` diff --git a/_examples/actions/add_releaserc/kraken.yml b/_examples/actions/add_releaserc/kraken.yml index b2e5c35..3c1c819 100644 --- a/_examples/actions/add_releaserc/kraken.yml +++ b/_examples/actions/add_releaserc/kraken.yml @@ -1,9 +1,9 @@ -apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 name: write-a-readme select: repositories: - - git@git.front.kjuulh.io:kjuulh/kraken-test.git - - git@git.front.kjuulh.io:kjuulh/kraken.git + - git@git.front.kjuulh.io:kjuulh/octopush-test.git + - git@git.front.kjuulh.io:kjuulh/octopush.git # providers: # - gitea: https://git.front.kjuulh.io # organisation: "cibus" diff --git a/_examples/actions/docker_action/Dockerfile b/_examples/actions/docker_action/Dockerfile index 572de73..61980fa 100644 --- a/_examples/actions/docker_action/Dockerfile +++ b/_examples/actions/docker_action/Dockerfile @@ -1,6 +1,6 @@ FROM debian:bullseye-slim -# Kraken relies on this path being the specified path +# Octopush relies on this path being the specified path WORKDIR /src/work/ COPY entry.sh /src/script.sh diff --git a/_examples/actions/docker_action/kraken.yml b/_examples/actions/docker_action/kraken.yml index f2c8dba..4279c59 100644 --- a/_examples/actions/docker_action/kraken.yml +++ b/_examples/actions/docker_action/kraken.yml @@ -1,8 +1,8 @@ -apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 name: write-a-readme select: repositories: - - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/octopush-test.git # providers: # - gitea: https://git.front.kjuulh.io # organisation: "cibus" diff --git a/_examples/actions/write_a_readme/kraken.yml b/_examples/actions/write_a_readme/kraken.yml index 0e5c44e..a4bf81e 100644 --- a/_examples/actions/write_a_readme/kraken.yml +++ b/_examples/actions/write_a_readme/kraken.yml @@ -1,8 +1,8 @@ -apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 name: write-a-readme select: repositories: - - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/octopush-test.git # providers: # - gitea: https://git.front.kjuulh.io # organisation: "cibus" diff --git a/_examples/queries/find_semantic/kraken.yml b/_examples/queries/find_semantic/kraken.yml index e98ba75..6952292 100644 --- a/_examples/queries/find_semantic/kraken.yml +++ b/_examples/queries/find_semantic/kraken.yml @@ -1,4 +1,4 @@ -apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 name: write-a-readme select: providers: diff --git a/_examples/queries/scrape_readme/kraken.yml b/_examples/queries/scrape_readme/kraken.yml index 35aa3a3..f1fe9ff 100644 --- a/_examples/queries/scrape_readme/kraken.yml +++ b/_examples/queries/scrape_readme/kraken.yml @@ -1,8 +1,8 @@ -apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1 name: write-a-readme select: repositories: - - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/octopush-test.git # providers: # - gitea: https://git.front.kjuulh.io # organisation: "cibus" diff --git a/cmd/kraken/commands/process.go b/cmd/kraken/commands/process.go index 89434a9..22ed98e 100644 --- a/cmd/kraken/commands/process.go +++ b/cmd/kraken/commands/process.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" ) -func CreateKrakenProcessCmd() *cobra.Command { +func CreateOctopushProcessCmd() *cobra.Command { var ( actionsRepo string diff --git a/cmd/kraken/commands/root.go b/cmd/kraken/commands/root.go index 5fc73bd..69aee00 100644 --- a/cmd/kraken/commands/root.go +++ b/cmd/kraken/commands/root.go @@ -2,13 +2,13 @@ package commands import "github.com/spf13/cobra" -func CreateKrakenCmd() *cobra.Command { +func CreateOctopushCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "kraken", + Use: "octopush", // Run: func(cmd *cobra.Command, args []string) { }, } - cmd.AddCommand(CreateKrakenProcessCmd()) + cmd.AddCommand(CreateOctopushProcessCmd()) return cmd } diff --git a/cmd/kraken/kraken.go b/cmd/kraken/kraken.go index 0da4212..494b764 100644 --- a/cmd/kraken/kraken.go +++ b/cmd/kraken/kraken.go @@ -3,7 +3,7 @@ package main import ( "os" - "git.front.kjuulh.io/kjuulh/kraken/cmd/kraken/commands" + "git.front.kjuulh.io/kjuulh/octopush/cmd/octopush/commands" ) func main() { @@ -11,7 +11,7 @@ func main() { } func Execute() { - err := commands.CreateKrakenCmd().Execute() + err := commands.CreateOctopushCmd().Execute() if err != nil { os.Exit(1) } diff --git a/cmd/server/commands/root.go b/cmd/server/commands/root.go index 19c0575..379f24e 100644 --- a/cmd/server/commands/root.go +++ b/cmd/server/commands/root.go @@ -7,7 +7,7 @@ import ( func CreateServerCmd(logger *zap.Logger) *cobra.Command { cmd := &cobra.Command{ - Use: "krakenserver", + Use: "octopushserver", } cmd.AddCommand(NewStartServerCommand(logger)) diff --git a/cmd/server/commands/start.go b/cmd/server/commands/start.go index 468f133..7849f57 100644 --- a/cmd/server/commands/start.go +++ b/cmd/server/commands/start.go @@ -1,7 +1,7 @@ package commands import ( - "git.front.kjuulh.io/kjuulh/kraken/internal/server" + "git.front.kjuulh.io/kjuulh/octopush/internal/server" "github.com/spf13/cobra" "go.uber.org/zap" ) @@ -9,7 +9,7 @@ import ( func NewStartServerCommand(logger *zap.Logger) *cobra.Command { cmd := &cobra.Command{ Use: "start", - Short: "Start the kraken server", + Short: "Start the octopush server", RunE: func(cmd *cobra.Command, args []string) error { return server.Start(logger) }, diff --git a/cmd/server/server.go b/cmd/server/server.go index 5c835ec..f050505 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -3,8 +3,8 @@ package main import ( "os" - "git.front.kjuulh.io/kjuulh/kraken/cmd/server/commands" - "git.front.kjuulh.io/kjuulh/kraken/internal/logger" + "git.front.kjuulh.io/kjuulh/octopush/cmd/server/commands" + "git.front.kjuulh.io/kjuulh/octopush/internal/logger" "go.uber.org/zap" ) diff --git a/cuddle.yaml b/cuddle.yaml index 87fafac..0bd3198 100644 --- a/cuddle.yaml +++ b/cuddle.yaml @@ -3,7 +3,7 @@ base: "git@git.front.kjuulh.io:kjuulh/cuddle-go-plan.git" vars: - service: "kraken" + service: "octopush" deployments: "git@git.front.kjuulh.io:kjuulh/deployments.git" scripts: diff --git a/go.mod b/go.mod index 2fab6ad..fb618fb 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.front.kjuulh.io/kjuulh/kraken +module git.front.kjuulh.io/kjuulh/octopush go 1.19 diff --git a/integration_test/main_test.go b/integration_test/main_test.go index df419b6..d6132b5 100644 --- a/integration_test/main_test.go +++ b/integration_test/main_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "git.front.kjuulh.io/kjuulh/kraken/internal/server" + "git.front.kjuulh.io/kjuulh/octopush/internal/server" "go.uber.org/zap" ) diff --git a/integration_test/storage_test.go b/integration_test/storage_test.go index 40a7956..b77e6b1 100644 --- a/integration_test/storage_test.go +++ b/integration_test/storage_test.go @@ -9,7 +9,7 @@ import ( "path" "testing" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/storage" + "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" "github.com/stretchr/testify/require" ) diff --git a/internal/actions/action.go b/internal/actions/action.go index b36155d..07b4245 100644 --- a/internal/actions/action.go +++ b/internal/actions/action.go @@ -4,15 +4,15 @@ import ( "context" "errors" - "git.front.kjuulh.io/kjuulh/kraken/internal/actions/builders" - "git.front.kjuulh.io/kjuulh/kraken/internal/actions/querier" - "git.front.kjuulh.io/kjuulh/kraken/internal/schema" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/storage" + "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.KrakenSchema + Schema *schema.OctopushSchema SchemaPath string } diff --git a/internal/actions/action_creator.go b/internal/actions/action_creator.go index b731519..80b71e0 100644 --- a/internal/actions/action_creator.go +++ b/internal/actions/action_creator.go @@ -7,9 +7,9 @@ import ( "path" "time" - "git.front.kjuulh.io/kjuulh/kraken/internal/schema" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/providers" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/storage" + "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" ) @@ -59,19 +59,19 @@ func (ac *ActionCreator) Prepare(ctx context.Context, ops *ActionCreatorOps) (*A return nil, fmt.Errorf("path is invalid: %s", ops.Path) } - contents, err := os.ReadFile(path.Join(executorUrl, "kraken.yml")) + contents, err := os.ReadFile(path.Join(executorUrl, "octopush.yml")) if err != nil { return nil, err } - krakenSchema, err := schema.Unmarshal(string(contents)) + octopushSchema, err := schema.Unmarshal(string(contents)) if err != nil { return nil, err } ac.logger.Debug("Action creator done") return &Action{ - Schema: krakenSchema, + Schema: octopushSchema, SchemaPath: executorUrl, }, nil } diff --git a/internal/actions/builders/docker.go b/internal/actions/builders/docker.go index 4120229..ae11be7 100644 --- a/internal/actions/builders/docker.go +++ b/internal/actions/builders/docker.go @@ -36,7 +36,7 @@ func (g *DockerBuild) Build(ctx context.Context, modulePath, entryPath string) ( return nil, err } tag := hex.EncodeToString(b) - buildDockerCmd := fmt.Sprintf("(cd %s; docker build -f %s --tag kraken/%s .)", modulePath, entryPath, tag) + 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( @@ -73,7 +73,7 @@ func (g *DockerBuild) Build(ctx context.Context, modulePath, entryPath string) ( ctx, "/bin/bash", "-c", - fmt.Sprintf("docker run --rm -v %s/:/src/work/ kraken/%s", victimPath, tag), + fmt.Sprintf("docker run --rm -v %s/:/src/work/ octopush/%s", victimPath, tag), ) runDockerWriter := &zapio.Writer{ diff --git a/internal/api/process_command.go b/internal/api/process_command.go index 2e852b5..b067615 100644 --- a/internal/api/process_command.go +++ b/internal/api/process_command.go @@ -4,9 +4,9 @@ import ( "context" "net/http" - "git.front.kjuulh.io/kjuulh/kraken/internal/commands" - "git.front.kjuulh.io/kjuulh/kraken/internal/serverdeps" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/jobs" + "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" diff --git a/internal/api/root.go b/internal/api/root.go index 7f814ac..c4f36a4 100644 --- a/internal/api/root.go +++ b/internal/api/root.go @@ -1,7 +1,7 @@ package api import ( - "git.front.kjuulh.io/kjuulh/kraken/internal/serverdeps" + "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" "github.com/gin-gonic/gin" "go.uber.org/zap" ) diff --git a/internal/commands/process_repos.go b/internal/commands/process_repos.go index 02c7c27..6ae32c1 100644 --- a/internal/commands/process_repos.go +++ b/internal/commands/process_repos.go @@ -7,11 +7,11 @@ import ( "sync" "time" - "git.front.kjuulh.io/kjuulh/kraken/internal/actions" - "git.front.kjuulh.io/kjuulh/kraken/internal/gitproviders" - "git.front.kjuulh.io/kjuulh/kraken/internal/schema" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/providers" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/storage" + "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" ) @@ -79,7 +79,7 @@ func (pr *ProcessRepos) Process(ctx context.Context, repository string, branch s return nil } -func (pr *ProcessRepos) getRepoUrls(ctx context.Context, schema *schema.KrakenSchema) ([]string, error) { +func (pr *ProcessRepos) getRepoUrls(ctx context.Context, schema *schema.OctopushSchema) ([]string, error) { repoUrls := make([]string, 0) repoUrls = append(repoUrls, schema.Select.Repositories...) @@ -231,7 +231,7 @@ func (pr *ProcessRepos) commit(ctx context.Context, area *storage.Area, repo *pr return err } - err = pr.gitea.CreatePr(ctx, fmt.Sprintf("%s://%s", "https", url.Host), org, semanticName, head, originHead, "kraken-apply") + err = pr.gitea.CreatePr(ctx, fmt.Sprintf("%s://%s", "https", url.Host), org, semanticName, head, originHead, "octopush-apply") if err != nil { return err } diff --git a/internal/schema/kraken.go b/internal/schema/kraken.go index b1c76f5..afa6f2d 100644 --- a/internal/schema/kraken.go +++ b/internal/schema/kraken.go @@ -2,7 +2,7 @@ package schema import "gopkg.in/yaml.v3" -type KrakenSchema struct { +type OctopushSchema struct { ApiVersion string `yaml:"apiVersion"` Name string `yaml:"name"` Select struct { @@ -22,8 +22,8 @@ type KrakenSchema struct { } `yaml:"queries"` } -func Unmarshal(raw string) (*KrakenSchema, error) { - k := &KrakenSchema{} +func Unmarshal(raw string) (*OctopushSchema, error) { + k := &OctopushSchema{} err := yaml.Unmarshal([]byte(raw), k) if err != nil { return nil, err diff --git a/internal/server/http_server.go b/internal/server/http_server.go index 3daa290..b367049 100644 --- a/internal/server/http_server.go +++ b/internal/server/http_server.go @@ -7,8 +7,8 @@ import ( "time" "git.front.kjuulh.io/kjuulh/curre" - "git.front.kjuulh.io/kjuulh/kraken/internal/api" - "git.front.kjuulh.io/kjuulh/kraken/internal/serverdeps" + "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" diff --git a/internal/server/server.go b/internal/server/server.go index a71cbd7..cc946eb 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -4,8 +4,8 @@ import ( "context" "git.front.kjuulh.io/kjuulh/curre" - "git.front.kjuulh.io/kjuulh/kraken/internal/serverdeps" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/signer" + "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" + "git.front.kjuulh.io/kjuulh/octopush/internal/services/signer" "go.uber.org/zap" ) diff --git a/internal/server/storage_server.go b/internal/server/storage_server.go index 5be0a36..9a18493 100644 --- a/internal/server/storage_server.go +++ b/internal/server/storage_server.go @@ -5,7 +5,7 @@ import ( "time" "git.front.kjuulh.io/kjuulh/curre" - "git.front.kjuulh.io/kjuulh/kraken/internal/serverdeps" + "git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps" "go.uber.org/zap" ) diff --git a/internal/serverdeps/server_deps.go b/internal/serverdeps/server_deps.go index da9c333..a712e45 100644 --- a/internal/serverdeps/server_deps.go +++ b/internal/serverdeps/server_deps.go @@ -1,12 +1,12 @@ package serverdeps import ( - actionc "git.front.kjuulh.io/kjuulh/kraken/internal/actions" - "git.front.kjuulh.io/kjuulh/kraken/internal/gitproviders" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/actions" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/providers" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/signer" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/storage" + 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" ) @@ -42,7 +42,7 @@ func NewServerDeps(logger *zap.Logger) *ServerDeps { openPGPConfig := &signer.OpenPgpConfig{ PrivateKeyFilePath: "./example/testkey.private.pgp", PrivateKeyPassword: "somepassword", - PrivateKeyIdentity: "kraken@kasperhermansen.com", + PrivateKeyIdentity: "octopush@kasperhermansen.com", } deps.openPGP = signer.NewOpenPGP(logger.With(zap.Namespace("openpgp")), openPGPConfig) diff --git a/internal/services/actions/action.go b/internal/services/actions/action.go index 5262569..c711b47 100644 --- a/internal/services/actions/action.go +++ b/internal/services/actions/action.go @@ -3,7 +3,7 @@ package actions import ( "context" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/storage" + "git.front.kjuulh.io/kjuulh/octopush/internal/services/storage" "go.uber.org/zap" ) diff --git a/internal/services/providers/git.go b/internal/services/providers/git.go index 32cc1a7..27253de 100644 --- a/internal/services/providers/git.go +++ b/internal/services/providers/git.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/signer" - "git.front.kjuulh.io/kjuulh/kraken/internal/services/storage" + "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" @@ -206,9 +206,9 @@ func (g *Git) CreateBranch(ctx context.Context, gitRepo *GitRepo) error { return err } - refSpec := plumbing.NewBranchReferenceName("kraken-apply") + refSpec := plumbing.NewBranchReferenceName("octopush-apply") err = gitRepo.repo.CreateBranch(&config.Branch{ - Name: "kraken-apply", + Name: "octopush-apply", Remote: "origin", Merge: refSpec, Rebase: "", @@ -227,7 +227,7 @@ func (g *Git) CreateBranch(ctx context.Context, gitRepo *GitRepo) error { return fmt.Errorf("could not checkout branch: %w", err) } - remoteRef := plumbing.NewRemoteReferenceName("origin", "kraken-apply") + remoteRef := plumbing.NewRemoteReferenceName("origin", "octopush-apply") ref := plumbing.NewSymbolicReference(refSpec, remoteRef) err = gitRepo.repo.Storer.SetReference(ref) if err != nil { @@ -268,8 +268,8 @@ func (g *Git) Commit(ctx context.Context, gitRepo *GitRepo) error { _, err = worktree.Commit("some-commit", &git.CommitOptions{ All: true, - Author: &object.Signature{Name: "kraken", Email: "kraken@kasperhermansen.com", When: time.Now()}, - Committer: &object.Signature{Name: "kraken", Email: "kraken@kasperhermansen.com", When: time.Now()}, + 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 { diff --git a/internal/services/storage/storage.go b/internal/services/storage/storage.go index 01a2625..89b8a90 100644 --- a/internal/services/storage/storage.go +++ b/internal/services/storage/storage.go @@ -22,7 +22,7 @@ func NewDefaultStorageConfig() (*StorageConfig, error) { return nil, err } return &StorageConfig{ - Path: path.Join(tempDir, "kraken"), + Path: path.Join(tempDir, "octopush"), }, nil } diff --git a/roadmap.md b/roadmap.md index 5e159fb..109c79d 100644 --- a/roadmap.md +++ b/roadmap.md @@ -19,7 +19,7 @@ ## Version 0.1 - [x] Setup a way to choose actions and predicates -- [x] Allow instantiation of actions, kraken template repo etc. +- [x] Allow instantiation of actions, octopush template repo etc. - [x] Implement docker action - [x] Create pr for gitea provider - [x] Providing query results @@ -35,7 +35,7 @@ - [ ] Add github - [ ] Create templating function for easily creating new actions - [ ] Add way to see progress of runners -- [ ] Implement global .kraken store for easy access to settings +- [ ] 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 diff --git a/scripts/push_github.sh b/scripts/push_github.sh index d2a19cb..f8032db 100755 --- a/scripts/push_github.sh +++ b/scripts/push_github.sh @@ -2,6 +2,6 @@ set -e -git remote add github git@github.com:kjuulh/kraken.git || true +git remote add github git@github.com:kjuulh/octopush.git || true git push -f github main diff --git a/scripts/run_client.sh b/scripts/run_client.sh index 2fa2e55..d2a21c9 100755 --- a/scripts/run_client.sh +++ b/scripts/run_client.sh @@ -4,8 +4,8 @@ set -e current_branch=$(git branch --show-current) -#go run cmd/kraken/kraken.go process --actions-repo "git@git.front.kjuulh.io:kjuulh/kraken.git" --branch "$current_branch" --path "_examples/actions/write_a_readme" -go run cmd/kraken/kraken.go process \ - --actions-repo "git@git.front.kjuulh.io:kjuulh/kraken.git"\ +#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"