From 05ae70e62f2df9d682a865eb5438c13f57a75140 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson <alexander.olofsson@liu.se> Date: Mon, 2 Jul 2018 14:36:04 +0200 Subject: [PATCH] Create a GitLab-CI file --- .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e8d686a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,42 @@ +--- +stages: + - puppet + +puppet-lint: + tags: [puppet] + stage: puppet + image: ananace/puppetlint:latest-checks + script: + - puppet-lint + --no-documentation-check + --with-filename + --config .puppet-lint.rc + --log-format '%{path}:%{line}:%{check}:%{KIND}:%{message}' + manifests + +puppet-parser: + tags: [puppet] + stage: puppet + image: ananace/puppetlint:latest + script: + - puppet parser validate + --strict_variables + --render-as s + --modulepath="$(pwd)/.." + manifests + - find templates -type f -name '*.epp' -print0 | + xargs -0r puppet epp validate --render-as s + # TODO: Remove --no-strict-license once a license is in place + - metadata-json-lint + --no-strict-license + metadata.json + +ruby: + tags: [puppet] + stage: puppet + image: ruby:alpine + script: + - "[ -d lib ] && find lib -type f -name '*.rb' -print0 | + xargs -0rn1 sh -c 'printf \"$0: \"; cat $0 | ruby -c 2>&1'" + - "[ -d templates ] && find templates -type f -name '*.erb' -print0 | + xargs -0rn1 sh -c 'printf \"$0: \"; erb -PxT \"-\" \"$0\" | ruby -c 2>&1'" -- GitLab