Added just a linter

This commit is contained in:
George Raven
2024-02-06 22:04:14 +00:00
parent c24f97ff0d
commit 1c27f7e1ae

41
.gitlab/.gitlab-ci.yaml Normal file
View File

@@ -0,0 +1,41 @@
stages:
- lint
- build
- test
- deploy
variables:
CHANNEL: "stable"
CHARTS_DIR: "charts"
BUILDX_VERSION: "v0.7.1" # https://github.com/docker/buildx/releases
BUILDX_ARCH: "linux-amd64" # I.E what architecture we are building FROM
BUILDX_TARGET_ARCHES: "linux/amd64,linux/arm64/v8" # what architecture we are building FOR
PAGES_DIR: "public"
# REUSABLE CONDITIONAL RULES FOR PIPELINE TRIGGERS
.rules_default_branch_push:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"
.rules_default_branch_tag:
rules:
- if: $CI_COMMIT_TAG
.rules_nondefault_branch_push:
rules:
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_COMMIT_TAG == "" && $CI_PIPELINE_SOURCE == "push"
helm-chart-lint:
stage: lint
image:
name: alpine/helm:latest
entrypoint: ["/bin/sh", "-c"]
script:
- |
for dir in ${CHARTS_DIR}/*/
do
dir=${dir%*/} # removes trailing "/"
echo "linting ${dir} chart"
helm lint "${dir}"/
done