Skip to content

Commit

Permalink
Configure Helm release/CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ese committed Jan 13, 2022
1 parent 37b6916 commit 7162c48
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 16 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
check:
name: Check
name: Golang Check
runs-on: ubuntu-latest
# Execute the checks inside the container instead the VM.
container: golangci/golangci-lint:v1.43.0-alpine
Expand Down Expand Up @@ -39,3 +39,19 @@ jobs:
- name: Add redisfailover CRD
run: kubectl apply -f manifests/databases.spotahome.com_redisfailovers.yaml
- run: make ci-integration-test

chart-test:
name: Chart testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2

- name: Helm test
run: make helm-test
35 changes: 22 additions & 13 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
name: Helm
name: Release Charts

on:
push:
branches:
- master
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Release
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2

- name: Release
uses: helm/[email protected]
with:
charts_dir: charts
config: charts/chart-release-config.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ This will create a deployment named `redisoperator`.
From the root folder of the project, execute the following:

```
helm install --name redisfailover charts/redisoperator
helm repo add redis-operator https://spotahome.github.io/redis-operator
helm repo update
helm install redis-operator redis-operator/redis-operator
```

## Usage
Expand Down
1 change: 1 addition & 0 deletions charts/chart-release-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release-name-template: Chart-{{ .Version }}
1 change: 0 additions & 1 deletion charts/redisoperator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ apiVersion: v1
description: A Helm chart for the Spotahome Redis Operator
name: redis-operator
version: 3.1.2
engine: gotpl
home: https://github.com/spotahome/redis-operator
keywords:
- "golang"
Expand Down

0 comments on commit 7162c48

Please sign in to comment.