Skip to content

Commit

Permalink
Update ci (#85)
Browse files Browse the repository at this point in the history
* added contributing & code of conduct

Signed-off-by: André Bauer <[email protected]>

* update ci

Signed-off-by: André Bauer <[email protected]>
  • Loading branch information
monotek authored Jul 9, 2021
1 parent e198e88 commit 07e6936
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
10 changes: 5 additions & 5 deletions .github/ct.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
helm-extra-args: --timeout 600s
check-version-increment: true
debug: true
upgrade: true
target-branch: main
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
- kokuwa=https://kokuwaio.github.io/helm-charts
check-version-increment: true
debug: true
helm-extra-args: --timeout 600s
target-branch: main
upgrade: true
5 changes: 2 additions & 3 deletions .github/kubeval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
set -o errexit
set -o pipefail

CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/main -- charts | grep '[cC]hart.yaml' | sed -e 's#/[Cc]hart.yaml##g')"
KUBEVAL_VERSION="0.15.0"
CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/main -- zammad | grep '[cC]hart.yaml' | sed -e 's#/[Cc]hart.yaml##g')"
SCHEMA_LOCATION="https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/"

# install kubeval
Expand All @@ -20,5 +19,5 @@ for CHART_DIR in ${CHART_DIRS};do
helm dependency build "${CHART_DIR}"

echo "kubeval(idating) ${CHART_DIR##charts/} chart..."
helm template "${CHART_DIR}" | kubeval --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}"
helm template "${CHART_DIR}" | kubeval --strict --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}"
done
27 changes: 17 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
paths:
- 'charts/**/**'

env:
helm-version: "v3.6.2"
kubeval-version: "v0.16.1"

jobs:
codespell:
name: codespell
Expand All @@ -31,7 +35,7 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.5.2
version: "${{ env.helm-version }}"
- uses: actions/setup-python@v2
with:
python-version: 3.7
Expand Down Expand Up @@ -66,9 +70,10 @@ jobs:
k8s:
- v1.16.15
- v1.17.17
- v1.18.15
- v1.19.7
- v1.20.2
- v1.18.19
- v1.19.11
- v1.20.7
- v1.21.2
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -77,10 +82,11 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.5.2
version: "${{ env.helm-version }}"
- name: Run kubeval
env:
KUBERNETES_VERSION: ${{ matrix.k8s }}
KUBEVAL_VERSION: "${{ env.kubeval-version }}"
run: .github/kubeval.sh

install-chart:
Expand All @@ -93,9 +99,10 @@ jobs:
k8s:
- v1.16.15
- v1.17.17
- v1.18.15
- v1.19.7
- v1.20.2
- v1.18.19
- v1.19.11
- v1.20.7
- v1.21.2
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -104,12 +111,12 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.5.2
version: "${{ env.helm-version }}"
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.0.1
uses: helm/chart-testing-action@v2.1.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main

env:
helm-version: "v3.6.2"

jobs:
release:
runs-on: ubuntu-20.04
Expand All @@ -20,11 +23,11 @@ jobs:
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v1.1
with:
version: v3.5.2
version: "${{ env.helm-version }}"

- name: Run chart-releaser
uses: helm/[email protected].0
uses: helm/[email protected].1
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 07e6936

Please sign in to comment.