Skip to content

Commit

Permalink
feat: lint (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mokto authored Jan 29, 2020
1 parent 31e027b commit 680d142
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint and Test Charts

on: pull_request

jobs:
lint-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Lint Helm
uses: yeouchien/helm3-action@f3a7c239c5c60777210c8e631839edf5dd3fa29c
with:
command: lint ./sentry
# - name: Create kind cluster
# uses: helm/[email protected]
# with:
# install_local_path_provisioner: true
# # Only build a kind cluster if there are chart changes to test.
# if: steps.lint.outputs.changed == 'true'
# - name: Run Chart
# uses: yeouchien/helm3-action@f3a7c239c5c60777210c8e631839edf5dd3fa29c
# with:
# command: upgrade sentry --install ./sentry

lint-db:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Lint Helm
uses: yeouchien/helm3-action@f3a7c239c5c60777210c8e631839edf5dd3fa29c
with:
command: lint ./sentry-db


# - name: Run chart-testing (install)
# uses: helm/[email protected]
# with:
# command: install
15 changes: 14 additions & 1 deletion sentry/templates/_helper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,17 @@
{{- end -}}

{{- define "sentry.port" -}}9000{{- end -}}
{{- define "snuba.port" -}}1218{{- end -}}
{{- define "snuba.port" -}}1218{{- end -}}

{{- define "sentry.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion sentry/templates/hooks/user-create.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.hooks.initialUser.create .Values.hooks.enabled -}}
{{- if and .Values.user.create .Values.hooks.enabled -}}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
9 changes: 5 additions & 4 deletions sentry/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
prefix:

user:
create: true
email: [email protected]
password: aaaa

hooks:
enabled: true
dbInit:
resources: {}
snubaInit:
resources: {}
initialUser:
create: true
email: [email protected]
password: abcd

images:
sentry:
Expand Down

0 comments on commit 680d142

Please sign in to comment.