GithubHelp home page GithubHelp logo

maximilien-r / octopilot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dailymotion-oss/octopilot

0.0 0.0 0.0 15.38 MB

Automate your Gitops workflow, by automatically creating/merging GitHub Pull Requests

Home Page: https://dailymotion-oss.github.io/octopilot/

License: MIT License

Go 99.49% Nix 0.51%

octopilot's Introduction

Octopilot

Go Report Card Release Status Latest Release Go Reference

Octopilot is a CLI tool designed to help you automate your Gitops workflow, by automatically creating and merging GitHub Pull Requests to update specific content in Git repositories.

If you are doing Gitops with GitHub-hosted repositories, Octopilot is your swiss army knife to propagate changes in your infrastructure.

Octopilot was initially developed at Dailymotion, and is a core component of our Gitops workflow - you can read our blog post Introducing Octopilot: a CLI to automate the creation of GitHub pull requests in your gitops workflow.


Features

  • written in Go, and has 0 dependencies - not even git
  • native support for manipulating YAML or JSON files - which are commonly used in the Gitops world to describe resources
  • native support for manipulating files encrypted with sops - because who wants to store non-encrypted sensitive data in git?
  • supports regex-based updates to any kind of files - for these times when you need raw power
  • supports executing any command/tool - because you don't want to be limited by what we support
  • supports multiple strategies to create/update the PRs
  • supports automatic merge of the PRs - once the pre-configured CI checks are green
  • can update one or more GitHub repositories from a single execution - including dynamically defined repositories, using a GitHub search query
  • can execute one or more update rules in a single execution

Documentation


Example

Updating multiple repositories, and executing multiple update rules at once:

$ octopilot \
    --github-token "my-github-token" \
    --repo "my-org/some-repo" \
    --repo "my-org/another-repo(merge=true)" \
    --repo "discover-from(env=PROMOTE_TO_REPOSITORIES)" \
    --repo "discover-from(query=org:my-org topic:my-topic)" \
    --repo "discover-from(searchtype=code,query=org:my-org filename:my-file path:dir-path in-file-text)" \
    --repo "discover-from(searchtype=code,query=org:my-org filename:my-file path:dir-path fork:true)" \
    --update "yaml(file=config.yaml,path='version')=file(path=VERSION)" \
    --update "yq(file=helmfile.yaml,expression='(.releases[] | select(.chart == \"repo/my-chart\") | .version ) = strenv(VERSION)')" \
    --update "sops(file=secrets.yaml,key=path.to.base64encodedCertificateKey)=$(kubectl -n cert-manager get secrets tls-myapp -o template='{{index .data \"tls.key\"}}')" \
    --pr-title "Updating some files" \
    ...

Screenshots

Pull Request to promote a new release of an application

Including the release notes in the Pull Request description

Pull Request to update the certificates

octopilot's People

Contributors

vbehar avatar dependabot[bot] avatar jordangoasdoue avatar jashandeep-sohi avatar troush avatar maximilien-r avatar mpv avatar jlourenc avatar mgarstecki avatar ahothan avatar virer avatar snyk-bot avatar achedeuzot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.