Skip to content

Commit

Permalink
feat: adds environment template generator script
Browse files Browse the repository at this point in the history
  • Loading branch information
nxtcoder17 committed Feb 1, 2025
1 parent 28f451c commit dcc4f25
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/scripts/environment-template-generator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /usr/bin/env bash

for dir in charts/*/; do
cat >>.static-pages/env-template.yml <<EOF
- name: $(basename "$dir")
helmchartInfo:
url: "https://kloudlite.github.io/machinehack-helmcharts"
name: $(basename "$dir")
version: "${CHART_VERSION}"
helmValues:
$(yq -r <"$dir/values.yaml" | sed 's/^/ /')
EOF
done
7 changes: 7 additions & 0 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ jobs:
run: |+
bash .github/scripts/helm-release-script.sh
- name: Creating machinehack environments template
shell: bash
env:
CHART_VERSION: ${{github.event.inputs.chart_version}}
run: |+
bash .github/scripts/environment-template-generator.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion charts/vscode/templates/_constants.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{- define "code-server.secret.name" -}} code-creds {{- end -}}
{{- define "code-server.secret.keys.password" -}} PASSWORD {{- end -}}
{{- define "code-server.pvc.name" -}} code-storage {{- end -}}
{{- define "code-server.ingress.host" -}} {{.Release.Name}}.{{required "A valid DNS Hostname must be provided, when ingress is enabled" .Values.codeServer.ingress.host }} {{- end -}}
{{- define "code-server.ingress.host" -}} {{required "A valid DNS Hostname must be provided, when ingress is enabled" .Values.codeServer.ingress.host }} {{- end -}}

{{- define "mongodb.name" -}} mongodb {{- end -}}
{{- define "mongodb.pvc.name" -}} mongodb-storage {{- end -}}

0 comments on commit dcc4f25

Please sign in to comment.