Enables Circle CI job that uses the cl lint tool on changed charts (#143)

This commit is contained in:
Alex Collins 2019-10-31 11:05:21 -07:00 committed by GitHub
parent e3dc69482f
commit fc783d79d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 3 deletions

View file

@ -0,0 +1,2 @@
chart-repos:
- argo=https://argoproj.github.io/argo-helm

35
.circleci/config.yml Normal file
View file

@ -0,0 +1,35 @@
version: 2.1
jobs:
lint:
docker:
- image: gcr.io/kubernetes-charts-ci/test-image:v3.0.1
steps:
- checkout
- run: ct lint --config .circleci/chart-testing.yaml
# Technically this only needs to be run on master, but it's good to have it run on every PR
# so that it is regularly tested.
publish:
docker:
# We just need an image with `helm` on it. Handily we know of one already.
- image: gcr.io/kubernetes-charts-ci/test-image:v3.0.1
steps:
# install the additional keys needed to push to Github. Alex Collins owns these keys.
- add_ssh_keys
- run: git config --global user.email "nobody@circleci.com"
- run: git config --global user.name "Circle CI Build"
- checkout
- run: helm init --client-only
# Only actually publish charts on master.
- run: |
if [ "$CIRCLE_BRANCH" = "master" ]; then
echo 'export GIT_PUSH=true' >> $BASH_ENV
fi
- run: sh ./scripts/publish.sh
workflows:
version: 2
workflow:
jobs:
- lint
- publish:
requires:
- lint

View file

@ -3,4 +3,4 @@ Checklist:
* [ ] I have update the chart version in `Chart.yaml` following Semantic Versioning.
* [ ] Any new values are backwards compatible and/or have sensible default.
* [ ] I have followed the testing instructions in the [contributing guide](https://github.com/argoproj/argo-helm/blob/master/CONTRIBUTING.md).
* [ ] I have signed the CLA.
* [ ] I have signed the CLA and the build is green.

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
output
.vscode
.DS_Store
/*.tgz
*.tgz

View file

@ -51,7 +51,7 @@ argocd app sync guestbook
## Publishing Changes
To push changes use following script:
Changes are automatically publish whenever a commit is merged to master. The CI job (see `.circleci/config.yaml`) runs this:
```
GIT_PUSH=true ./scripts/publish.sh