-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade CI actions for use with Helm 3. The chart-testing action changed significantly in its 2.0.0 release and the workflow is almost completely new. The revision is mostly their current example: https://github.com/helm/chart-testing-action/tree/v2.0.1#upgrading-from-v1xx These changes no longer use the config files and exclude the original timeout override. It doesn't look like we should need that since the current default is longer than the old override (300s vs 200s).
- Loading branch information
Travis Raines
committed
Mar 4, 2021
1 parent
6129d11
commit 0b0405d
Showing
4 changed files
with
56 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,28 +11,38 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch history | ||
run: git fetch --prune --unshallow | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- name: Run chart-testing (lint) | ||
id: lint | ||
uses: helm/[email protected] | ||
- uses: actions/setup-python@v2 | ||
with: | ||
command: lint | ||
config: ct-main.yaml | ||
python-version: 3.7 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --remote origin | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
with: | ||
install_local_path_provisioner: true | ||
if: steps.lint.outputs.changed == 'true' | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
uses: helm/[email protected] | ||
with: | ||
command: install | ||
config: ct-main.yaml | ||
run: ct install | ||
release: | ||
needs: lint-test | ||
runs-on: ubuntu-latest | ||
|
@@ -49,18 +59,16 @@ jobs: | |
git config user.email "[email protected]" | ||
# See https://github.com/helm/chart-releaser-action/issues/6 | ||
- name: Install Helm | ||
run: | | ||
curl -sSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get | ||
chmod 700 get_helm.sh | ||
./get_helm.sh | ||
helm init --client-only | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- name: Add dependency chart repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@v1.0.0-alpha.2 | ||
uses: helm/chart-releaser-action@v1.1.0 | ||
env: | ||
CR_TOKEN: "${{ secrets.CR_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches-ignore: | ||
- 'main' | ||
- 'kong-1.x' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
@@ -14,23 +15,35 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch history | ||
run: git fetch --prune --unshallow | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- name: Run chart-testing (lint) | ||
id: lint | ||
uses: helm/[email protected] | ||
- uses: actions/setup-python@v2 | ||
with: | ||
command: lint | ||
python-version: 3.7 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint --chart-repos bitnami=https://charts.bitnami.com/bitnami --check-version-increment false --remote origin | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
with: | ||
install_local_path_provisioner: true | ||
if: steps.lint.outputs.changed == 'true' | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
uses: helm/[email protected] | ||
with: | ||
command: install | ||
run: ct install |
This file was deleted.
Oops, something went wrong.