chart-updater
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/BCIT-LTC/daggerverse/chart-updater@27b9b81ff69dd34b712499bf770bcb1cbf0d3677
Entrypoint
Return Type
ChartUpdater !
Example
dagger -m github.com/BCIT-LTC/daggerverse/chart-updater@27b9b81ff69dd34b712499bf770bcb1cbf0d3677 call \
func (m *MyModule) Example() *dagger.ChartUpdater {
return dag.
ChartUpdater()
}
@function
def example() -> dagger.ChartUpdater:
return (
dag.chart_updater()
)
@func()
example(): ChartUpdater {
return dag
.chartUpdater()
}
Types
ChartUpdater 🔗
updatechart() 🔗
Main entrypoint: Update the Helm chart version and app version in Chart.yaml and values file. Raises QueryError if fetching or incrementing chart version fails.
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
jsonString | String ! | - | JSON string with app_name and app_version, e.g. '{"app_name": "my-app", "app_version": "1.2.3"}' |
chartYamlUrl | String ! | - | URL to Chart.yaml, e.g. 'https://raw.githubusercontent.com/org/repo/Chart.yaml' |
githubToken | Secret ! | - | GitHub token for authentication |
repositoryUrl | String ! | - | GitHub repository URL, e.g. 'https://github.com/org/repo.git' |
branch | String ! | - | Branch to update, e.g. 'main' |
chartPath | String ! | - | Path to the chart directory containing Chart.yaml, e.g. 'charts/my-app' |
valuesFile | String ! | - | Path to values file to update, e.g. 'values.yaml' |
Example
dagger -m github.com/BCIT-LTC/daggerverse/chart-updater@27b9b81ff69dd34b712499bf770bcb1cbf0d3677 call \
updatechart --json-string string --chart-yaml-url string --github-token env:MYSECRET --repository-url string --branch string --chart-path string --values-file string
func (m *MyModule) Example(ctx context.Context, jsonString string, chartYamlUrl string, githubToken *dagger.Secret, repositoryUrl string, branch string, chartPath string, valuesFile string) {
return dag.
ChartUpdater().
Updatechart(ctx, jsonString, chartYamlUrl, githubToken, repositoryUrl, branch, chartPath, valuesFile)
}
@function
async def example(json_string: str, chart_yaml_url: str, github_token: dagger.Secret, repository_url: str, branch: str, chart_path: str, values_file: str) -> None:
return await (
dag.chart_updater()
.updatechart(json_string, chart_yaml_url, github_token, repository_url, branch, chart_path, values_file)
)
@func()
async example(jsonString: string, chartYamlUrl: string, githubToken: Secret, repositoryUrl: string, branch: string, chartPath: string, valuesFile: string): Promise<void> {
return dag
.chartUpdater()
.updatechart(jsonString, chartYamlUrl, githubToken, repositoryUrl, branch, chartPath, valuesFile)
}