Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move helm artifacts to github packages #25

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ fabric.properties
# Dependency directories (remove the comment below to include it)
# vendor/

chart/k8s-ephemeral-storage-metrics-*.tgz
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.EXPORT_ALL_VARIABLES:
.ONESHELL: # Applies to every targets in the file!

GITROOT ?= $(shell pwd)
DEPLOYMENT_NAME = ephemeral-metrics
Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions chart/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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"
Binary file removed chart/k8s-ephemeral-storage-metrics-1.0.0.tgz
Binary file not shown.
Binary file removed chart/k8s-ephemeral-storage-metrics-1.0.1.tgz
Binary file not shown.
Binary file removed chart/k8s-ephemeral-storage-metrics-1.0.2.tgz
Binary file not shown.
3 changes: 0 additions & 3 deletions index.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/release-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
Loading