Kasper Juul Hermansen
ad72050779
Welcome to [Renovate](https://github.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin. 🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged. --- ### Detected Package Files * `_examples/actions/docker_action/Dockerfile` (dockerfile) * `templates/build_release.Dockerfile` (dockerfile) * `_examples/actions/add_releaserc/go.mod` (gomod) * `_examples/actions/docker_action/go.mod` (gomod) * `_examples/actions/write_a_readme/go.mod` (gomod) * `go.mod` (gomod) ### Configuration Summary Based on the default config's presets, Renovate will: - Start dependency updates only once this onboarding PR is merged - Enable Renovate Dependency Dashboard creation - If semantic commits detected, use semantic commit type <code>fix</code> for dependencies and <code>chore</code> for all others - Ignore `node_modules`, `bower_components`, `vendor` and various test/tests directories - Autodetect whether to pin dependencies or maintain ranges - Rate limit PR creation to a maximum of two per hour - Limit to maximum 10 open PRs at any time - Group known monorepo packages together - Use curated list of recommended non-monorepo package groupings - Fix some problems with very old Maven commons versions - Ignore spring cloud 1.x releases - Ignore web3j 5.0.0 release - Ignore http4s digest-based 1.x milestones - Use node versioning for @types/node - Limit concurrent requests to reduce load on Repology servers until we can fix this properly, see issue 10133 - Do not upgrade from Alpine stable to edge 🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the `renovate.json` in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs. --- ### What to Expect It looks like your repository dependencies are already up-to-date and no Pull Requests will be necessary right away. --- ### ⚠ Dependency Lookup Warnings ⚠ Please correct - or verify that you can safely ignore - these lookup failures before you merge this PR. - `Failed to look up dependency github.com/bitfield/script` - `Failed to look up dependency code.gitea.io/sdk/gitea` - `Failed to look up dependency git.front.kjuulh.io/kjuulh/curre` - `Failed to look up dependency github.com/ProtonMail/go-crypto` - `Failed to look up dependency github.com/gin-contrib/zap` - `Failed to look up dependency github.com/gin-gonic/gin` - `Failed to look up dependency github.com/go-git/go-git/v5` - `Failed to look up dependency github.com/google/uuid` - `Failed to look up dependency github.com/spf13/cobra` - `Failed to look up dependency github.com/stretchr/testify` - `Failed to look up dependency github.com/whilp/git-urls` - `Failed to look up dependency go.uber.org/zap` - `Failed to look up dependency golang.org/x/net` - `Failed to look up dependency gopkg.in/yaml.v3` Files affected: `_examples/actions/add_releaserc/go.mod`, `_examples/actions/docker_action/go.mod`, `_examples/actions/write_a_readme/go.mod`, `go.mod` --- ❓ Got questions? Check out Renovate's [Docs](https://docs.renovatebot.com/), particularly the Getting Started section. If you need any further assistance then you can also [request help here](https://github.com/renovatebot/renovate/discussions). --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: #22 |
||
---|---|---|
_examples | ||
assets | ||
cmd | ||
example | ||
integration_test | ||
internal | ||
scripts | ||
templates | ||
.gitignore | ||
CONFIGURATION_SERVER.md | ||
cuddle.yaml | ||
go.mod | ||
go.sum | ||
LICENSE | ||
README.md | ||
renovate.json | ||
roadmap.md |
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. Octopush aims to change that.
DISCLAIMER: It is still early days, and the api is subject to change.
Features
- Uses an actions repository, where you store all your pending commands or queries to be performed across your fleet of repositories. (See _examples)
- Actions can both execute changes, open pull-requests or in some cases commit
directly to your preferred branch
- Actions natively use either shell, go or docker files to execute changes (see _examples/actions)
- Actions can also be analytical, so you can query your fleet for whatever you would like
- Works both as a client, or as a server
- Supports SSH/https for fetching repos
- Supports GPG signing
- Supports dry-run mode for easy testing when developing your actions (enabled by default on the cli)
Roadmap
Refer to roadmap.md
Installation
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 Octopush in server mode, which supports more features, and has extra security built in.
Client (CLI)
Download executable from releases
Or Use docker image
docker run --rm kasperhermansen/octopushcli:latest version
Or Build from source
git clone https://github.com/kjuulh/octopush.git
cd octopush
go build cmd/octopush/octopush.go
./octopush version
Or Build with cuddle
git clone https://github.com/kjuulh/octopush.git
cd octopush
cuddle_cli x build_cli
Server
We prefer to run the server directly as a docker image.
docker pull kasperhermansen/octopushserver:latest
docker run -p 9090:80 --rm kasperhermansen/octopushserver:latest
Or Build from source
git clone https://github.com/kjuulh/octopush.git
cd octopush
go build cmd/server/server.go
./server version
Or Build with cuddle
git clone https://github.com/kjuulh/octopush.git
cd octopush
cuddle_cli x build_server
Usage
DISCLAIMER: It is still early days, and the api of the CLI is subject to change, this provides the aim of the project, but as it is currently in flux, there may not be as much handholding in the actual usage.
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)
Octopush 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
Creating a new action
Creating a new action
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
# Output
# apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
# name: write-a-readme
# select:
# repositories: []
# actions:
# - type: shell
# entry: "main.sh"
Octopush also ships with yaml schema, which should help write the yaml configuration.
Add upstream repositories (victims)
Now add a preferred repository
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
- gitea: https://git.front.kjuulh.io # new
organisation: "kjuulh" # new
actions:
- type: shell
entry: "main.sh"
EOF
This will take all your repositories under an organisation and run the script on.
Another could be to use
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/octopush.git #new
- git@git.front.kjuulh.io:kjuulh/octopush-test.git #new
actions:
- type: shell
entry: "main.sh"
EOF
This will just apply to those repositories instead. Both can also be combined for a shared effect.
Execute action
To run the script use
octopush process --path "write-a-readme"
This will cause the octopush process to automatically apply the action on the repo and open a pr.
Query repositories
Octopush can also be used to query.
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/octopush.git
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
queries:
- type: grep
query: "# README"
EOF
Using the same command as above, will return the lines on each repo with those criteria. Everything is run in docker, even locally, so no need to install fancy 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
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
.
Contributing
It is still early days, and as such things are moving fast, I may not be able to implement features, because I am focusing my energy on the API. That said PRs are welcome, though they are at your own risk.
Bugs & features requests
Please use issues
Development
We use cuddle to improve ease of use, it is however, not a requirement, and probably won't need to be used outside core maintainers.
Simply:
go run cmd/octopush/octopush.go # CLI
go run cmd/server/server.go # Server
We follow the gofmt
formatting, along with optionally but recommend golines
If using cuddle
cuddle_cli x run # Run both server and client, will do a quick test sweep on the cli
cuddle_cli x watch_run # Automatically refresh both
cuddle_cli x fmt # will format the current code