Skip to content
Snippets Groups Projects
Verified Commit 39add821 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

use remote jobs for chart linting, building and publishing

parent 55ee1b94
No related branches found
No related tags found
1 merge request!97Use remote jobs for chart linting, building and publishing
Pipeline #10447 passed with warnings with stages
in 45 seconds
image:
name: alpine/helm:3.7.1
entrypoint: ["/bin/sh", "-c"]
include:
- remote: https://open.greenhost.net/stackspin/stackspin/-/raw/main/.gitlab/ci_templates/helm_package.yml
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
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
variables:
CHART_NAME: nextcloud-onlyoffice
# Override allow_failure because this chart does not lint yet
# (https://open.greenhost.net/stackspin/nextcloud/-/issues/1000)
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
......@@ -3,7 +3,7 @@ apiVersion: v2
description: |
A helm chart for installing NextCloud and setting up ONLYOFFICE integration
name: nextcloud-onlyoffice
version: 0.5.3
version: 0.5.4
appVersion: NC-20.0.11-OO-6.2.2.21
icon: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg
dependencies:
......
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