epics-containers / services-template-helm

A template for IOC instance domain repositories - use this to create a new beamline or accelerator domain repo
Apache License 2.0
0 stars 0 forks source link

CI += linting and validation of charts #7

Closed marcelldls closed 3 weeks ago

marcelldls commented 1 month ago

closes #1

Example values.yaml input:

# yaml-language-server: $schema=https://github.com/epics-containers/ec-helm-charts/releases/download/4.1.0/ioc-instance.schema.json#/$defs/service
ioc-instance:
  image: True
  imag: ghcr.io/epics-containers/ioc-template-example-runtime:3.5.1

Example CI output:

 [esq51579@pc0146 b01-1-services]$ bash .gitlab/ci_verify.sh 
Saving 1 charts
Downloading ioc-instance from repo oci://ghcr.io/epics-containers
Pulled: ghcr.io/epics-containers/ioc-instance:4.0.0
Digest: sha256:d01bf34e2edc6f042fd49a250f7cc02482559f1d8ae3ac26c9dc913294582c02
Deleting outdated charts
==> Linting /home/esq51579/WIP/migration/b01-1-services/.ci_work/b01-1-ea-test-01
[INFO] Chart.yaml: icon is recommended
[ERROR] values.yaml: - ioc-instance: Additional property imag is not allowed
- ioc-instance.image: Invalid type. Expected: string, given: boolean

[ERROR] templates/: values don't meet the specifications of the schema(s) in the following chart(s):
ec-service:
- ioc-instance: Additional property imag is not allowed
- ioc-instance.image: Invalid type. Expected: string, given: boolean

Note:

marcelldls commented 1 month ago

I now use docker run to solve the helm dependency for github (so that it can be run locally)