Skip to content

Commit b3234e9

Browse files
authored
Merge branch 'master' into fix-depguard
2 parents 9fc0b19 + 3e28c6e commit b3234e9

File tree

16 files changed

+548
-98
lines changed

16 files changed

+548
-98
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "gomod"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"

.github/workflows/ci.yaml

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
name: CI
33

44
env:
5-
VERSION_GO: '1.20.12'
6-
VERSION_HELM: 'v3.13.3'
5+
VERSION_HELM: 'v3.11.3'
76

87
on:
98
pull_request:
@@ -17,17 +16,10 @@ jobs:
1716
if: "!contains(github.event.head_commit.message, '[ci skip]')"
1817
runs-on: ubuntu-latest
1918
steps:
20-
- uses: actions/checkout@v2
21-
- uses: actions/setup-go@v2
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-go@v4
2221
with:
23-
go-version: ${{ env.VERSION_GO }}
24-
25-
- uses: actions/cache@v2
26-
with:
27-
path: ~/go/pkg/mod
28-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29-
restore-keys: |
30-
${{ runner.os }}-go-
22+
go-version-file: 'go.mod'
3123

3224
- name: Install dependencies
3325
run: make bootstrap
@@ -73,20 +65,20 @@ jobs:
7365
git config --global core.autocrlf false
7466
git config --global core.eol lf
7567
76-
- uses: actions/checkout@v2
68+
- uses: actions/checkout@v3
7769

7870
- name: Setup Helm
79-
uses: azure/setup-helm@v1.1
71+
uses: azure/setup-helm@v3
8072
with:
8173
version: ${{ env.VERSION_HELM }}
8274

8375
- name: Setup WSL
8476
if: "contains(matrix.shell, 'wsl')"
85-
uses: Vampire/setup-wsl@v1
77+
uses: Vampire/setup-wsl@v2
8678

8779
- name: Setup Cygwin
8880
if: "contains(matrix.shell, 'cygwin')"
89-
uses: egor-tensin/setup-cygwin@v3
81+
uses: egor-tensin/setup-cygwin@v4
9082
with:
9183
platform: x64
9284

@@ -103,10 +95,10 @@ jobs:
10395
with:
10496
version: "v0.11.1"
10597

106-
- uses: actions/checkout@v2
98+
- uses: actions/checkout@v3
10799

108100
- name: Setup Helm
109-
uses: azure/setup-helm@v1.1
101+
uses: azure/setup-helm@v3
110102
with:
111103
version: ${{ env.VERSION_HELM }}
112104

@@ -124,15 +116,3 @@ jobs:
124116

125117
- name: helm diff upgrade -C 3 --set replicaCount=2 --install helm-diff ./helm-diff
126118
run: helm diff upgrade -C 3 --set replicaCount=2 --install helm-diff ./helm-diff
127-
128-
shell-lint:
129-
name: Lint install-binary.sh
130-
runs-on: ubuntu-latest
131-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
132-
continue-on-error: true
133-
steps:
134-
- uses: actions/[email protected]
135-
- uses: luizm/[email protected]
136-
with:
137-
sh_checker_exclude: "scripts"
138-
sh_checker_checkbashisms_enable: true

.github/workflows/cleanup.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Cleanup
3+
4+
on:
5+
pull_request:
6+
types:
7+
- closed
8+
9+
jobs:
10+
cleanup-cache:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: 'Cleanup PR cache'
14+
run: |
15+
gh extension install actions/gh-actions-cache
16+
17+
REPO="${{ github.repository }}"
18+
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
19+
20+
echo "Fetching list of cache key"
21+
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
22+
23+
## Setting this to not fail the workflow while deleting cache keys.
24+
set +e
25+
echo "Deleting caches..."
26+
for cacheKey in $cacheKeysForPR
27+
do
28+
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
29+
done
30+
echo "Done"
31+
shell: bash
32+
env:
33+
GH_TOKEN: ${{ github.token }}

.github/workflows/lint-sh.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Lint sh
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths: ['install-binary.sh']
7+
pull_request:
8+
branches: [master]
9+
paths: ['install-binary.sh']
10+
11+
jobs:
12+
lint-sh:
13+
name: Lint install-binary.sh
14+
runs-on: ubuntu-latest
15+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
16+
continue-on-error: true
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: luizm/[email protected]
20+
with:
21+
sh_checker_exclude: 'scripts'
22+
sh_checker_checkbashisms_enable: true

