Skip to content

Commit

Permalink
Merge pull request #28 from chgl/add-ct-install-job
Browse files Browse the repository at this point in the history
Add ct install job
  • Loading branch information
chgl authored Feb 9, 2021
2 parents 925bb3b + a483860 commit 2792b29
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 39 deletions.
7 changes: 7 additions & 0 deletions .github/ct/install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
chart-dirs:
- charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
- chgl=https://chgl.github.io/charts
debug: true
remote: origin
57 changes: 37 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,38 @@ on:
branches: [master]

jobs:
ct-lint:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]

lint:
needs:
- pre-commit
runs-on: ubuntu-20.04
container: quay.io/chgl/kube-powertools:latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check if documentation is up-to-date
run: bash scripts/generate-docs.sh && git diff --exit-code HEAD
- name: Update dependencies
run: find charts/ ! -path charts/ -maxdepth 1 -type d -exec helm dependency update {} \;
- name: Run YAML lint
run: yamllint .
- name: Run chart-testing (lint)
run: ct lint --config .github/ct/ct.yaml
- name: Run Powerlint
run: bash scripts/chart-powerlint.sh

test:
runs-on: ubuntu-20.04
needs:
- lint
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -16,7 +46,7 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0
version: v3.5.2

- uses: actions/setup-python@v2
with:
Expand All @@ -33,22 +63,9 @@ jobs:
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config .github/ct/ct.yaml
- name: Create k8s Kind Cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'

power-lint:
runs-on: ubuntu-20.04
container: quay.io/chgl/kube-powertools:latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check if documentation is up-to-date
run: bash scripts/generate-docs.sh && git diff --exit-code HEAD
- name: Update dependencies
run: find charts/ ! -path charts/ -maxdepth 1 -type d -exec helm dependency update {} \;
- name: Run YAML lint
run: yamllint .
- name: Run Powerlint
run: bash scripts/chart-powerlint.sh
- name: Run chart-testing (install)
run: ct install --config .github/ct/install.yaml
14 changes: 0 additions & 14 deletions .github/workflows/pre-commit.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion charts/hapi-fhir-jpaserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
appVersion: 5.2.0
version: 0.1.3
version: 0.1.4
4 changes: 2 additions & 2 deletions charts/hapi-fhir-jpaserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
protocol: TCP
readinessProbe:
httpGet:
path: /fhir/metadata
path: /fhir/Patient?_count=1
port: http
{{- with .Values.readinessProbe }}
initialDelaySeconds: {{ .initialDelaySeconds }}
Expand All @@ -64,7 +64,7 @@ spec:
{{- end }}
startupProbe:
httpGet:
path: /fhir/metadata
path: /fhir/Patient?_count=1
port: http
{{- with .Values.startupProbe }}
initialDelaySeconds: {{ .initialDelaySeconds }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ spec:
containers:
- name: wget
image: busybox:1
command: ['wget']
args: ['{{ include "hapi-fhir-jpaserver.fullname" . }}:{{ .Values.service.port }}/fhir/metadata']
command: ['wget', '-O', '-']
args: ['http://{{ include "hapi-fhir-jpaserver.fullname" . }}:{{ .Values.service.port }}/fhir/Patient?_count=1']
securityContext:
readOnlyRootFilesystem: true
runAsUser: 22222
Expand Down

0 comments on commit 2792b29

Please sign in to comment.