Skip to content

Commit 092da30

Browse files
committed
chore: clean all
1 parent 0a90f57 commit 092da30

7 files changed

Lines changed: 51 additions & 151 deletions

File tree

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Build
22
on:
3-
push:
4-
branches:
5-
- "*"
63
pull_request:
74
branches:
85
- "*"

.github/workflows/release.yml

Lines changed: 44 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,65 @@
1-
name: Release
1+
name: Release Charts
22

33
on:
44
push:
5-
tags:
6-
- "v*"
5+
branches:
6+
- main
77

88
jobs:
9-
release:
10-
name: Release
9+
build:
10+
name: Build
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout main
14-
uses: actions/checkout@v4
13+
- name: Set up Go
14+
uses: actions/setup-go@v4
1515
with:
16-
fetch-depth: 0
16+
go-version: 1.25
17+
cache: false
1718

18-
- name: Extract tag version
19-
id: versioning
19+
- name: Deps
2020
run: |
21-
tag=${GITHUB_REF/refs\/tags\//}
22-
tag=${tag#v}
23-
echo ::set-output name=tag_version::$tag
21+
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
22+
chmod 700 get_helm.sh
23+
./get_helm.sh
2424
25-
- name: Extract chart version
26-
id: chart_version
27-
run: |
28-
CHART_VERSION=$(cat charts/onechart/Chart.yaml | grep ^version:)
29-
CHART_VERSION=${CHART_VERSION#version: }
30-
echo $CHART_VERSION
31-
echo ::set-output name=chart_version::$CHART_VERSION
32-
33-
CHART_VERSION=$(cat charts/cron-job/Chart.yaml | grep ^version:)
34-
CHART_VERSION=${CHART_VERSION#version: }
35-
echo $CHART_VERSION
36-
echo ::set-output name=cron_job_chart_version::$CHART_VERSION
25+
wget https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz
26+
tar xf kubeval-linux-amd64.tar.gz
27+
sudo cp kubeval /usr/local/bin
3728
38-
CHART_VERSION=$(cat charts/static-site/Chart.yaml | grep ^version:)
39-
CHART_VERSION=${CHART_VERSION#version: }
40-
echo $CHART_VERSION
41-
echo ::set-output name=static_site_chart_version::$CHART_VERSION
29+
helm plugin install https://github.com/helm-unittest/helm-unittest
4230
43-
- name: Ensure tag and chart version matches
44-
run: |
45-
echo "$TAG_VERSION"
46-
echo "$CHART_VERSION"
47-
echo "$CRON_JOB_CHART_VERSION"
48-
if [ "$TAG_VERSION" != "$CHART_VERSION" ]
49-
then
50-
echo "Tag version does not match chart version"
51-
exit 1
52-
fi
53-
if [ "$TAG_VERSION" != "$CRON_JOB_CHART_VERSION" ]
54-
then
55-
echo "Tag version does not match cron-job chart version"
56-
exit 1
57-
fi
58-
env:
59-
TAG_VERSION: ${{ steps.versioning.outputs.tag_version }}
60-
CHART_VERSION: ${{ steps.chart_version.outputs.chart_version }}
61-
CRON_JOB_CHART_VERSION: ${{ steps.chart_version.outputs.cron_job_chart_version }}
62-
63-
- name: Create a Release
64-
uses: elgohr/Github-Release-Action@v5
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
- name: Check out
32+
uses: actions/checkout@v4
6733
with:
68-
title: Release ${{ github.ref }}
34+
fetch-depth: 1
6935

70-
- name: Publishing to the Helm repository
36+
- name: Test
7137
run: |
72-
git config --global user.email "action@github.com"
73-
git config --global user.name "Github Action"
74-
git checkout main
75-
make package
76-
git add .
77-
git commit -m "Publishing $TAG_VERSION to the Helm repository"
78-
git push origin main
79-
env:
80-
TAG_VERSION: ${{ steps.versioning.outputs.tag_version }}
81-
title: Release ${{ github.ref }}
38+
make lint
39+
make kubeval
40+
make test
41+
release:
42+
runs-on: ubuntu-latest
43+
needs: build
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v5
47+
with:
48+
fetch-depth: 0
8249

83-
- name: Publish to to GHCR
50+
- name: Configure Git
8451
run: |
85-
echo ${{ secrets.HELM_TOKEN }} | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin
86-
helm push docs/onechart-${CHART_VERSION}.tgz oci://ghcr.io/techmagister
87-
helm push docs/cron-job-${CHART_VERSION}.tgz oci://ghcr.io/techmagister
88-
helm push docs/static-site-${STATIC_SITE_CHART_VERSION}.tgz oci://ghcr.io/techmagister
89-
env:
90-
CHART_VERSION: ${{ steps.chart_version.outputs.chart_version }}
91-
STATIC_SITE_CHART_VERSION: ${{ steps.chart_version.outputs.static_site_chart_version }}
92-
- name: Preparing the next release version
93-
run: |
94-
git config --global user.email "action@github.com"
95-
git config --global user.name "Github Action"
96-
git checkout main
97-
98-
without_major_version=${CHART_VERSION#*.}
99-
without_patch_version=${without_major_version%.*}
100-
increased_minor_version=$(($without_patch_version + 1))
101-
major_version=${CHART_VERSION%%.*}
102-
increased_version="$major_version.$increased_minor_version.0"
103-
echo "The new version will be $increased_version"
52+
git config user.name "$GITHUB_ACTOR"
53+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
10454
105-
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/onechart/Chart.yaml
106-
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/cron-job/Chart.yaml
107-
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/static-site/Chart.yaml
55+
- name: Install Helm
56+
uses: azure/setup-helm@v4
57+
with:
58+
version: v3.18.4
10859

109-
git status
110-
git add .
111-
git commit -m "The next release version will be $increased_version"
112-
git push origin main
60+
- name: Run chart-releaser
61+
uses: helm/chart-releaser-action@v1.7.0
11362
env:
114-
CHART_VERSION: ${{ steps.chart_version.outputs.chart_version }}
63+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
64+
with:
65+
packages_with_index: true

.github/workflows/test-release.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
.PHONY: all lint kubeval test package debug debug-ui
2+
.PHONY: all lint kubeval test debug debug-ui
33

4-
all: lint kubeval test package
4+
all: lint kubeval test
55

66
lint:
77
helm lint charts/onechart/
@@ -37,21 +37,6 @@ test:
3737
helm dependency update charts/static-site
3838
helm unittest charts/static-site
3939

40-
package:
41-
helm dependency update charts/onechart
42-
helm package charts/onechart
43-
mv onechart*.tgz docs
44-
45-
helm dependency update charts/cron-job
46-
helm package charts/cron-job
47-
mv cron-job*.tgz docs
48-
49-
helm dependency update charts/static-site
50-
helm package charts/static-site
51-
mv static-site*.tgz docs
52-
53-
helm repo index docs --url https://chart.onechart.dev
54-
5540
debug:
5641
helm dependency update charts/onechart
5742
helm template my-release charts/onechart/ -f values.yaml --debug

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,19 @@ You can also template and install onechart from an OCI repository as follows:
5050
Check the generated Kubernetes yaml:
5151

5252
```bash
53-
helm template my-release oci://ghcr.io/techmagister/onechart --version 0.62.0 \
53+
helm template my-release https://techmagister.github.io/onechart --version 0.62.0 \
5454
--set image.repository=nginx \
5555
--set image.tag=1.19.3
5656
```
5757

5858
Deploy with Helm:
5959

6060
```bash
61-
helm install my-release oci://ghcr.io/techmagister/onechart --version 0.62.0 \
61+
helm install my-release https://techmagister.github.io/onechart --version 0.62.0 \
6262
--set image.repository=nginx \
6363
--set image.tag=1.19.3
6464
```
6565

66-
See all [Examples](/website/docs/examples/)
67-
6866
## Contribution Guidelines
6967

7068
Thank you for your interest in contributing to the Gimlet project.

common-0.6.0.tgz

-3.01 KB
Binary file not shown.

onechart-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'OneChart Reference'
33
description: |
4-
OneChart is a generic Helm chart for your application deployments. These are the underlying yaml files of deployments made with Gimlet.
4+
OneChart is a generic Helm chart for your application deployments.
55
---
66

77
> One chart to rule them all
@@ -15,7 +15,7 @@ OneChart is a generic Helm Chart for web applications. The idea is that most Kub
1515
Add the OneChart Helm repository:
1616

1717
```
18-
helm repo add onechart https://chart.onechart.dev
18+
helm repo add onechart https://techmagister.github.io/onechart
1919
```
2020

2121
Set your image name and version, the boilerplate is generated.
@@ -29,7 +29,7 @@ helm template my-release onechart/onechart \
2929
The example below deploys your application image, sets environment variables and configures the Kubernetes Ingress domain name:
3030

3131
```
32-
helm repo add onechart https://chart.onechart.dev
32+
helm repo add onechart https://techmagister.github.io/onechart
3333
helm template my-release onechart/onechart -f values.yaml
3434
3535
# values.yaml

0 commit comments

Comments
 (0)