...

/

Packaging and Deploying Releases

Packaging and Deploying Releases

Learn more about packaging and deploying code changes.

Implementing GitOps principles

If we’re going to follow the GitOps principles, each release should result in a change of, at a minimum, the tag of the image and the version of the chart. Also, we might want to package the chart in a way that it can be distributed to everyone who needs it. We’ll explore that through a simulation of the development of a new feature that could result in a new release.

Let’s start by creating a new branch, just as we would normally do when working on something new. But first, we need to initialize Git.

Press + to interact
git init
git checkout -b my-new-feature

Updating values

Now, let’s imagine that we spent some time writing code and tests and that we validated that the new feature works as expected in a personal development environment and/or in a preview environment created through a pull request. Similarly, assume that we decided to release that feature. The next thing we would probably want to do is change the version of the chart and the application. As we’ve already seen, that information is stored in Chart.yaml, so let’s output that as a refresher.

The output is as follows.

Press + to interact
apiVersion: v1
description: A Helm chart
name: go-demo-9
version: 0.0.1
appVersion: 0.0.1

All we have to do is change the version and appVersion values. Normally, we’d do that by opening ...