Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/push-helm-chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Push Helm Chart

# TODO: fix: workflows have a problem where only code owners' PRs get the actions running
# TODO: fix: workflows have a problem where only code owners' PRs get the actions running

on:
pull_request:
Expand Down Expand Up @@ -104,6 +104,13 @@ jobs:
commit_username: stakater-user
commit_email: stakater@gmail.com

- name: Push new chart tag
uses: anothrNick/github-tag-action@1.71.0
env:
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
WITH_V: false
CUSTOM_TAG: chart-v${{ steps.new_chart_version.outputs.result }}

- name: Notify Slack
uses: 8398a7/action-slack@v3
if: always() # Pick up events even if the job fails or is canceled.
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release-helm-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release Helm chart

on:
push:
tags:
- "chart-v*"
tags-ignore:
- "v*"

permissions:
contents: write

jobs:
release-helm-chart:
name: Release Helm chart
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="Helm chart ${tag#chart-}" \
--generate-notes

- name: Notify Slack
uses: 8398a7/action-slack@v3
if: always()
with:
status: ${{ job.status }}
fields: repo,author,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
25 changes: 6 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Release Go project

on:
release:
types: [published]
push:
tags:
- "v*"
tags-ignore:
- "chart-v*"

env:
DOCKER_FILE_PATH: Dockerfile
Expand All @@ -12,7 +15,7 @@ env:
REGISTRY: ghcr.io
Comment thread
karl-johan-grahn marked this conversation as resolved.

jobs:
build:
release:

permissions:
contents: read
Expand Down Expand Up @@ -193,22 +196,6 @@ jobs:
## Add steps to generate required artifacts for a release here(helm chart, operator manifest etc.)
##############################

# # Generate tag for operator without "v"
# - name: Generate Operator Tag
# id: generate_operator_tag
# uses: anothrNick/github-tag-action@1.70.0
# env:
# GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
# WITH_V: false
# DEFAULT_BUMP: patch
# DRY_RUN: true

# # Update chart tag to the latest semver tag
# - name: Update Chart Version
# env:
# VERSION: ${{ steps.generate_operator_tag.outputs.RELEASE_VERSION }}
# run: make bump-chart

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
Expand Down
7 changes: 2 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ snapshot:
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
# It will be generated manually as part of making a new GitHub release
disable: true
env_files:
github_token: /home/jenkins/.apitoken/hub
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ GOLANGCI_LINT_VERSION ?= v1.57.2
YQ_VERSION ?= v4.27.5
YQ_DOWNLOAD_URL = "https://github.com/mikefarah/yq/releases/download/$(YQ_VERSION)/yq_$(OS)_$(ARCH)"


.PHONY: yq
yq: $(YQ) ## Download YQ locally if needed
$(YQ):
Expand All @@ -58,7 +57,6 @@ $(YQ):
@chmod +x $(YQ)
@echo "yq downloaded successfully to $(YQ)."


.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
$(KUSTOMIZE): $(LOCALBIN)
Expand Down Expand Up @@ -157,12 +155,6 @@ k8s-manifests: $(KUSTOMIZE) ## Generate k8s manifests using Kustomize from 'mani
update-manifests-version: ## Generate k8s manifests using Kustomize from 'manifests' folder
sed -i 's/image:.*/image: \"ghcr.io\/stakater\/reloader:v$(VERSION)"/g' deployments/kubernetes/manifests/deployment.yaml

# Bump Chart
bump-chart:
sed -i "s/^appVersion:.*/appVersion: v$(VERSION)/" deployments/kubernetes/chart/reloader/Chart.yaml
sed -i "s/tag:.*/tag: v$(VERSION)/" deployments/kubernetes/chart/reloader/values.yaml
sed -i "s/version:.*/version: v$(VERSION)/" deployments/kubernetes/chart/reloader/values.yaml

YQ_VERSION = v4.42.1
YQ_BIN = $(shell pwd)/yq
CURRENT_ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
Expand Down
4 changes: 2 additions & 2 deletions deployments/kubernetes/chart/reloader/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: reloader
description: Reloader chart that runs on kubernetes
version: 2.0.0
appVersion: v1.3.0
version: 2.1.0
appVersion: v1.4.0
keywords:
- Reloader
- kubernetes
Expand Down
6 changes: 5 additions & 1 deletion deployments/kubernetes/chart/reloader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,8 @@ _Helm chart versioning_: The Reloader Helm chart is maintained in this repositor

Helm chart will be released to the chart registry whenever files in `deployments/kubernetes/chart/reloader/**` change on the main branch.

Helm Chart will be released by the maintainers, on labelling a PR with `release/helm-chart` and pre-maturely updating the `version` field in `Chart.yaml` file.
### To release the Helm chart

1. Create a new branch and update the Helm chart `appVersion` and `version`, example pull-request: [PR-846](https://github.com/stakater/Reloader/pull/846)
1. Label the PR with `release/helm-chart`
1. After approval and just before squash, make sure the squash commit message represents all changes, because it will be used to autogenerate the changelog message
4 changes: 2 additions & 2 deletions deployments/kubernetes/chart/reloader/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fullnameOverride: ""
image:
name: stakater/reloader
repository: ghcr.io/stakater/reloader
tag: v1.3.0
tag: v1.4.0
# digest: sha256:1234567
pullPolicy: IfNotPresent

Expand Down Expand Up @@ -106,7 +106,7 @@ reloader:
labels:
provider: stakater
group: com.stakater.platform
version: v1.3.0
version: v1.4.0
# Support for extra environment variables.
env:
# Open supports Key value pair as environment variables.
Expand Down