Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitLab pipeline snippet for containered exec #270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/contrib.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,20 @@ else
exit 1
fi
```

## GitLab in container

Below code fragment is basic example useful to verify files under `k8s/` subdirectory.
Adjust `stage` and subdirectory (`k8s/`) in `find` command accordingly to your project spec.

```yaml
kubeval:
stage: lint
image:
name: garethr/kubeval
# force empty entrypoint, otherwise you will get
# err - unknown shorthand flag: 'c' in -c
entrypoint: [""]
script:
- find k8s/ -type f -name "*.yaml" -exec kubeval {} \; ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find + exec is very slow see #236

```