GitOps
Description of Release GitOps workflow
You can use the Release UI to manage your Application Template, Environment Variables files, and environment configurations. But Release also supports managing these configuration files in your Git repository.
If your code and its Release configuration file are in the same branch of your Git repository, GitOps gives you concise management and version control of files.
Requirements
In order to use GitOps with Release, you'll need to:
Contact [email protected] to enable GitOps for your account. GitOps is enabled for your whole account by default, but you can opt to enable GitOps per application and manage other applications using the Release UI.
We strongly encourage you to make sure you use secret references from one of our supported vaults.
Add these two lines to your
.release.yamlfile:application_template: .release/application_template.yaml environment_variables: .release/environment_variables.yamlCheck the
application_template.yamlandenvironment_variables.yamlfiles in to your.releasedirectory.

Release configuration relationships
Here's a simplified diagram of Release configuration relationships:

When you create an application, Release automatically creates a default Application Template and a default Environment Variables file. These files can be modified to include your application specifics.
Each time you create an environment for your application, Release will configure it using the Application Template and environment variables.
No configuration for any environment is stored in GitOps.
When you make changes to either the Application Template or the Environment Variables file, a new environment configuration is created and deployed.
Immutability, Updates, and Overrides
If you have GitOps enabled, any changes you make to the configuration files are only updated from your repo, and no longer from the Release UI. It is still possible to update the configurations manually, but the next push from your repository will override the manual updates. There are a few exceptions noted below.
Whenever you modify and save an environment's configuration, the environment's configuration version number is incremented. The version number is made up of the version of the Application Template the environment was based on (the first digit), and the version of the environment-specific configuration currently deployed (the second digit). Changes to an environment's configuration will not change the first digit of an environment's version number. Saving an environment configuration file or environment variables file will change the second digit, incrementing the number by one.
In this diagram, you can see how different environments can be based on different Application Template versions:

GitOps workflow
When using GitOps, environment-specific configuration is automatically generated via a webhook processor that follows the workflow illustrated below.

With every push to your repository, Release runs this workflow to decide whether it should create new templates or configurations and whether it should deploy to any environments.
Pseudocode for the GitOps flow chart
GitOps allows you to have different environment configurations in different branches that can be merged back to your main branch. In the same way you work on features and bugs in branches, you can try new configurations by making changes to your Application Template and environment variables in branches. When you merge back to your main branch, your configuration changes will be included. GitOps automatically pushes and deploys configuration changes to your Release environments.
Last updated
Was this helpful?