Compare commits
9
Commits
7f28a5894c
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71c193340e | ||
|
|
f2ae0d259f
|
||
|
|
5ed645a093 | ||
|
|
b3d9c99f89
|
||
|
|
e2f7423027
|
||
|
|
e0e35b3e83 | ||
|
|
c834c0b905
|
||
|
|
d88c6973a2 | ||
|
|
571dc04f8f
|
@@ -1,125 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e -o pipefail
|
|
||||||
|
|
||||||
chart_file="Chart.yaml"
|
|
||||||
if [ ! -f "${chart_file}" ]; then
|
|
||||||
echo "ERROR: ${chart_file} not found!" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
default_new_tag="$(git tag --sort=-version:refname | head -n 1)"
|
|
||||||
default_old_tag="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)"
|
|
||||||
|
|
||||||
if [ -z "${1}" ]; then
|
|
||||||
echo "Enter start tag [${default_old_tag}]:"
|
|
||||||
read -r old_tag
|
|
||||||
if [ -z "${old_tag}" ]; then
|
|
||||||
old_tag="${default_old_tag}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [ -z "$(git tag --list "${old_tag}")" ]; do
|
|
||||||
echo "ERROR: Tag '${old_tag}' not found!" 1>&2
|
|
||||||
echo "Enter start tag [${default_old_tag}]:"
|
|
||||||
read -r old_tag
|
|
||||||
if [ -z "${old_tag}" ]; then
|
|
||||||
old_tag="${default_old_tag}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
|
||||||
old_tag=${1}
|
|
||||||
if [ -z "$(git tag --list "${old_tag}")" ]; then
|
|
||||||
echo "ERROR: Tag '${old_tag}' not found!" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${2}" ]; then
|
|
||||||
echo "Enter end tag [${default_new_tag}]:"
|
|
||||||
read -r new_tag
|
|
||||||
if [ -z "${new_tag}" ]; then
|
|
||||||
new_tag="${default_new_tag}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [ -z "$(git tag --list "${new_tag}")" ]; do
|
|
||||||
echo "ERROR: Tag '${new_tag}' not found!" 1>&2
|
|
||||||
echo "Enter end tag [${default_new_tag}]:"
|
|
||||||
read -r new_tag
|
|
||||||
if [ -z "${new_tag}" ]; then
|
|
||||||
new_tag="${default_new_tag}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
|
||||||
new_tag=${2}
|
|
||||||
|
|
||||||
if [ -z "$(git tag --list "${new_tag}")" ]; then
|
|
||||||
echo "ERROR: Tag '${new_tag}' not found!" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
change_log_yaml=$(mktemp)
|
|
||||||
echo "[]" > "${change_log_yaml}"
|
|
||||||
|
|
||||||
function map_type_to_kind() {
|
|
||||||
case "${1}" in
|
|
||||||
feat)
|
|
||||||
echo "added"
|
|
||||||
;;
|
|
||||||
fix)
|
|
||||||
echo "fixed"
|
|
||||||
;;
|
|
||||||
chore|style|test|ci|docs|refac)
|
|
||||||
echo "changed"
|
|
||||||
;;
|
|
||||||
revert)
|
|
||||||
echo "removed"
|
|
||||||
;;
|
|
||||||
sec)
|
|
||||||
echo "security"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "skip"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
commit_titles="$(git log --pretty=format:"%s" "${old_tag}..${new_tag}")"
|
|
||||||
|
|
||||||
echo "INFO: Generate change log entries from ${old_tag} until ${new_tag}"
|
|
||||||
|
|
||||||
while IFS= read -r line; do
|
|
||||||
if [[ "${line}" =~ ^([a-zA-Z]+)(\([^\)]+\))?\:\ (.+)$ ]]; then
|
|
||||||
type="${BASH_REMATCH[1]}"
|
|
||||||
kind=$(map_type_to_kind "${type}")
|
|
||||||
|
|
||||||
if [ "${kind}" == "skip" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
desc="${BASH_REMATCH[3]}"
|
|
||||||
|
|
||||||
echo "- ${kind}: ${desc}"
|
|
||||||
|
|
||||||
jq --arg kind "${kind}" --arg description "${desc}" '. += [ $ARGS.named ]' < "${change_log_yaml}" > "${change_log_yaml}.new"
|
|
||||||
mv "${change_log_yaml}.new" "${change_log_yaml}"
|
|
||||||
|
|
||||||
fi
|
|
||||||
done <<< "${commit_titles}"
|
|
||||||
|
|
||||||
if [ -s "${change_log_yaml}" ]; then
|
|
||||||
yq --inplace --input-format json --output-format yml "${change_log_yaml}"
|
|
||||||
yq --no-colors --inplace ".annotations.\"artifacthub.io/changes\" |= loadstr(\"${change_log_yaml}\") | sort_keys(.)" "${chart_file}"
|
|
||||||
else
|
|
||||||
echo "ERROR: Changelog file is empty: ${change_log_yaml}" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm "${change_log_yaml}"
|
|
||||||
|
|
||||||
regexp=".*-alpha-[0-9]+(\.[0-9]+){,2}$"
|
|
||||||
if [[ "${new_tag}" =~ $regexp ]]; then
|
|
||||||
yq --inplace '.annotations."artifacthub.io/prerelease" = "true"' "${chart_file}"
|
|
||||||
else
|
|
||||||
yq --inplace '.annotations."artifacthub.io/prerelease" = "false"' "${chart_file}"
|
|
||||||
fi
|
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||||
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
||||||
with:
|
with:
|
||||||
version: "v4.2.3" # renovate: datasource=github-tags depName=helm/helm
|
version: "v4.2.4" # renovate: datasource=github-tags depName=helm/helm
|
||||||
- name: Lint helm files
|
- name: Lint helm files
|
||||||
run: |
|
run: |
|
||||||
helm lint --values values.yaml .
|
helm lint --values values.yaml .
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||||
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
||||||
with:
|
with:
|
||||||
version: "v4.2.3" # renovate: datasource=github-tags depName=helm/helm
|
version: "v4.2.4" # renovate: datasource=github-tags depName=helm/helm
|
||||||
- env:
|
- env:
|
||||||
HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
||||||
name: Install helm-unittest
|
name: Install helm-unittest
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: volker-raschek/cosign-installer@7643eed6736a199595ed2a31e9979ec353a88adb # v4.1.3-rc3
|
- uses: volker-raschek/cosign-installer@7643eed6736a199595ed2a31e9979ec353a88adb # v4.1.3-rc3
|
||||||
with:
|
with:
|
||||||
cosign-release: "v3.1.2" # renovate: datasource=github-tags depName=sigstore/cosign
|
cosign-release: "v3.1.3" # renovate: datasource=github-tags depName=sigstore/cosign
|
||||||
|
|
||||||
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
||||||
with:
|
with:
|
||||||
version: "v4.2.3" # renovate: datasource=github-tags depName=helm/helm
|
version: "v4.2.4" # renovate: datasource=github-tags depName=helm/helm
|
||||||
|
|
||||||
- name: Install helm plugins
|
- name: Install helm plugins
|
||||||
env:
|
env:
|
||||||
@@ -69,11 +69,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Add Artifacthub.io annotations
|
- uses: volker-raschek/ah-annotations@994de3ecec889e7c52f2efb1607cbe96f1924fcc # v0.2.0
|
||||||
run: |
|
|
||||||
NEW_TAG="$(git tag --sort=-version:refname | head -n 1)"
|
|
||||||
OLD_TAG="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)"
|
|
||||||
.gitea/scripts/add-annotations.sh "${OLD_TAG}" "${NEW_TAG}"
|
|
||||||
|
|
||||||
- name: Extract meta information
|
- name: Extract meta information
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ CONTAINER_RUNTIME?=$(shell which podman)
|
|||||||
# HELM_IMAGE
|
# HELM_IMAGE
|
||||||
HELM_IMAGE_REGISTRY_HOST?=docker.io
|
HELM_IMAGE_REGISTRY_HOST?=docker.io
|
||||||
HELM_IMAGE_REPOSITORY?=volkerraschek/helm
|
HELM_IMAGE_REPOSITORY?=volkerraschek/helm
|
||||||
HELM_IMAGE_VERSION?=4.2.3 # renovate: datasource=docker registryUrl=https://docker.io depName=volkerraschek/helm
|
HELM_IMAGE_VERSION?=3.19.2 # renovate: datasource=docker registryUrl=https://docker.io depName=volkerraschek/helm
|
||||||
HELM_IMAGE_FULLY_QUALIFIED=${HELM_IMAGE_REGISTRY_HOST}/${HELM_IMAGE_REPOSITORY}:${HELM_IMAGE_VERSION}
|
HELM_IMAGE_FULLY_QUALIFIED=${HELM_IMAGE_REGISTRY_HOST}/${HELM_IMAGE_REPOSITORY}:${HELM_IMAGE_VERSION}
|
||||||
|
|
||||||
# NODE_IMAGE
|
# NODE_IMAGE
|
||||||
|
|||||||
Reference in New Issue
Block a user