Skip to content

Commit

Permalink
Add wiz-common chart (#508)
Browse files Browse the repository at this point in the history
* Add wiz-common chart

* add to pipeline

* PR fixes
  • Loading branch information
liorschach authored Jan 20, 2025
1 parent 460444f commit bd93392
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ workflows:
^wiz-kubernetes-connector/.* wiz-kubernetes-connector true
^wiz-kubernetes-integration/.* wiz-kubernetes-integration true
^wiz-network-analyzer/.* wiz-network-analyzer true
^wiz-common/.* wiz-common true
base-revision: << pipeline.git.branch >>
filters:
branches:
Expand Down
9 changes: 9 additions & 0 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ parameters:
wiz-network-analyzer:
default: false
type: boolean
wiz-common:
default: false
type: boolean

executors:
ops:
Expand Down Expand Up @@ -91,6 +94,7 @@ jobs:
- << pipeline.parameters.wiz-outpost-configuration >>
- << pipeline.parameters.wiz-outpost-lite >>
- << pipeline.parameters.wiz-network-analyzer >>
- << pipeline.parameters.wiz-common >>
steps:
- checkout:
path: ~/project
Expand All @@ -107,6 +111,11 @@ jobs:
IdentityFile ~/.ssh/id_rsa_4688b6e7049ef2cfcf4f0309e5581bf2
IdentitiesOnly yes' > ~/.ssh/config
git clone -b master git@gitops:wiz-sec/charts.git
- when:
condition: << pipeline.parameters.wiz-common >>
steps:
- upload_new_chart:
package: wiz-common
- when:
condition: << pipeline.parameters.flux2 >>
steps:
Expand Down
5 changes: 5 additions & 0 deletions wiz-common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: wiz-common
description: Common library chart for shared templates
type: library
version: 0.1.0
13 changes: 13 additions & 0 deletions wiz-common/templates/_require_helm_version.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- define "helmVersion" -}}
{{- if and .Values.mockCapabilities .Values.mockCapabilities.helmVersion .Values.mockCapabilities.helmVersion.version -}}
{{ .Values.mockCapabilities.helmVersion.version }}
{{- else -}}
{{ .Capabilities.HelmVersion.Version }}
{{- end -}}
{{- end -}}

{{- define "wiz-common.requireHelm36" -}}
{{- if not (semverCompare ">=3.6.0" (include "helmVersion" .)) -}}
{{- fail (printf "This chart requires Helm client version 3.6.0 or higher. Found %s" (include "helmVersion" .) ) -}}
{{- end -}}
{{- end -}}

0 comments on commit bd93392

Please sign in to comment.