.github/workflows/lint.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,16 @@ on:
99
branches: [ master ]
1010
paths-ignore: [ '**.md' ]
1111

12-
env:
13-
GO_VERSION: 1.19
14-
1512
jobs:
1613
lint:
1714
name: Lint
1815
runs-on: ubuntu-latest
1916
timeout-minutes: 10
2017
steps:
21-
- uses: actions/setup-go@v3
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-go@v4
2220
with:
23-
go-version: '1.19'
24-
25-
- name: Checkout code
26-
uses: actions/checkout@v4
27-
28-
- name: Golangci lint
29-
uses: golangci/golangci-lint-action@v3
21+
go-version-file: 'go.mod'
22+
- uses: golangci/golangci-lint-action@v3
3023
with:
3124
version: v1.55.1

.github/workflows/release.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
-
16+
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
17+
run: echo "flags=--snapshot" >> $GITHUB_ENV
18+
-
19+
name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
-
24+
name: Set up Go
25+
uses: actions/setup-go@v4
26+
with:
27+
go-version-file: 'go.mod'
28+
cache: true
29+
-
30+
name: Run GoReleaser
31+
uses: goreleaser/goreleaser-action@v4
32+
with:
33+
distribution: goreleaser
34+
version: latest
35+
args: release --clean ${{ env.flags }}
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# To test this manually, run:
2+
# go install github.com/goreleaser/goreleaser@latest
3+
# goreleaser --snapshot --clean
4+
# for f in dist/helm-diff*.tgz; do echo Testing $f...; tar tzvf $f; done
5+
project_name: helm-diff
6+
builds:
7+
- id: default
8+
main: .
9+
binary: bin/diff
10+
env:
11+
- CGO_ENABLED=0
12+
flags:
13+
- -trimpath
14+
ldflags:
15+
- -X github.com/databus23/helm-diff/v3/cmd.Version={{ .Version }}
16+
goos:
17+
- freebsd
18+
- darwin
19+
- linux
20+
- windows
21+
goarch:
22+
- amd64
23+
- arm64
24+
25+
archives:
26+
- id: default
27+
builds:
28+
- default
29+
format: tgz
30+
name_template: '{{ .ProjectName }}-{{ if eq .Os "darwin" }}macos{{ else }}{{ .Os }}{{ end }}-{{ .Arch }}'
31+
wrap_in_directory: diff
32+
files:
33+
- README.md
34+
- plugin.yaml
35+
- LICENSE
36+
changelog:
37+
use: github-native
38+
39+
release:
40+
prerelease: auto

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Flags:
113113
--set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
114114
--show-secrets do not redact secret values in the output
115115
--strip-trailing-cr strip trailing carriage return on input
116-
--suppress stringArray allows suppression of the values listed in the diff output
116+
--suppress stringArray allows suppression of the kinds listed in the diff output (can specify multiple, like '--suppress Deployment --suppress Service')
117117
-q, --suppress-secrets suppress secrets in the output
118118
--three-way-merge use three-way-merge to compute patch and generate diff output
119119
-f, --values valueFiles specify values in a YAML file (can specify multiple) (default [])
@@ -149,6 +149,14 @@ Examples:
149149
# See https://github.com/databus23/helm-diff/issues/278 for more information.
150150
HELM_DIFF_IGNORE_UNKNOWN_FLAGS=true helm diff upgrade my-release stable/postgres --wait
151151
152+
# helm-diff disallows the use of the `lookup` function by default.
153+
# To enable it, you must set HELM_DIFF_USE_INSECURE_SERVER_SIDE_DRY_RUN=true to
154+
# use `helm template --dry-run=server` or
155+
# `helm upgrade --dry-run=server` (in case you also set `HELM_DIFF_USE_UPGRADE_DRY_RUN`)
156+
# See https://github.com/databus23/helm-diff/pull/458
157+
# for more information.
158+
HELM_DIFF_USE_INSECURE_SERVER_SIDE_DRY_RUN=true helm diff upgrade my-release datadog/datadog
159+
152160
# Set HELM_DIFF_USE_UPGRADE_DRY_RUN=true to
153161
# use `helm upgrade --dry-run` instead of `helm template` to render manifests from the chart.
154162
# See https://github.com/databus23/helm-diff/issues/253 for more information.

0 commit comments

Comments
 (0)