Skip to content

Commit 3d41bc7

Browse files
authored
Add CONTRIBUTING.md and fix CI workflow step dependencies (#211)
* Add CONTRIBUTING.md * Gate e2e tests on Helm lint
1 parent fc925b1 commit 3d41bc7

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/test-pr.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ jobs:
3939

4040
# This job exists so that PRs from outside the main repo are rejected
4141
fail_on_remote:
42+
needs: [unit_tests, lint]
4243
runs-on: ubuntu-latest
4344
steps:
4445
- name: PR must be from a branch in the azimuth-cloud/cluster-api-janitor-openstack repo
4546
run: exit ${{ github.event.pull_request.head.repo.full_name == 'azimuth-cloud/cluster-api-janitor-openstack' && '0' || '1' }}
4647

4748
publish_artifacts:
48-
needs: [unit_tests,fail_on_remote]
49+
needs: [fail_on_remote]
4950
uses: ./.github/workflows/build-push-artifacts.yaml
5051
with:
5152
ref: ${{ github.event.pull_request.head.sha }}

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing
2+
3+
We welcome contributions and suggestions for improvements to this code base.
4+
Please check for relevant issues and PRs before opening a new one of your own.
5+
6+
## Making a contribution
7+
8+
### Helm template snapshots
9+
10+
The CI in this repository uses the Helm
11+
[unittest](https://github.com/helm-unittest/helm-unittest) plugin's
12+
snapshotting functionality to check PRs for changes to the templated manifests.
13+
Therefore, if your PR makes changes to the manifest templates or values, you
14+
will need to update the saved snapshots to allow your changes to pass the
15+
automated tests. The easiest way to do this is to run the `helm unittest` command
16+
inside a docker container from the repo root.
17+
18+
```
19+
docker run -i --rm -v $(pwd):/apps helmunittest/helm-unittest chart -u
20+
```
21+
22+
where the `-u` option is used to update the existing snapshots.

0 commit comments

Comments
 (0)