diff --git a/.gitignore b/.gitignore index b5d7bd7..41b88b8 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,4 @@ fabric.properties # Dependency directories (remove the comment below to include it) # vendor/ +chart/k8s-ephemeral-storage-metrics-*.tgz diff --git a/Makefile b/Makefile index f5d3b62..3c2424f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ .EXPORT_ALL_VARIABLES: +.ONESHELL: # Applies to every targets in the file! GITROOT ?= $(shell pwd) DEPLOYMENT_NAME = ephemeral-metrics @@ -46,15 +47,24 @@ deploy_e2e: init ginkgo new_kind release-docker: GITHUB_TOKEN="${GITHUB_TOKEN}" VERSION="${VERSION}" ./scripts/release-docker.sh -release: github_login release-docker helm-docs +release-helm: helm-docs + cd chart + sed -i "s/tag.*/tag: ${VERSION}/g" values.yaml + sed -i "s/version.*/version: ${VERSION}/g" Chart.yaml + sed -i "s/appVersion.*/appVersion: ${VERSION}/g" Chart.yaml + helm package . + helm repo index --merge index.yaml . + sed -i "s!k8s-ephemeral-storage-metrics-${VERSION}.tgz!https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics/releases/download/${VERSION}/k8s-ephemeral-storage-metrics-${VERSION}.tgz!g" index.yaml + cd .. + +release: github_login release-docker release-helm # ex. make VERSION=1.0.1 release - helm package chart --destination chart - helm repo index --merge index.yaml chart/. - release-github: github_login # ex. make VERSION=1.0.1 release-github gh release create ${VERSION} --generate-notes + gh release upload ${VERSION} "chart/k8s-ephemeral-storage-metrics-${VERSION}.tgz" + rm chart/k8s-ephemeral-storage-metrics-*.tgz github_login: gh auth login --web --scopes=read:packages,write:packages \ No newline at end of file diff --git a/chart/index.yaml b/chart/index.yaml index 7fa4242..924fb67 100644 --- a/chart/index.yaml +++ b/chart/index.yaml @@ -21,7 +21,7 @@ entries: sources: - https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics urls: - - k8s-ephemeral-storage-metrics-1.0.2.tgz + - https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics/releases/download/1.0.2/k8s-ephemeral-storage-metrics-1.0.2.tgz version: 1.0.2 - annotations: artifacthub.io/license: MIT @@ -43,7 +43,7 @@ entries: sources: - https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics urls: - - k8s-ephemeral-storage-metrics-1.0.1.tgz + - https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics/releases/download/1.0.1/k8s-ephemeral-storage-metrics-1.0.1.tgz version: 1.0.1 - annotations: artifacthub.io/license: MIT @@ -65,6 +65,6 @@ entries: sources: - https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics urls: - - k8s-ephemeral-storage-metrics-1.0.0.tgz + - https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics/releases/download/1.0.0/k8s-ephemeral-storage-metrics-1.0.0.tgz version: 1.0.0 generated: "2023-10-20T13:24:12.479459598-05:00" diff --git a/chart/k8s-ephemeral-storage-metrics-1.0.0.tgz b/chart/k8s-ephemeral-storage-metrics-1.0.0.tgz deleted file mode 100644 index 2ec7b2e..0000000 Binary files a/chart/k8s-ephemeral-storage-metrics-1.0.0.tgz and /dev/null differ diff --git a/chart/k8s-ephemeral-storage-metrics-1.0.1.tgz b/chart/k8s-ephemeral-storage-metrics-1.0.1.tgz deleted file mode 100644 index fb42d39..0000000 Binary files a/chart/k8s-ephemeral-storage-metrics-1.0.1.tgz and /dev/null differ diff --git a/chart/k8s-ephemeral-storage-metrics-1.0.2.tgz b/chart/k8s-ephemeral-storage-metrics-1.0.2.tgz deleted file mode 100644 index 15e9321..0000000 Binary files a/chart/k8s-ephemeral-storage-metrics-1.0.2.tgz and /dev/null differ diff --git a/index.yaml b/index.yaml deleted file mode 100644 index 0dd2924..0000000 --- a/index.yaml +++ /dev/null @@ -1,3 +0,0 @@ -apiVersion: v1 -entries: {} -generated: "2023-10-15T12:07:02.648748624-05:00" diff --git a/scripts/release-docker.sh b/scripts/release-docker.sh index fb06ee7..53c6e6e 100755 --- a/scripts/release-docker.sh +++ b/scripts/release-docker.sh @@ -13,9 +13,6 @@ if [ -z "$VERSION" ]; then exit 1 fi -sed -i "s/tag.*/tag: ${VERSION}/g" chart/values.yaml -sed -i "s/version.*/version: ${VERSION}/g" chart/Chart.yaml -sed -i "s/appVersion.*/appVersion: ${VERSION}/g" chart/Chart.yaml gh auth token | docker login ghcr.io --username jmcgrath207 --password-stdin docker build -f Dockerfile -t ghcr.io/jmcgrath207/$package:$VERSION .