Skip to content

Commit

Permalink
Adds Pact Broker Helm Chart
Browse files Browse the repository at this point in the history
- adds pact broker helm chart
- adds lint tests for PRs
- adds release action for releasing of chart

Signed-off-by: ChrisJBurns <[email protected]>
  • Loading branch information
ChrisJBurns committed Jun 20, 2022
1 parent 7192b9a commit fa75358
Show file tree
Hide file tree
Showing 13 changed files with 990 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/codespell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Codespell

# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

on: pull_request

jobs:
codespell:
name: Codespell
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Codespell
uses: codespell-project/actions-codespell@master
with:
skip: .git
check_filenames: true
check_hidden: true
48 changes: 48 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Lint and Test Charts

on: pull_request

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: 3.*

- name: Add dependencies
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false
if: steps.list-changed.outputs.changed == 'true'

- name: Create kind cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install) for Pact Broker
run: ct install --target-branch ${{ github.event.repository.default_branch }}
if: steps.list-changed.outputs.changed == 'true'
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Charts

on:
push:
branches:
- master

permissions:
contents: write
packages: write

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 "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Add dependencies
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.TOKEN }}"
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### macOS ###
.DS_Store
.AppleDouble
.LSOverride


# helm chart dependencies
charts/*/charts/
charts/*/Chart.lock
**/charts/*.tgz
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# pact-helm-chart
# Pact Broker Helm Chart

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![Release Charts](https://github.com/ChrisJBurns/pact-helm-chart/workflows/Release%20Charts/badge.svg?branch=master)

This repository will house the Pact Broker Helm Chart.

## Usage

[Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

Once Helm is set up properly, add the repo as follows:

```console
helm repo add pact-broker https://chrisjburns.github.io/pact-broker-chart
helm install pact-broker pact-broker/pact-broker
```

You can then run `helm search repo pact-broker` to see the charts.

## Helm-Docs
We use [helm-docs](https://github.com/norwoodj/helm-docs) to automatically generate the documentation for the charts. To run the autogeneration of the Helm documentation download the [helm-docs `cli`](https://github.com/norwoodj/helm-docs) tool and then run the following command inside the `charts/pact-broker` folder.

```console
helm-docs --template-files _readme_templates.gotmpl
```

## Contributing

The source code of all [Pact Broker](https://docs.pact.io/pact_broker/overview) [Helm](https://helm.sh) charts can be found on Github: <https://github.com/ChrisJBurns/pact-helm-chart/tree/master/charts/pact-broker/>

## License

[MIT License](https://github.com/ChrisJBurns/pact-helm-chart/blob/master/LICENSE).
18 changes: 18 additions & 0 deletions charts/pact-broker/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v2
name: pact-broker
description: The Pact Broker is an application for sharing for Pact contracts and verification results.
type: application
version: 0.0.1
appVersion: 2.100.0.1
dependencies:
- condition: postgresql.enabled
name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 11.x.x
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
sources:
- https://github.com/pact-foundation/pact_broker
Loading

0 comments on commit fa75358

Please sign in to comment.