Skip to content
Snippets Groups Projects
Commit 309740e2 authored by Maarten de Waard's avatar Maarten de Waard :angel: Committed by Varac
Browse files

Automatically push helm chart to chart repository for tagged commits

parent e853627f
No related branches found
No related tags found
1 merge request!84Automatically push helm chart to chart repository for tagged commits
Pipeline #10229 passed with warnings with stages
in 44 seconds
image:
name: alpine/helm:3.7.1
entrypoint: ["/bin/sh", "-c"]
stages:
- lint-helm-chart
- package-helm-chart
- release-helm-chart
# Only package a new chart once the version number has been updated
.chart_release_rules:
rules:
- changes:
- Chart.yaml
lint-helm:
stage: lint-helm-chart
script:
- helm dep update
- helm lint .
artifacts:
paths:
- 'charts/**'
expire_in: 1 week
# Even if lint fails, upload the charts/ folder as artifact
when: always
allow_failure: true
rules:
- changes:
- '*.yaml'
- templates/*.yaml
package-chart:
stage: package-helm-chart
script:
- helm package .
artifacts:
paths:
- nextcloud-onlyoffice-*
expire_in: 1 week
extends:
- .chart_release_rules
# Push helm chart. Charts on the `main` branch are pushed to `stable`, others
# are pushed to the `unstable` channel.
release-helm:
image: "rancher/curlimages-curl:7.73.0"
stage: release-helm-chart
script:
- if [ "$CI_COMMIT_BRANCH" == "main" ]; then export HELM_CHANNEL='stable'; else export HELM_CHANNEL='unstable'; fi
- export CHART_FILE=$(ls nextcloud-onlyoffice-*.tgz)
- curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@${CHART_FILE}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/${HELM_CHANNEL}/charts"
extends:
- .chart_release_rules
## [0.5.3] - 2021-12-01
* Chart is now available on via helm repository:
https://open.greenhost.net/api/v4/projects/1/packages/helm/stable
## [0.5.2] - 2021-11-03
* Allow setting custom Kubernetes labels and annotations on onlyoffice deployment
......
......@@ -12,4 +12,4 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
version: 10.13.11
digest: sha256:de389d36af966efbd042aa652334cf88fd3e53d124481ea281f234e12b666b28
generated: "2021-12-06T09:11:37.166223259Z"
generated: "2021-12-07T12:45:56.632250152+01:00"
......@@ -3,8 +3,9 @@ apiVersion: v2
description: |
A helm chart for installing NextCloud and setting up ONLYOFFICE integration
name: nextcloud-onlyoffice
version: 0.5.2
version: 0.5.3
appVersion: NC-20.0.11-OO-6.2.2.21
icon: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg
dependencies:
# https://artifacthub.io/packages/helm/nextcloud/nextcloud
- name: nextcloud
......
......@@ -9,23 +9,6 @@ documentation.
Parts of this chart are based on a copy of the [COLLABORA code helm
chart](https://github.com/helm/charts/tree/master/stable/collabora-code)
## Apps
The Nextcloud app store allows admin users to install applications, many of
which have not undergone security testing. For that reason we disabled
downloading new apps via the app store. As the person installing Nextcloud it is
possible to specify which applications from the app store are available for
installation. It is also possible to enable them by default. Apps that are not
enabled by default can be enabled through the Apps screen in Nextcloud.
To install apps, edit the values.yaml file:
```yaml
apps:
- name: sociallogin # Installs sociallogin app
enabled: false # Disables sociallogin by default
```
## Installation
......@@ -45,21 +28,45 @@ secrets variables manually when you run helm install:
- `postgresql.postgresqlPassword`
- `rabbitmq.rabbitmq.password`
Install with:
Add our helm repository[^1]:
```
helm install . --wait -f values-local.yaml
helm repo add nextcloud-onlyoffice https://open.greenhost.net/api/v4/projects/1/packages/helm/stable
```
Then install the chart:
```
helm install --wait -f values-local.yaml my-nextcloud nextcloud-onlyoffice/nextcloud-onlyoffice
```
**The `--wait` is important!** We need that because of how [helm chart
hooks](https://helm.sh/docs/charts_hooks/#hooks-and-the-release-lifecycle) work:
hooks](https://helm.sh/docs/topics/charts_hooks/) work:
> Note that if the --wait flag is set, Tiller will wait until all resources are
> in a ready state and will not run the post-install hook until they are ready.
> Note that if the --wait flag is set, the library will wait until all resources
> are in a ready state and will not run the post-install hook until they are
> ready.
The job in this chart needs the Nextcloud pod to be in a ready state before
being executed.
## Apps
The Nextcloud app store allows admin users to install applications, many of
which have not undergone security testing. For that reason we disabled
downloading new apps via the app store. As the person installing Nextcloud it is
possible to specify which applications from the app store are available for
installation. It is also possible to enable them by default. Apps that are not
enabled by default can be enabled through the Apps screen in Nextcloud.
To install apps, edit the values.yaml file:
```yaml
apps:
- name: sociallogin # Installs sociallogin app
enabled: false # Disables sociallogin by default
```
## Values
The included `values.yaml` file configures Nextcloud to use a Mariadb database,
......@@ -101,3 +108,5 @@ persistent disk (default: 2 GB) if you need more.
| `onlyoffice.nodeSelector` | Node labels for pod assignment | `{}` |
| `onlyoffice.affinity` | Affinity settings | `{}` |
| `onlyoffice.tolerations` | List of node taints to tolerate | `[]` |
[^1]: If you want to test a version that is not on the `main` branch yet, use `https://open.greenhost.net/api/v4/projects/1/packages/helm/unstable`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment