feat: Helmfile V1 mode (#594)

* feat: Helmfile V1 mode

We add a new "V1 mode" to Helmfile so that you can seemlessly upgrade Helmfile from the current v0.x to the upcoming v1.0.

The idea is that we build both v0 and v1 binaries from the same tagged commit within the main branch, with different defaults for the "V1 mode"- the V1 mode is disabled by default for v0.x binaries, while it is enabled by default for v1.x binaries.

The V1 mode can be overrode at runtime via envvar. That is, even after upgrading the binary to v1, you will not see any backward-incompatible changes while you explicitly set an envvar, `HELMFILE_V1MODE=true`, at runtime.

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
Yusuke Kuoka
2022-12-22 20:30:44 +09:00
committed by GitHub
parent eb810c6c0c
commit 8144638bab
7 changed files with 83 additions and 3 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
name: Publish Binaries
name: Publish v0.x Binaries
on:
push:
branches:
- "!*"
tags:
- "v*"
- "v0*"
jobs:
goreleaser:
+33
View File
@@ -0,0 +1,33 @@
name: Publish v1.x Binaries
on:
push:
branches:
- "!*"
tags:
- "v1*"
env:
# This is referenced from .goreleaser.yml
HELMFILE_V1MODE: "true"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v1
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}