Compare commits

..

No commits in common. "ac4aabede461af7843872e9cadf0716ae82eae2c" and "97d362e5be0b5d349c8c6152d572d51501b95a38" have entirely different histories.

34 changed files with 125 additions and 126 deletions

View File

@ -1,14 +1,14 @@
<p align="center">
<image src="https://git.front.kjuulh.io/kjuulh/octopush/raw/branch/v0.2/assets/octopush.svg" width="300" height="300"/>
<image src="https://git.front.kjuulh.io/kjuulh/kraken/raw/branch/v0.2/assets/kraken.svg" width="300" height="300"/>
</p>
<h1 align="center">Octopush - Your cute action executor</h1>
<h1 align="center">Kraken - 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. Octopush aims to change that.
are so many of them. Kraken 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
Octopush comes in two modes. Client or Client -> Server. Octopush can stand alone as
Kraken comes in two modes. Client or Client -> Server. Kraken can stand alone as
a client, for smaller and less secure changes. However, for organisations, it
may be useful to use Octopush in server mode, which supports more features, and
may be useful to use Kraken in server mode, which supports more features, and
has extra security built in.
### Client (CLI)
Download executable from [releases](https://github.com/kjuulh/octopush/releases)
Download executable from [releases](https://github.com/kjuulh/kraken/releases)
#### Or Use docker image
```bash
docker run --rm kasperhermansen/octopushcli:latest version
docker run --rm kasperhermansen/krakencli:latest version
```
#### Or Build from source
```bash
git clone https://github.com/kjuulh/octopush.git
cd octopush
git clone https://github.com/kjuulh/kraken.git
cd kraken
go build cmd/octopush/octopush.go
./octopush version
go build cmd/kraken/kraken.go
./kraken version
```
#### Or Build with cuddle
```bash
git clone https://github.com/kjuulh/octopush.git
cd octopush
git clone https://github.com/kjuulh/kraken.git
cd kraken
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/octopushserver:latest
docker run -p 9090:80 --rm kasperhermansen/octopushserver:latest
docker pull kasperhermansen/krakenserver:latest
docker run -p 9090:80 --rm kasperhermansen/krakenserver:latest
```
#### Or Build from source
```bash
git clone https://github.com/kjuulh/octopush.git
cd octopush
git clone https://github.com/kjuulh/kraken.git
cd kraken
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/octopush.git
cd octopush
git clone https://github.com/kjuulh/kraken.git
cd kraken
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))
Octopush ships with autocomplete built in (courtesy of spf13/cobra). To add:
Kraken ships with autocomplete built in (courtesy of spf13/cobra). To add:
- Bash: `echo 'source <(octopush completion bash)' >> ~/.bashrc`
- Zsh: `echo 'source <(octopush completion zsh)' >> ~/.zshrc`
- Bash: `echo 'source <(kraken completion bash)' >> ~/.bashrc`
- Zsh: `echo 'source <(kraken 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
octopush tmpl init write-a-readme --command
cat write-a-readme/octopush.yml
kraken tmpl init write-a-readme --command
cat write-a-readme/kraken.yml
# Output
# apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
# apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1
# name: write-a-readme
# select:
# repositories: []
@ -131,7 +131,7 @@ cat write-a-readme/octopush.yml
# entry: "main.sh"
```
Octopush also ships with yaml schema, which should help write the yaml
Kraken 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/octopush.yml
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
cat << EOF > write-a-readme/kraken.yml
apiVersion: git.front.kjuulh.io/kjuulh/kraken/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/octopush.yml
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
cat << EOF > write-a-readme/kraken.yml
apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1
name: write-a-readme
select:
repositories: #new
- git@git.front.kjuulh.io:kjuulh/octopush.git #new
- git@git.front.kjuulh.io:kjuulh/octopush-test.git #new
- git@git.front.kjuulh.io:kjuulh/kraken.git #new
- git@git.front.kjuulh.io:kjuulh/kraken-test.git #new
actions:
- type: shell
entry: "main.sh"
@ -179,24 +179,24 @@ for a shared effect.
To run the script use
```bash
octopush process --path "write-a-readme"
kraken process --path "write-a-readme"
```
This will cause the octopush process to automatically apply the action on the repo
This will cause the kraken process to automatically apply the action on the repo
and open a pr.
### Query repositories
Octopush can also be used to query.
Kraken can also be used to query.
```bash
cat << EOF > write-a-readme/octopush.yml
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
cat << EOF > write-a-readme/kraken.yml
apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1
name: write-a-readme
select:
repositories:
- git@git.front.kjuulh.io:kjuulh/octopush.git
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
- git@git.front.kjuulh.io:kjuulh/kraken.git
- git@git.front.kjuulh.io:kjuulh/kraken-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:
`octopush server process --path "write-a-readme" --apply`. Octopush will try to
`kraken server process --path "write-a-readme" --apply`. Kraken will try to
infer as much as possible, but it may be needed to apply some extra flags to
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`.
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`.
## Contributing
@ -223,7 +223,7 @@ are welcome, though they are at your own risk.
### Bugs & features requests
Please use [issues](https://github.com/kjuulh/octopush/issues)
Please use [issues](https://github.com/kjuulh/kraken/issues)
### Development
@ -234,7 +234,7 @@ outside core maintainers.
Simply:
```bash
go run cmd/octopush/octopush.go # CLI
go run cmd/kraken/kraken.go # CLI
go run cmd/server/server.go # Server
```

View File

@ -1,9 +1,9 @@
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1
name: write-a-readme
select:
repositories:
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
- git@git.front.kjuulh.io:kjuulh/octopush.git
- git@git.front.kjuulh.io:kjuulh/kraken-test.git
- git@git.front.kjuulh.io:kjuulh/kraken.git
# providers:
# - gitea: https://git.front.kjuulh.io
# organisation: "cibus"

View File

@ -1,6 +1,6 @@
FROM debian:bullseye-slim
# Octopush relies on this path being the specified path
# Kraken 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/octopush/blob/main/schema/v1
apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1
name: write-a-readme
select:
repositories:
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
- git@git.front.kjuulh.io:kjuulh/kraken-test.git
# providers:
# - gitea: https://git.front.kjuulh.io
# organisation: "cibus"

View File

@ -1,8 +1,8 @@
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1
name: write-a-readme
select:
repositories:
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
- git@git.front.kjuulh.io:kjuulh/kraken-test.git
# providers:
# - gitea: https://git.front.kjuulh.io
# organisation: "cibus"

View File

@ -1,4 +1,4 @@
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1
name: write-a-readme
select:
providers:

View File

@ -1,8 +1,8 @@
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1
name: write-a-readme
select:
repositories:
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
- git@git.front.kjuulh.io:kjuulh/kraken-test.git
# providers:
# - gitea: https://git.front.kjuulh.io
# organisation: "cibus"

View File

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

View File

@ -2,13 +2,13 @@ package commands
import "github.com/spf13/cobra"
func CreateOctopushCmd() *cobra.Command {
func CreateKrakenCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "octopush",
Use: "kraken",
// Run: func(cmd *cobra.Command, args []string) { },
}
cmd.AddCommand(CreateOctopushProcessCmd())
cmd.AddCommand(CreateKrakenProcessCmd())
return cmd
}

View File

@ -3,7 +3,7 @@ package main
import (
"os"
"git.front.kjuulh.io/kjuulh/octopush/cmd/octopush/commands"
"git.front.kjuulh.io/kjuulh/kraken/cmd/kraken/commands"
)
func main() {
@ -11,7 +11,7 @@ func main() {
}
func Execute() {
err := commands.CreateOctopushCmd().Execute()
err := commands.CreateKrakenCmd().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: "octopushserver",
Use: "krakenserver",
}
cmd.AddCommand(NewStartServerCommand(logger))

View File

@ -1,7 +1,7 @@
package commands
import (
"git.front.kjuulh.io/kjuulh/octopush/internal/server"
"git.front.kjuulh.io/kjuulh/kraken/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 octopush server",
Short: "Start the kraken 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/octopush/cmd/server/commands"
"git.front.kjuulh.io/kjuulh/octopush/internal/logger"
"git.front.kjuulh.io/kjuulh/kraken/cmd/server/commands"
"git.front.kjuulh.io/kjuulh/kraken/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: "octopush"
service: "kraken"
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/octopush
module git.front.kjuulh.io/kjuulh/kraken
go 1.19

View File

@ -7,7 +7,7 @@ import (
"os"
"testing"
"git.front.kjuulh.io/kjuulh/octopush/internal/server"
"git.front.kjuulh.io/kjuulh/kraken/internal/server"
"go.uber.org/zap"
)

View File

@ -9,7 +9,7 @@ import (
"path"
"testing"
"git.front.kjuulh.io/kjuulh/octopush/internal/services/storage"
"git.front.kjuulh.io/kjuulh/kraken/internal/services/storage"
"github.com/stretchr/testify/require"
)

View File

@ -4,15 +4,15 @@ 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"
"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"
"go.uber.org/zap"
)
type Action struct {
Schema *schema.OctopushSchema
Schema *schema.KrakenSchema
SchemaPath string
}

View File

@ -7,9 +7,9 @@ import (
"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"
"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"
"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, "octopush.yml"))
contents, err := os.ReadFile(path.Join(executorUrl, "kraken.yml"))
if err != nil {
return nil, err
}
octopushSchema, err := schema.Unmarshal(string(contents))
krakenSchema, err := schema.Unmarshal(string(contents))
if err != nil {
return nil, err
}
ac.logger.Debug("Action creator done")
return &Action{
Schema: octopushSchema,
Schema: krakenSchema,
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 octopush/%s .)", modulePath, entryPath, tag)
buildDockerCmd := fmt.Sprintf("(cd %s; docker build -f %s --tag kraken/%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/ octopush/%s", victimPath, tag),
fmt.Sprintf("docker run --rm -v %s/:/src/work/ kraken/%s", victimPath, tag),
)
runDockerWriter := &zapio.Writer{

View File

@ -4,9 +4,9 @@ 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"
"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"
"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/octopush/internal/serverdeps"
"git.front.kjuulh.io/kjuulh/kraken/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/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"
"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"
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.OctopushSchema) ([]string, error) {
func (pr *ProcessRepos) getRepoUrls(ctx context.Context, schema *schema.KrakenSchema) ([]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, "octopush-apply")
err = pr.gitea.CreatePr(ctx, fmt.Sprintf("%s://%s", "https", url.Host), org, semanticName, head, originHead, "kraken-apply")
if err != nil {
return err
}

View File

@ -2,7 +2,7 @@ package schema
import "gopkg.in/yaml.v3"
type OctopushSchema struct {
type KrakenSchema struct {
ApiVersion string `yaml:"apiVersion"`
Name string `yaml:"name"`
Select struct {
@ -22,8 +22,8 @@ type OctopushSchema struct {
} `yaml:"queries"`
}
func Unmarshal(raw string) (*OctopushSchema, error) {
k := &OctopushSchema{}
func Unmarshal(raw string) (*KrakenSchema, error) {
k := &KrakenSchema{}
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/octopush/internal/api"
"git.front.kjuulh.io/kjuulh/octopush/internal/serverdeps"
"git.front.kjuulh.io/kjuulh/kraken/internal/api"
"git.front.kjuulh.io/kjuulh/kraken/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/octopush/internal/serverdeps"
"git.front.kjuulh.io/kjuulh/octopush/internal/services/signer"
"git.front.kjuulh.io/kjuulh/kraken/internal/serverdeps"
"git.front.kjuulh.io/kjuulh/kraken/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/octopush/internal/serverdeps"
"git.front.kjuulh.io/kjuulh/kraken/internal/serverdeps"
"go.uber.org/zap"
)

View File

@ -1,12 +1,12 @@
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"
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"
"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: "octopush@kasperhermansen.com",
PrivateKeyIdentity: "kraken@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/octopush/internal/services/storage"
"git.front.kjuulh.io/kjuulh/kraken/internal/services/storage"
"go.uber.org/zap"
)

View File

@ -6,8 +6,8 @@ import (
"fmt"
"time"
"git.front.kjuulh.io/kjuulh/octopush/internal/services/signer"
"git.front.kjuulh.io/kjuulh/octopush/internal/services/storage"
"git.front.kjuulh.io/kjuulh/kraken/internal/services/signer"
"git.front.kjuulh.io/kjuulh/kraken/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("octopush-apply")
refSpec := plumbing.NewBranchReferenceName("kraken-apply")
err = gitRepo.repo.CreateBranch(&config.Branch{
Name: "octopush-apply",
Name: "kraken-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", "octopush-apply")
remoteRef := plumbing.NewRemoteReferenceName("origin", "kraken-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: "octopush", Email: "octopush@kasperhermansen.com", When: time.Now()},
Committer: &object.Signature{Name: "octopush", Email: "octopush@kasperhermansen.com", When: time.Now()},
Author: &object.Signature{Name: "kraken", Email: "kraken@kasperhermansen.com", When: time.Now()},
Committer: &object.Signature{Name: "kraken", Email: "kraken@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, "octopush"),
Path: path.Join(tempDir, "kraken"),
}, nil
}

View File

@ -19,7 +19,7 @@
## Version 0.1
- [x] Setup a way to choose actions and predicates
- [x] Allow instantiation of actions, octopush template repo etc.
- [x] Allow instantiation of actions, kraken template repo etc.
- [x] Implement docker action
- [x] Create pr for gitea provider
- [x] Providing query results
@ -28,14 +28,13 @@
## 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 .octopush store for easy access to settings
- [ ] Implement global .kraken 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/octopush.git || true
git remote add github git@github.com:kjuulh/kraken.git || true
git push -f github main

View File

@ -4,8 +4,8 @@ set -e
current_branch=$(git branch --show-current)
#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"\
#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"\
--branch "$current_branch" \
--path "_examples/actions/add_releaserc"
--path "_examples/queries/find_semantic"