Dockerized lagoonlinter with various versions, easy to use and easy to integrate with CI.
docker run --rm -v $PATH_TO_LAGOONYAML:/app frxncodominguez/lagoonlinter lagoonlinter
# Please replace "$PATH_TO_LAGOONYAML" with your custom path where is the lagoon.yml file.
Just like above, but you can specify version of lagoonlinter, for example:
docker run --rm -v $PATH_TO_LAGOONYAML:/app frxncodominguez/lagoonlinter:0.7.0 lagoonlinter
# Please replace "0.7.0" with the version number you want.
# Don't forget to replace "$PATH_TO_LAGOONYAML".
Enable Docker service in your .travis.yml
:
services:
- docker
And use the same command in the scripts
part as the command line mentions, for example:
services:
- docker
scripts:
- docker run --rm -v $TRAVIS_BUILD_DIR:/app frxncodominguez/lagoonlinter:0.7.0 lagoonlinter
This will lint the Travis CI config file .travis.yml
Add this block to your .gitlab-ci.yml
:
yamllint:
stage: lint
variables:
lagoonlinter_version: "0.7.0"
image: frxncodominguez/lagoonlinter:$lagoonlinter_version
only:
changes:
- "**/.lagoon.yml"
script:
- find . -name ".lagoon.yml" | xargs -n 1 lagoonlinter
Replace "0.7.0" with the version you want to use, you can also use "latest" for the very new version.
Build command, you need to specify a valid lagoon-linter version argument to LAGOONLINTER_VERSION
:
docker build --build-arg LAGOONLINTER_VERSION="0.7.0" -t docker-lagoonlinter .
# Replace "docker-lagoonlinter" with the preferred image name
You can find a valid version in the release history on Github.