Skip to content

Commit

Permalink
Merge branch 'master' into 342-bug-changelog-breaks-when-no-annotatio…
Browse files Browse the repository at this point in the history
…ns-defined
  • Loading branch information
chgl committed Sep 24, 2023
2 parents 1c69a52 + 741cd4d commit 81305d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ An always up to date collection of useful tools for your Kubernetes linting and
Mount a folder containing your Helm or raw Kubernetes manifests:

```sh
docker run --rm -it -v $PWD:/root/workspace ghcr.io/chgl/kube-powertools:v2.2.0
docker run --rm -it -v $PWD:/root/workspace ghcr.io/chgl/kube-powertools:v2.2.1
```

The container image is pushed to these two registries:

- docker.io/chgl/kube-powertools:v2.2.0
- ghcr.io/chgl/kube-powertools:v2.2.0
- docker.io/chgl/kube-powertools:v2.2.1
- ghcr.io/chgl/kube-powertools:v2.2.1

## Helm Chart Repositories

Expand All @@ -34,7 +34,7 @@ For example, you can mount this repository into the `kube-powertools` container
in the `/samples/charts` dir:

```sh
$ docker run --rm -it -v $PWD:/root/workspace ghcr.io/chgl/kube-powertools:v2.2.0
$ docker run --rm -it -v $PWD:/root/workspace ghcr.io/chgl/kube-powertools:v2.2.1
bash-5.1# CHARTS_DIR=samples/charts chart-powerlint.sh
```

Expand Down Expand Up @@ -107,7 +107,7 @@ First, determine the digest of the container image to verify. This digest is als
the packages page on GitHub: <https://github.com/chgl/kube-powertools/pkgs/container/kube-powertools>.

```sh
IMAGE=ghcr.io/chgl/kube-powertools:v2.2.0
IMAGE=ghcr.io/chgl/kube-powertools:v2.2.1
IMAGE_DIGEST=$(crane digest $IMAGE)
IMAGE_TAG="${IMAGE#*:}"
```
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-chart-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for dir in "$CHARTS_DIR"/*; do

# shellcheck disable=SC2002 # using cat makes the code look neater
cat "$dir/Chart.yaml" |
yq e '.annotations["artifacthub.io/changes"] // []' - | # extract the changes annotation, which is a YAML array
yq e '.annotations["artifacthub.io/changes"] // []' - | # extract the changes annotation, which is a YAML array
yq -o json e '.' - | # convert the YAML array to a JSON array
jq 'group_by(.kind) | to_entries | map({key: .value[0].kind, value: .value})' - | # group the JSON array by their 'kind' - ie. the type of change
gomplate -d chart="$dir/Chart.yaml" -d changes=stdin:///in.json -f $CHANGELOG_TEMPLATE_FILE_PATH >"$dir/CHANGELOG.md" # use the JSON above as input to render the changelog
Expand Down

0 comments on commit 81305d6

Please sign in to comment.