Skip to content
Snippets Groups Projects
Commit f768e838 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Merge branch 'add-tests' into 'helm'

Add tests

See merge request !24
parents 60d42c5a 3f1fe34b
No related branches found
No related tags found
1 merge request!24Add tests
Pipeline #132725 failed
generate:
stage: build
needs: []
image: harbor.pasteur.fr/kube-system/helm-kubectl:3.4.0
script:
- mkdir -p out-templates
- helm dependency update ./test-chart/
- >
helm template
--values ./test-chart/values.yaml
--values ./test-chart/values-${VALUES_SUFFIX}.yaml
toto ./test-chart/ > out-templates/template-${VALUES_SUFFIX}.yaml
parallel:
matrix:
- VALUES_SUFFIX: [
"with-storage",
"blank"
]
artifacts:
paths:
- out-templates
expire_in: 1 week
test:
stage: build
needs: ["generate"]
image: docker:24
before_script:
- i=0; while [ "$i" -lt 60 ]; do docker info && break; sleep 1; i=$(( i + 1 )) ; done
script:
- docker run -v ./kubelinter-config.yaml:/etc/config.yaml -v ./out-templates:/dir stackrox/kube-linter lint /dir --config /etc/config.yaml
upload: upload:
only:
- helm
stage: build stage: build
needs: [] needs: ["test"]
image: harbor.pasteur.fr/kube-system/helm-kubectl:3.4.0 image: harbor.pasteur.fr/kube-system/helm-kubectl:3.4.0
script: script:
- CHART_VERSION=$(helm show chart shiny-k8s-toolkit-helm | grep version | cut -d' ' -f2) - CHART_VERSION=$(helm show chart shiny-k8s-toolkit-helm | grep version | cut -d' ' -f2)
...@@ -20,6 +56,9 @@ upload: ...@@ -20,6 +56,9 @@ upload:
trigger_job: trigger_job:
only:
- helm
stage: deploy
needs: ["upload"] needs: ["upload"]
trigger: trigger:
project: hub/shiny-k8s-example project: hub/shiny-k8s-example
\ No newline at end of file
checks:
exclude:
- "latest-tag"
\ No newline at end of file
...@@ -41,6 +41,7 @@ spec: ...@@ -41,6 +41,7 @@ spec:
securityContext: securityContext:
runAsGroup: 999 runAsGroup: 999
runAsUser: 999 runAsUser: 999
readOnlyRootFilesystem: true
ports: ports:
- name: http - name: http
containerPort: 3838 containerPort: 3838
......
apiVersion: v2
name: test-project
description: A test project
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"
dependencies:
- name: shiny-k8s-toolkit-helm
version: "*"
repository: "file://../shiny-k8s-toolkit-helm"
shiny-k8s-toolkit-helm:
storage:
enabled: true
shiny-k8s-toolkit-helm:
autoscaling:
enabled: false
nodowntime:
enabled: false
registry:
private: false
resources:
requests:
cpu: '250m'
limits:
cpu: '500m'
storage:
enabled: false
keepOnDelete: false # should be false in dev, true in prod
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment