From 2d8ff763dbf012a9bd48b7c17f2a98451e9a940a Mon Sep 17 00:00:00 2001
From: Bryan Brancotte <bryan.brancotte@pasteur.fr>
Date: Fri, 14 Jun 2024 09:09:05 +0200
Subject: [PATCH] add first test
---
.gitlab-ci.yml | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 322842a..8610244 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,32 @@
+generate:
+ stage: test
+ needs: []
+ image: harbor.pasteur.fr/kube-system/helm-kubectl:3.4.0
+ script:
+ - mkdir -p out-templates
+ - helm dependency update ./test-chart/
+ - helm template toto ./test-chart/ > out-templates/template.yaml
+ artifacts:
+ paths:
+ - templates
+ expire_in: 1 week
+
+
+
+test:
+ stage: test
+ needs: ["generate"]
+ image: docker:24
+ script:
+ - docker run -v ./out-templates:/dir stackrox/kube-linter lint /dir
+
upload:
+ only:
+ - helm
stage: build
- needs: []
+ needs: ["test"]
image: harbor.pasteur.fr/kube-system/helm-kubectl:3.4.0
script:
- CHART_VERSION=$(helm show chart shiny-k8s-toolkit-helm | grep version | cut -d' ' -f2)
@@ -20,6 +44,8 @@ upload:
trigger_job:
+ only:
+ - helm
needs: ["upload"]
trigger:
- project: hub/shiny-k8s-example
\ No newline at end of file
+ project: hub/shiny-k8s-example
--
GitLab