Skip to content

Commit

Permalink
Merge pull request #1 from common-voice/SE-2206
Browse files Browse the repository at this point in the history
scrub mozilla-it refs, setup GHA for CI/CD of Common Voice helm charts
  • Loading branch information
Christina Harlow authored Nov 23, 2021
2 parents 138119a + 2b7f323 commit 02f88de
Show file tree
Hide file tree
Showing 16 changed files with 104 additions and 320 deletions.
4 changes: 2 additions & 2 deletions ci/ct.yaml → .github/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ remote: origin
helm-extra-args: --timeout 600s
check-version-increment: true
validate-yaml: true
validate-chart-schema: false
validate-maintainers: false
validate-chart-schema: true
validate-maintainers: true
target-branch: main

chart-dirs:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Lint & Test Charts

on: [ push, pull_request_target ]

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0

# helm/chart-testing-action requires python version 3.7
# see: https://github.com/helm/chart-testing-action/issues/65
- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Set up chart-testing
uses: helm/chart-testing-action@b0d4458c71155b54fcf33e11dd465dc923550009

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .github/ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config .github/ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.2.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
run: ct install --config .github/ct.yaml
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Charts

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "voice-automation"
git config user.email "voice-automation@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0

# https://github.com/helm/chart-releaser/issues/114
- name: Add Helm Repos for Dependencies
run: |
helm repo add elastic https://helm.elastic.co
helm repo add jetstack https://charts.jetstack.io
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
with:
charts_dir: charts
charts_repo_url: https://common-voice.github.io/helm-charts/
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
23 changes: 3 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
# helm-charts

[![Build Status](https://travis-ci.com/mozilla-it/helm-charts.svg?branch=main)](https://travis-ci.com/mozilla-it/helm-charts)

This repository contains a collection of Helm charts curated by Mozilla's Service Engineering team

## Adding more charts

## Compiling and publishing charts

## Referencing images in ECR
Charts referencing Docker Images stored in an ECR repo under `itsre-apps` subaccount can't be pulled without credentials.
Travis is configured to get Pull credentials for repositories inside that account.
In order to instruct the testing suite to
use those credentials you have to create a folder named `ci` inside your chart, a file `test-values.yaml` inside it with the next content:
```
imagePullSecrets:
- name: ecr-registry
```
Check [here](https://github.com/mozilla-it/helm-charts/pull/39/commits/1a0fbfed5810a6d6875ca0172adac5065ee03b74#diff-245000fef8fab28267cb8040d6a3d7f6) for an example.
This repository contains a collection of Helm charts used in the Common Voice project.

## Installing Helm Charts from this repository
This repository is serving Helm Charts using the webserver provided by Github pages. In order to install Helm charts in your cluster
add this repository to your helm repository list running `helm repo add mozilla-helm-charts https://mozilla-it.github.io/helm-charts/`
add this repository to your helm repository list running `helm repo add cv-helm-charts https://common-voice.github.io/helm-charts/`

## Debug a Chart deployment
This section describes how to verify that your chart is installed correctly as well as what to do if it is not.
Expand Down Expand Up @@ -53,7 +36,7 @@ The same information found out above can be found in the logs of the 2 component
Running `kubectl logs -l=app=flux -n fluxcd` you will get the logs of Flux where we can make sure that it correctly detected the change in the Chart and will try to apply it.
```
kubectl logs -l=app=flux -n fluxcd
ts=2020-04-17T09:24:41.796293402Z caller=loop.go:133 component=sync-loop event=refreshed url=ssh://git@github.com/mozilla-it/voice-infra branch=main HEAD=26626653ecca80f3d43f6e42aa3376af15755622
ts=2020-04-17T09:24:41.796293402Z caller=loop.go:133 component=sync-loop event=refreshed url=ssh://git@github.com/common-voice/voice-infra branch=main HEAD=26626653ecca80f3d43f6e42aa3376af15755622
```
Nothing wrong here, moving on and checking helm-operator logs

Expand Down
15 changes: 8 additions & 7 deletions charts/mozilla-common-voice/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: mozilla-common-voice
icon: https://voice.mozilla.org/dist/f01895c77138837851f87c2e40acbd58.svg
version: 0.4.5
description: Deploy Mozilla Common Voice web application
version: 1.0.2
description: Deploy Common Voice web application
type: application
keywords:
- Mozilla
Expand All @@ -11,16 +11,17 @@ keywords:
- deepspeech
home: https://voice.mozilla.org
sources:
- https://github.com/mozilla/voice-web
- https://github.com/common-voice/common-voice
maintainers:
- name: Web SRE Team
email: it-sre@mozilla.com
dependencies:
- name: jzinner
email: jenc@mozillafoundation.org
- name: JZ
email: jenny@mozillafoundation.org
dependencies: # used only in CI testing
- name: mysql
version: 8.4.2
condition: mysql.enabled
repository: https://charts.bitnami.com/bitnami

- name: redis
version: 12.7.4
condition: redis.enabled
Expand Down
13 changes: 7 additions & 6 deletions charts/sentence-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: sentence-collector
description: A Helm chart for Common Voice's Sentence Collector
description: Deploy Common Voice's Sentence Collector
type: application
version: 0.1.2
version: 1.0.2
keywords:
- Mozilla
- common-voice
Expand All @@ -12,10 +12,11 @@ home: https://commonvoice.mozilla.org/sentence-collector
sources:
- https://github.com/Common-Voice/sentence-collector
maintainers:
- name: Web SRE Team
email: it-sre@mozilla.com

dependencies:
- name: jzinner
email: jenc@mozillafoundation.org
- name: JZ
email: jenny@mozillafoundation.org
dependencies: # used only in CI testing
- name: mysql
version: 8.4.2
condition: mysql.enabled
Expand Down
19 changes: 0 additions & 19 deletions ci/deps/careers/install.sh

This file was deleted.

19 changes: 0 additions & 19 deletions ci/deps/ctms/install.sh

This file was deleted.

31 changes: 0 additions & 31 deletions ci/deps/discourse/install.sh

This file was deleted.

9 changes: 0 additions & 9 deletions ci/deps/install.sh

This file was deleted.

105 changes: 0 additions & 105 deletions ci/e2e.sh

This file was deleted.

Loading

0 comments on commit 02f88de

Please sign in to comment.