pipeline-manager
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/pipeline-manager@a065cc6703c40641b847cda6c8f6afe198ad39c3
Entrypoint
Return Type
PipelineManager !
Example
dagger -m github.com/BCIT-LTC/daggerverse/pipeline-manager@a065cc6703c40641b847cda6c8f6afe198ad39c3 call \
func (m *MyModule) Example() *dagger.PipelineManager {
return dag.
PipelineManager()
}
@function
def example() -> dagger.PipelineManager:
return (
dag.pipeline_manager()
)
@func()
example(): PipelineManager {
return dag
.pipelineManager()
}
Types
PipelineManager 🔗
pushHelmOciRelease() 🔗
Push the Helm chart as an OCI artifact to the container registry.
Return Type
Void !
Example
dagger -m github.com/BCIT-LTC/daggerverse/pipeline-manager@a065cc6703c40641b847cda6c8f6afe198ad39c3 call \
push-helm-oci-release
func (m *MyModule) Example(ctx context.Context) {
return dag.
PipelineManager().
PushHelmOciRelease(ctx)
}
@function
async def example() -> None:
return await (
dag.pipeline_manager()
.push_helm_oci_release()
)
@func()
async example(): Promise<void> {
return dag
.pipelineManager()
.pushHelmOciRelease()
}
updateChartFiles() 🔗
Clone the repository, update Chart.yaml and values file with new app version, commit, and push changes. Then package and push the Helm chart to GHCR as OCI.
Return Type
Void !
Example
dagger -m github.com/BCIT-LTC/daggerverse/pipeline-manager@a065cc6703c40641b847cda6c8f6afe198ad39c3 call \
update-chart-files
func (m *MyModule) Example(ctx context.Context) {
return dag.
PipelineManager().
UpdateChartFiles(ctx)
}
@function
async def example() -> None:
return await (
dag.pipeline_manager()
.update_chart_files()
)
@func()
async example(): Promise<void> {
return dag
.pipelineManager()
.updateChartFiles()
}
run() 🔗
Main pipeline entry point. Builds, tags, and publishes a Docker image depending on the environment context.
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | Source directory |
githubToken | Secret | - | Github Token |
helmRepoPat | Secret | - | GitHub Personal Access Token for Helm repository |
username | String | - | Github Username |
branch | String | - | Current Branch |
commitHash | String | - | Current Commit Hash |
registryPath | String | - | Docker Registry Path |
repositoryUrl | String | - | Repository URL |
Example
dagger -m github.com/BCIT-LTC/daggerverse/pipeline-manager@a065cc6703c40641b847cda6c8f6afe198ad39c3 call \
run
func (m *MyModule) Example(ctx context.Context) {
return dag.
PipelineManager().
Run(ctx)
}
@function
async def example() -> None:
return await (
dag.pipeline_manager()
.run()
)
@func()
async example(): Promise<void> {
return dag
.pipelineManager()
.run()
}
runSemanticRelease() 🔗
Run semantic-release and update the environment and version based on the result. Only runs if the environment is LATEST_OR_STABLE.
Return Type
String !
Example
dagger -m github.com/BCIT-LTC/daggerverse/pipeline-manager@a065cc6703c40641b847cda6c8f6afe198ad39c3 call \
run-semantic-release
func (m *MyModule) Example(ctx context.Context) string {
return dag.
PipelineManager().
RunSemanticRelease(ctx)
}
@function
async def example() -> str:
return await (
dag.pipeline_manager()
.run_semantic_release()
)
@func()
async example(): Promise<string> {
return dag
.pipelineManager()
.runSemanticRelease()
}
unitTests() 🔗
Run unit tests by calling the test function in the source directory. This function is a placeholder and should be replaced with actual test logic.
Return Type
Void !
Example
dagger -m github.com/BCIT-LTC/daggerverse/pipeline-manager@a065cc6703c40641b847cda6c8f6afe198ad39c3 call \
unit-tests
func (m *MyModule) Example(ctx context.Context) {
return dag.
PipelineManager().
UnitTests(ctx)
}
@function
async def example() -> None:
return await (
dag.pipeline_manager()
.unit_tests()
)
@func()
async example(): Promise<void> {
return dag
.pipelineManager()
.unitTests()
}