Skip to content

Commit

Permalink
[housekeeping]: Update Testing Action (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbaehler authored Feb 22, 2021
1 parent b0f3e34 commit a160be0
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 60 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/docs.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,46 @@ on:
branches:
- master
jobs:
documentation:
runs-on: ubuntu-latest
container:
image: alpine
steps:
- name: Install Dependencies
run: |
apk add jq git curl
- name: Checkout
uses: actions/checkout@v2

- name: Fetch history
run: git fetch --prune --unshallow

- name: Install Helm Docs
run: |
curl -s -L -o /usr/local/bin/helm-docs.tar.gz "https://github.com/norwoodj/helm-docs/releases/download/$(curl --silent "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | jq -r .tag_name)/helm-docs_$(curl --silent "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | jq -r .tag_name | cut -d "v" -f2-)_Linux_x86_64.tar.gz"
cd /usr/local/bin/ && tar xfv helm-docs.tar.gz
chmod +x ./helm-docs
- name: Update Documentation
run: |
git status
CHARTS_ROOT="./charts"
if [ -d "${CHARTS_ROOT}" ]; then
## Generate Documentation
helm-docs
## Push Changes
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add -A
git commit -sam "Update Documentation" || true
git push || true
else
echo -e "\n\e[33m-- Root Direcoty not found: $CHART_ROOT\e[0m" && exit 0;
fi
release:
runs-on: ubuntu-latest
needs:
- documentation
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
45 changes: 29 additions & 16 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,40 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Fetch history
run: git fetch --prune --unshallow
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.5.0

- name: Chart Linting
id: lint
uses: helm/[email protected]
- uses: actions/setup-python@v2
with:
command: lint
python-version: 3.7

- name: Setup Chart Linting
id: lint
uses: helm/[email protected]

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

- name: Create kind cluster
uses: helm/[email protected]
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'

- name: Chart Installation
uses: helm/[email protected]
# Only test if there are any changes
if: steps.lint.outputs.changed == 'true'
with:
command: install
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
run: ct install --config ./ct.yaml
if: steps.list-changed.outputs.changed == 'true'

dry-release:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions charts/manifests/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: manifests
description: "Bedag's Manifest chart. Library full of basic kubernetes manifests."
type: library
version: 0.5.2
version: 0.5.3
icon: "https://www.bedag.ch/wGlobal/wGlobal/layout/images/logo.svg"
keywords:
- Bedag
Expand All @@ -22,4 +22,4 @@ annotations:
artifacthub.io/prerelease: "false"
artifacthub.io/license: Apache-2.0
artifacthub.io/changes: |
- "[Fixed]: Add Overwrites to Bundle Extras"
- "[Changed]: Updated Documentation"
8 changes: 6 additions & 2 deletions charts/manifests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Manifests Library

![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)
![Version: 0.5.3](https://img.shields.io/badge/Version-0.5.3-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)

This library's purpose is to have more flexibility as chart author but at the same time have kubernetes manifests managed in a central library. This way you can avoid big surprises when Kubernetes has breaking changes in any of their APIs. Currently we support a base set of resources. Resources may be added as soon as we see or get a request that there's a need for it. This chart is still under development and testing, since it's rather complex. Feel free to use it. Our goal is to get it as reliable as possible.

Expand All @@ -13,6 +13,7 @@ This library's purpose is to have more flexibility as chart author but at the sa
# Install Chart

Since this chart is of type [library](https://helm.sh/docs/topics/library_charts/) it can only be used as dependency for other charts. Just add it in your chart dependencies section:
The same goes for charts which are hosted in this helm repository. Since the manifests chart has further Dependencies, you need to include it via the repository.

```
dependencies:
Expand All @@ -21,13 +22,16 @@ dependencies:
repository: https://bedag.github.io/helm-charts/
```

If the chart is within this Github helm repository, you can reference it as local dependency
To develop locally on the manifest chart you can include the dependency locally, note that you have to include all manifests dependencies also.

```
dependencies:
- name: manifests
version: ">=1.0.0"
repository: "file://../manifests"
- name: library
version: ">=0.3.0"
repository: "https://buttahtoast.github.io/helm-charts/"
```

# Major Changes
Expand Down
2 changes: 1 addition & 1 deletion ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ validate-chart-schema: true
validate-maintainers: true
validate-yaml: false
all: true
excluded-charts:
excluded-charts:
- "manifests"

0 comments on commit a160be0

Please sign in to comment.