Compare commits

..

2 Commits

Author SHA1 Message Date
ac4aabede4
rename 2022-09-21 11:06:53 +02:00
a503204e8a
Update roadmap 2022-09-21 11:04:35 +02:00
34 changed files with 126 additions and 125 deletions

View File

@ -1,14 +1,14 @@
<p align="center">
<image src="https://git.front.kjuulh.io/kjuulh/kraken/raw/branch/v0.2/assets/kraken.svg" width="300" height="300"/>
<image src="https://git.front.kjuulh.io/kjuulh/octopush/raw/branch/v0.2/assets/octopush.svg" width="300" height="300"/>
</p>
<h1 align="center">Kraken - Your cute action executor</h1>
<h1 align="center">Octopush - Your cute action executor</h1>
## 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
```

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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:

View File

@ -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"

View File

@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
)
func CreateKrakenProcessCmd() *cobra.Command {
func CreateOctopushProcessCmd() *cobra.Command {
var (
actionsRepo string

View File

@ -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
}

View File

@ -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)
}

View File

@ -7,7 +7,7 @@ import (
func CreateServerCmd(logger *zap.Logger) *cobra.Command {
cmd := &cobra.Command{
Use: "krakenserver",
Use: "octopushserver",
}
cmd.AddCommand(NewStartServerCommand(logger))

View File

@ -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)
},

View File

@ -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"
)

View File

@ -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:

2
go.mod
View File

@ -1,4 +1,4 @@
module git.front.kjuulh.io/kjuulh/kraken
module git.front.kjuulh.io/kjuulh/octopush
go 1.19

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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
}

View File

@ -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
}

View File

@ -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{

View File

@ -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"

View File

@ -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"
)

View File

@ -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
}

View File

@ -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

View File

@ -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"

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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)

View File

@ -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"
)

View File

@ -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 {

View File

@ -22,7 +22,7 @@ func NewDefaultStorageConfig() (*StorageConfig, error) {
return nil, err
}
return &StorageConfig{
Path: path.Join(tempDir, "kraken"),
Path: path.Join(tempDir, "octopush"),
}, nil
}

View File

@ -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
@ -28,13 +28,14 @@
## Version 0.2
- [x] Write README
- [ ] 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 .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

View File

@ -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

View File

@ -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/queries/find_semantic"
--path "_examples/actions/add_releaserc"