Sparrow is a bot runs jobs on Cloud Build events.
10K+
Sparrow is a bot runs jobs on Cloud Build events. It subscribes to Cloud Build events through the Cloud PubSub topic `cloud-builds, which is available out of the box.
Sparrow can
Sparrow might be helpful if you
Sparrow is an alpha project and is subject to change (though it works well on our specific use case).
Sparrow sends messages to Slack on every Cloud Build event. A slack message has links to
We plan to support
Sparrow rewrites container image tags in Kubernetes manifest files by creating pull requests on GitHub.
Sparrow assumes an app
When a commit is pushed to the code repository's master branch,
A commit message of tag rewriting contains
Sparrow has many assumptions for tag rewriting to work. We don't have a plan to support other use cases (code and config repositories are the same for example) but contributions are welcome.
The behavior of Sparrow is configured by SPARROW_CONFIG that points to a path
of a YAML file. For example SPARROW_CONFIG=/etc/sparrow.yml.
The sparrow configuration YAML supports the following keys.
# Configuration spec version, currently 0.1.
version: 0.1
# `jobs` specifies what jobs to run from Cloud PubSub subscription X of project
# Y.
jobs:
# Run `Slack` job on events streamed from `project-a`'s Cloud PubSub
# subscription `slack`. `Slack` job sends messages to slack on every event.
- class: Slack
project_id: project-a
subscription: slack
# Run `GitOps` job on events streamed from `project-b`'s Cloud PubSub
# subscription `gitops`. `GitOps` updates container image tags on kubernetes
# manifest files.
- class: Slack
project_id: project-b
subscription: gitops
class_args:
targets:
# When an event is from repository "org/app1", evaluates the ERB
# template at `overlays/dev/kustomization.yaml.erb` in the
# configuration repository `org/app1-conf` and writes the evaluated
# result to `overlays/dev/kustomization.yaml`.
- source_repo: org/app1
config_repo: org/app1-conf
rewrites:
- name: dev
erb_path: overlays/dev/kustomization.yaml.erb
out_path: overlays/dev/kustomization.yaml
You can deploy Sparrow using Docker. Docker image is available at https://hub.docker.com/r/anipos/sparrow.
Sparrow requires
The IAM key must have
TBA.
Content type
Image
Digest
sha256:4b07a5888…
Size
380.1 MB
Last updated
over 3 years ago
docker pull anipos/sparrow