CI/CD reimagined Balena-style. Reactive. Scalable. Batteries included.
- adds CI/CD capabilities to ProductOS: using a primitive that we call a "Transformer".
- A Transformer is a piece of code, wrapped in a container, that takes input and produces output: Input and output can be anything but must be described with some our own meta-data format which we call "contracts" and which you typically find in a file called
balena.yml. Transformers have an input filter, which is a JSON schema which gets matched against any contract that gets picked up by our GitHub integration. If it matches the Transformer gets executed with the input and its contract.
Because other CI/CD systems just didn't cut it...
This repository can be set to automatically deploy to a balena fleet using Github actions. Any push or merge to master will be deployed to the target fleet.
To enable automatic deployments using Github Actions, you will need to create a production environment in the repository settings and add the following environment secrets:
BALENA_FLEET: the slug of the balena fleet. Follows the format<org_name>/<fleet_name>.BALENA_API_KEY_PUSH: a balena API key for pushing the code to the balena builders.
Please refer to this guide for setting up an environment and the required secrets.
The Github workflow uses the deploy-to-balena Github action.
- Run
BALENA_APP=<Balena app> ./push-to-balena.sh
FLEET_HOSTNAME: Url totransformers-fleetserverFLEET_ENROLL_SECRET: Secret used to enroll to the device totransformers-fleetFLEET_EXTRA_ARGS: Extra arguments that should be passed tofleet-launcherat start time.
JF_API_URL: Url to the JellyFish API serverJF_API_PREFIX: JellyFish API prefixREGISTRY_URL: Url to the transformers private registryREGISTRY_PORT: Port to be used when connecting to the registry. Default: 80
GC_MAX_STORAGE_THRESHOLD: GC will kick in when the disk space is below this threshold
transformer-worker is free software, and may be redistributed under the terms specified in the license.