helm-ci
This Dagger scenario composes the local Helm and Git modules into portableHelm chart verification and publication workflows.
Installation
dagger install github.com/riftonix/daggerverse/scenarios/helm-ci@616d9006932b1412e48832eed51a5f85d2a6f69bEntrypoint
Return Type
HelmCi !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| helmImageRegistry | String | "docker.io" | Helm image registry |
| helmImageRepository | String | "alpine/helm" | Helm image repository |
| helmImageTag | String | "3.18.6" | Helm image tag |
| helmContainerUserId | String | "65532" | Helm container user |
| gitImageRegistry | String | "docker.io" | Git image registry for changed-chart detection |
| gitImageRepository | String | "alpine/git" | Git image repository for changed-chart detection |
| gitImageTag | String | "2.52.0" | Git image tag for changed-chart detection |
| gitContainerUserId | String | "65532" | Git container user for changed-chart detection |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/helm-ci@616d9006932b1412e48832eed51a5f85d2a6f69b call \
func (m *MyModule) Example() *dagger.HelmCi {
return dag.
Helmci()
}@function
def example() -> dagger.HelmCi:
return (
dag.helm_ci()
)@func()
example(): HelmCi {
return dag
.helmCi()
}Types
HelmCi 🔗
helmPublish() 🔗
Package and push helm chart via local helm module
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Helm chart directory |
| ociUrl | String ! | - | Destination OCI registry URL without chart name |
| version | String ! | - | Chart semver to publish |
| appVersion | String | null | Optional appVersion override |
| username | String | null | Registry username for login |
| password | Secret | null | Registry password |
| insecure | Boolean | false | Allow plain http pushes |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/helm-ci@616d9006932b1412e48832eed51a5f85d2a6f69b call \
helm-publish --oci-url string --version stringfunc (m *MyModule) Example(ctx context.Context, ociUrl string, version string) string {
return dag.
Helmci().
Helmpublish(ctxociUrl, version)
}@function
async def example(ociurl: str, version: str) -> str:
return await (
dag.helm_ci()
.helmpublish(ociurl, version)
)@func()
async example(ociUrl: string, version: string): Promise<string> {
return dag
.helmCi()
.helmPublish(ociUrl, version)
}helmVerify() 🔗
Run Helm lint and template via local helm module
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Helm chart directory |
| values | File | null | Optional values.yaml file |
| releaseName | String ! | "ci-release" | Helm release name for templating |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/helm-ci@616d9006932b1412e48832eed51a5f85d2a6f69b call \
helm-verify --release-name stringfunc (m *MyModule) Example(ctx context.Context, releaseName string) string {
return dag.
Helmci().
Helmverify(ctxreleaseName)
}@function
async def example(releasename: str) -> str:
return await (
dag.helm_ci()
.helmverify(releasename)
)@func()
async example(releaseName: string): Promise<string> {
return dag
.helmCi()
.helmVerify(releaseName)
}helmVerifyChangedCharts() 🔗
Verify changed charts/libs and optionally publish feature versions
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Repository root directory |
| targetBranch | String ! | "master" | Target branch or ref to diff against |
| chartsPath | String | null | Charts directory (relative to repo root) |
| libsPath | String | null | Libraries directory (relative to repo root) |
| values | File | null | Optional values.yaml file |
| releaseName | String ! | "ci-release" | Helm release name for templating |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/helm-ci@616d9006932b1412e48832eed51a5f85d2a6f69b call \
helm-verify-changed-charts --target-branch string --release-name stringfunc (m *MyModule) Example(ctx context.Context, targetBranch string, releaseName string) []string {
return dag.
Helmci().
Helmverifychangedcharts(ctxtargetBranch, releaseName)
}@function
async def example(targetbranch: str, releasename: str) -> List[str]:
return await (
dag.helm_ci()
.helmverifychangedcharts(targetbranch, releasename)
)@func()
async example(targetBranch: string, releaseName: string): Promise<string[]> {
return dag
.helmCi()
.helmVerifyChangedCharts(targetBranch, releaseName)
}