Skip to content

Commit

Permalink
ci: fixed helm dependency update and possibly ci permissions (#49)
Browse files Browse the repository at this point in the history
* ci: fixed helm lint workflow

* chore(helm): updated chart readme with oci installation instructions

* ci: possibly simplified permissions
  • Loading branch information
chgl authored Jan 14, 2023
1 parent c15f09c commit 6e73191
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 30 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: "build container image"

permissions:
actions: read
contents: read
id-token: write # for creating OIDC tokens for signing.
packages: write # for uploading container images, signatures, and attestations.
permissions: {}

on:
workflow_call:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
needs:
- build
strategy:
fail-fast: false
matrix:
include:
- module: "query"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- name: Add helm repos and update deps
run: |
task helm-add-repos
task helm-update-dependencies
- name: Run chart-testing (lint)
run: ct lint --config .github/ct/ct.yaml
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ name: release
on:
workflow_call: {}

permissions:
packages: write
actions: read # To read the workflow path.
id-token: write # To sign the provenance.
contents: write # To add assets to a release.
permissions: {}

jobs:
publish-helm-chart:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/test-k8s-installation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,13 @@ jobs:
run: |
kind load docker-image ghcr.io/miracum/recruit/tester:v1
- name: Prepare helm chart dependencies
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add codecentric https://codecentric.github.io/helm-charts
helm repo add chgl https://chgl.github.io/charts
helm repo add hapifhir https://hapifhir.github.io/hapi-fhir-jpaserver-starter
helm repo add miracum https://miracum.github.io/charts
- name: Install Task
uses: arduino/setup-task@d665c6beebae46ff3f699d7b2fd3f1959de7153c # tag=1.0.2

- name: Add helm repos and update deps of recruit chart
run: |
task helm-add-repos
task helm-update-dependencies
helm dependency build charts/recruit
- name: Install chart
Expand Down
4 changes: 4 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ tasks:
- helm repo add hapifhir https://hapifhir.github.io/hapi-fhir-jpaserver-starter
- helm repo add miracum https://miracum.github.io/charts

helm-update-dependencies:
cmds:
- find charts/ ! -path charts/ -maxdepth 1 -type d -exec helm dependency update {} \;

e2e-k8s-prepare:
deps:
- helm-add-repos
Expand Down
10 changes: 4 additions & 6 deletions charts/recruit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
## TL;DR;

```console
helm repo add miracum https://miracum.github.io/charts
helm repo update
helm install recruit miracum/recruit -n recruit
helm install recruit oci://ghcr.io/miracum/recruit/charts/recruit -n recruit
```

You can find more exhaustive documentation at the recruIT documentation site: <https://miracum.github.io/recruit/deployment/kubernetes>.
Expand All @@ -30,7 +28,7 @@ See [UPGRADING.md](./docs/UPGRADING.md) for information on breaking changes intr
To install the chart with the release name `recruit`:

```console
helm install recruit miracum/recruit -n recruit
helm install recruit oci://ghcr.io/miracum/recruit/charts/recruit -n recruit
```

The command deploys the recruIT clinical trial recruitment support system on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
Expand Down Expand Up @@ -184,14 +182,14 @@ The following table lists the configurable parameters of the `recruit` chart and
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:

```console
helm install recruit miracum/recruit -n recruit --set fhirserver.postgresql.nameOverride="fhir-server-postgres"
helm install recruit oci://ghcr.io/miracum/recruit/charts/recruit -n recruit --set fhirserver.postgresql.nameOverride="fhir-server-postgres"
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```console
helm install recruit miracum/recruit -n recruit --values values.yaml
helm install recruit oci://ghcr.io/miracum/recruit/charts/recruit -n recruit --values values.yaml
```

## Configure Notifcation Rules
Expand Down
10 changes: 4 additions & 6 deletions charts/recruit/README.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
## TL;DR;

```console
helm repo add {{ .Repository.Name }} {{ .Repository.URL }}
helm repo update
helm install {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n {{ .Release.Namespace }}
helm install {{ .Release.Name }} {{ .Repository.URL }}/{{ .Chart.Name }} -n {{ .Release.Namespace }}
```

You can find more exhaustive documentation at the {{ .Project.Name }} documentation site: <https://miracum.github.io/recruit/deployment/kubernetes>.
Expand All @@ -30,7 +28,7 @@ See [UPGRADING.md](./docs/UPGRADING.md) for information on breaking changes intr
To install the chart with the release name `{{ .Release.Name }}`:

```console
helm install {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n {{ .Release.Namespace }}
helm install {{ .Release.Name }} {{ .Repository.URL }}/{{ .Chart.Name }} -n {{ .Release.Namespace }}
```

The command deploys {{ .Project.App }} on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
Expand All @@ -56,14 +54,14 @@ The following table lists the configurable parameters of the `{{ .Chart.Name }}`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:

```console
helm install {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n {{ .Release.Namespace }} --set {{ .Chart.ValuesExample }}
helm install {{ .Release.Name }} {{ .Repository.URL }}/{{ .Chart.Name }} -n {{ .Release.Namespace }} --set {{ .Chart.ValuesExample }}
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```console
helm install {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n {{ .Release.Namespace }} --values values.yaml
helm install {{ .Release.Name }} {{ .Repository.URL }}/{{ .Chart.Name }} -n {{ .Release.Namespace }} --values values.yaml
```

## Configure Notifcation Rules
Expand Down
2 changes: 1 addition & 1 deletion charts/recruit/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project:
description: Helm chart for deploying the recruIT clinical trial recruitment support system on Kubernetes.
app: the recruIT clinical trial recruitment support system
repository:
url: https://miracum.github.io/charts
url: oci://ghcr.io/miracum/recruit/charts
name: miracum
chart:
name: recruit
Expand Down

0 comments on commit 6e73191

Please sign in to comment.