Skip to content

Commit

Permalink
Merge pull request #316 from appuio/chart-releaser
Browse files Browse the repository at this point in the history
Rework chart repository structure
  • Loading branch information
ccremer authored Jun 8, 2021
2 parents 58116ff + dfff339 commit ca7e688
Show file tree
Hide file tree
Showing 323 changed files with 1,519 additions and 7,717 deletions.
97 changes: 0 additions & 97 deletions .ci/build.sh

This file was deleted.

38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: "[chart-name] SUMMARY"
labels: bug
assignees: ''

---

## Describe the bug

A clear and concise description of what the bug is.

## Additional context

Add any other context about the problem here.

## To Reproduce

Steps to reproduce the behavior:
1. ...

## Logs

If applicable, add logs to help explain your problem.
```console

```

## Expected behavior

A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
- Chart: latest
- Helm: v3
- Kubernetes API: v1.21
- Distribution (Openshift, Rancher, etc.): Plain K8s
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[chart-name] SUMMARY"
labels: enhancement
assignees: ''

---

## Summary

**As** role name\
**I want** a feature or functionality\
**So that** I get certain business value

## Context

Add more information here. You are completely free regarding form and length.

## Out of Scope

* List aspects that are explicitly not part of this feature

## Further links

* URLs of relevant Git repositories, PRs, Issues, etc.

## Acceptance criteria

* Given a precondition, when an action happens, then expect a result

<!--
If you already have ideas what the requirements are, please list them in given-when-then expressions.
-->
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ make sure you are aware of our technical requirements and best practices:
<!-- Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields. -->
- [ ] [DCO](https://github.com/appuio/charts/blob/master/CONTRIBUTING.md#sign-your-work) signed
- [ ] Chart Version bumped
- [ ] Variables are documented in the README.md
- [ ] Variables are documented in the values.yaml using the format required by [Helm-Docs](https://github.com/norwoodj/helm-docs#valuesyaml-metadata).
- [ ] Title of the PR contains starts with chart name e.g. `[chart]`
10 changes: 10 additions & 0 deletions .github/helm-docs-footer.gotmpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

<!---
Common/Useful Link references from values.yaml
-->
[resource-units]: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes
[prometheus-operator]: https://github.com/coreos/prometheus-operator
15 changes: 15 additions & 0 deletions .github/helm-docs-header.gotmpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

## Installation

```bash
helm repo add appuio https://charts.appuio.ch
helm install {{ template "chart.name" . }} appuio/{{ template "chart.name" . }}
```
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on:
pull_request:
branches:
- master

jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run all linters
run: make lint
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release Charts

on:
push:
branches:
- master

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

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: appuio
charts_repo_url: https://charts.appuio.ch
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test

on:
pull_request:
branches:
- master

jobs:
unit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: azure/setup-helm@v1
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Chart unit tests
run: make prepare test

docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Generate Chart documentation
run: make docs
- name: Check if documentation is on par with Chart changes
run: git diff --exit-code
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*/charts/*.tgz
**/charts/*.tgz
/**/.idea
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

48 changes: 48 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
SHELL := /usr/bin/env bash

MASTER_BRANCH=master
SOURCE_README=README.gotmpl
TARGET_README=README.md
CHARTS_DIR=charts/

HELM_DOCS_VERSION=v1.5.0

.PHONY: help
help: ## Show this help
@grep -E -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = "(: ).*?## "}; {gsub(/\\:/,":",$$1)}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

.PHONY: docs
docs: docs\:helm

.PHONY: docs\:helm
docs\:helm: ## Creates the Chart READMEs from template and values.yaml files
@echo --- Generating Chart READMEs
@docker run --rm -v $$(pwd):/helm-docs -u $$(id -u) jnorwood/helm-docs:$(HELM_DOCS_VERSION) \
--template-files ./.github/helm-docs-header.gotmpl.md \
--template-files README.gotmpl.md \
--template-files ./.github/helm-docs-footer.gotmpl.md

.PHONY: test
test: ## Run Chart unit tests
@echo --- Executing unit tests
@go test ./...

.PHONY: lint\:fmt
lint\:fmt: ## Run go fmt against code
go fmt ./...

.PHONY: lint\:vet
lint\:vet: ## Run go vet against code
go vet ./...

.PHONY: lint
lint: lint\:fmt lint\:vet ## All-in-one linting and checks for uncommitted changes
@echo 'Check for uncommitted changes ...'
git diff --exit-code

.PHONY: prepare
prepare: ## Prepare the charts for testing
@echo --- Preparing charts
@find appuio -type f -name Makefile | sed 's|/[^/]*$$||' | xargs -I '%' make -C '%' prepare
@echo 'Check for uncommitted changes ...'
git diff --exit-code
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
name: data-cube-curation
description: RDF Data Cube curation service

version: 0.3.0
version: 0.3.1
appVersion: 0.6.1
home: https://github.com/zazuko/data-cube-curation
7 changes: 7 additions & 0 deletions appuio/data-cube-curation/README.gotmpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!---
The README.md file is automatically generated with helm-docs!
Edit the README.gotmpl.md template instead.
-->

{{ template "chart.valuesSection" . }}
Loading

0 comments on commit ca7e688

Please sign in to comment.