Commit c136d33d authored by fnux's avatar fnux

Merge branch 'policies-and-ci' into 'master'

Rolling-release policy, CI, new type requirements (shellcheck + manpage)

See merge request !2
parents 1cfcfb6a c6da87d3
Pipeline #1406 passed with stage
in 30 seconds
.shellcheck.tmp
stages:
- test
image: code.ungleich.ch:5050/ungleich-public/cdist/cdist-ci:latest
shellcheck:
stage: test
script:
- ./scripts/run-shellcheck.sh
manpages:
stage: test
script:
- ./scripts/run-manpage-checks.sh
# cdist-contrib chsangelog
# cdist-contrib changes
## 2020-0?-??: 0.?.? (Not released yet)
* New type: __find_exec (Ander Punnar)
* 2020-04-28: New type: __find_exec (Ander Punnar)
......@@ -5,7 +5,8 @@ tool with community-maitained types which are either too specific to fit/be
maintained in cdist itself or were not accepted in code cdist but could still
be useful.
The releases of cdist-contrib are not necessarly synced with cdist itself.
This project does not have releases and is continously updated: see
`CHANGELOG.md` for details.
## Using cdist-contrib
......@@ -39,3 +40,16 @@ Join us on [#cdist:ungleich.ch][cdistmatrix] on matrix or on
[cdistconfig]: https://www.cdi.st/manual/latest/cdist-configuration.html
[cdistmatrix]: https://matrix.to/#/#cdist:ungleich.ch
[cdistmattermost]: https://chat.ungleich.ch/ungleich/channels/cdist
## Contributing
The preferred way to submit patches is by opening Merge Requests against the
[cdist-contrib project on
code.ungleich.ch](https://code.ungleich.ch/ungleich-public/cdist-contrib) (you
can make an account on
[account.ungleich.ch](https://account.ungleich.ch/).
Every type in cdist-contrib must:
* Have a `man.rst` documentation page.
* Pass [shellcheck](http://shellcheck.net/) without errors.
#!/bin/sh
# Move to top-level cdist-contrib directory.
cd $(dirname $0)/..
# Check that each type has a man page.
status=0
for t in type/*; do
if [ ! -f "$t/man.rst" ]; then
echo "No manpage for type $t!"
status=1
fi
done
exit $status
#!/bin/sh
SHELLCHECKCMD="shellcheck -s sh -f gcc -x"
# Skip SC2154 for variables starting with __ since such variables are cdist
# environment variables.
SHELLCHECK_SKIP=': __.*is referenced but not assigned.*\[SC2154\]'
SHELLCHECKTMP=".shellcheck.tmp"
# Move to top-level cdist-contrib directory.
cd $(dirname $0)/..
check () {
find type/ -type f $1 $2 -exec ${SHELLCHECKCMD} {} + | grep -v "${SHELLCHECK_SKIP}" > "${SHELLCHECKTMP}"
test ! -s "${SHELLCHECKTMP}" || { cat "${SHELLCHECKTMP}"; exit 1; }
}
check -path "*/explorer/*"
check -path "*/files/*"
check -name manifest
check -name gencode-local
check -name gencode-remote
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment