Skip to content

Commit

Permalink
chore: bump helmchart version to 0.1.0, improve ci
Browse files Browse the repository at this point in the history
  • Loading branch information
luigibarbato committed Feb 2, 2023
1 parent 6a3ff53 commit 428db61
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
34 changes: 21 additions & 13 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ trigger:
action:
exclude:
- synchronized
branch:
branch:
exclude:
- main
paths:
- gh-pages
paths:
exclude:
- "helm_chart/**"

steps:
- name: clone
image: alpine/git
Expand Down Expand Up @@ -57,7 +58,10 @@ trigger:
action:
exclude:
- synchronized
paths:
event:
exclude:
- tag
paths:
exclude:
- "helm_chart/**"

Expand Down Expand Up @@ -121,7 +125,7 @@ trigger:
- main
event:
- tag
paths:
paths:
exclude:
- "helm_chart/**"

Expand Down Expand Up @@ -170,18 +174,21 @@ trigger:
ref:
include:
# Trigger the Helm Chart Releaser only when tagging
- refs/tags/**
exclude:
# These kind of tags are generated by `cr` in this pipeline
# we exclude them to avoid a loop.
- refs/tags/permission-manager-*
- refs/tags/helm-chart-*

steps:
- name: check-version
image: alpine:3.17
commands:
- apk add yq
# Check if the tag version matches the chart version. This is to avoid publishing a chart with a wrong version.
- '[[ $(echo "${DRONE_TAG}" | sed "s/^helm-chart-//") = $(yq ".version" helm_chart/Chart.yaml) ]]'

# We need to manually fetch the gh-pages branch because Drone by default
# only checksout the current branch with a minimal depth
# see: https://docs.drone.io/pipeline/docker/syntax/cloning/
- name: fetch-gh-pages-branch
image: alpine/git
image: alpine/git:2.36.3
commands:
- git fetch origin gh-pages

Expand All @@ -201,7 +208,7 @@ steps:
# Package the chart into a tar.gz
- cr package ./helm_chart
# Upload the tar.gz to a GitHub release
- cr upload --skip-existing
- cr upload --release-name-template "${DRONE_TAG}"
# Update the index.yaml and push it to GitHub Pages
- cr index --push

Expand All @@ -224,8 +231,9 @@ trigger:
branch:
exclude:
- dependabot/**
- gh-pages
- main
paths:
paths:
exclude:
- "helm_chart/**"

Expand Down
2 changes: 1 addition & 1 deletion helm_chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ keywords:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.8.0
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
3 changes: 1 addition & 2 deletions helm_chart/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Permission Manager Helm Chart - v1.8.0

# Permission Manager Helm Chart - v0.1.0
A Helm chart for Permission Manager, a simple to use, web application that enables a super-easy and user-friendly RBAC management for Kubernetes.

## Configuration options
Expand Down

0 comments on commit 428db61

Please sign in to comment.