maven
Dagger module to build maven Projects
Installation
dagger install github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7Entrypoint
Return Type
Maven !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| buildImage | String ! | "maven:3.9.9-eclipse-temurin-21-alpine" | image for executing Builds |
| useMvnw | Boolean ! | false | Use Maven Wrapper |
| useCache | Boolean ! | true | Use Cache for Maven repository (true recommended) |
| useDefaultCiOptions | Boolean ! | true | Use default maven parameters for CI builds |
| extraOptions | [String ! ] | - | Extra maven options, for example properties: "-Dmyprop=1" |
| parentPom | File | - | Parent Pom if multi-module project |
| useJib | Boolean ! | true | No description provided |
Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib booleanfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) *dagger.Maven {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
}@function
def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> dagger.Maven:
return (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Maven {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
}Types
Maven 🔗
Maven models the configuration and reusable container used to run Maven-based builds.
image() 🔗
image for executing Builds
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean imagefunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
Image(ctx)
}@function
async def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> str:
return await (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.image()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Promise<string> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.image()
}useMvnw() 🔗
Use Maven Wrapper
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean use-mvnwfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
UseMvnw(ctx)
}@function
async def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> bool:
return await (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.use_mvnw()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.useMvnw()
}useCache() 🔗
Use Cache for Maven repository
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean use-cachefunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
UseCache(ctx)
}@function
async def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> bool:
return await (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.use_cache()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.useCache()
}useDefaultCiOptions() 🔗
Use default maven parameters for CI builds
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean use-default-ci-optionsfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
UseDefaultCiOptions(ctx)
}@function
async def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> bool:
return await (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.use_default_ci_options()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.useDefaultCiOptions()
}extraOptions() 🔗
Extra maven options, for example properties: “-Dmyprop=1”
Return Type
[String ! ] ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean extra-optionsfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) []string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
ExtraOptions(ctx)
}@function
async def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> List[str]:
return await (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.extra_options()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Promise<string[]> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.extraOptions()
}parentPom() 🔗
Optional Parent POM for multi-modules buils
Return Type
File ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean parent-pomfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) *dagger.File {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
ParentPom()
}@function
def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> dagger.File:
return (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.parent_pom()
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): File {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.parentPom()
}useJib() 🔗
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean use-jibfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
UseJib(ctx)
}@function
async def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> bool:
return await (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.use_jib()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.useJib()
}fullBuildModules() 🔗
FullBuildModules orchestrates build, test, Sonar analysis, and image publishing for each module in order.
Return Type
[ModuleBuildResult ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
| commitSha | String ! | - | Digest do commit atual (sha completo) |
| version | String ! | - | Versão da aplicação no formato CalVer.BuildNumber |
| modules | [String ! ] ! | - | No description provided |
| sonarConfig | SonarConfig | - | No description provided |
| dockerConfig | DockerBuildConfig | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool, source *dagger.Directory, commitSha string, version string, modules []string) []*dagger.MavenModuleBuildResult {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
FullBuildModules(source, commitSha, version, modules)
}@function
def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool, source: dagger.Directory, commit_sha: str, version: str, modules: List[str]) -> List[dagger.MavenModuleBuildResult]:
return (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.full_build_modules(source, commit_sha, version, modules)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean, source: Directory, commitSha: string, version: string, modules: string[]): MavenModuleBuildResult[] {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.fullBuildModules(source, commitSha, version, modules)
}fullBuild() 🔗
FullBuild executes the three-stage pipeline (build/test, Sonar, Docker publish) for a single Maven module.
Return Type
ModuleBuildResult !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
| module | String ! | - | Module name |
| commitSha | String ! | - | Digest do commit atual (sha completo) |
| version | String ! | - | Versão da aplicação no formato CalVer.BuildNumber |
| sonarConfig | SonarConfig | - | No description provided |
| dockerConfig | DockerBuildConfig | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool, source *dagger.Directory, module string, commitSha string, version string) *dagger.MavenModuleBuildResult {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
FullBuild(source, module, commitSha, version)
}@function
def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool, source: dagger.Directory, module: str, commit_sha: str, version: str) -> dagger.MavenModuleBuildResult:
return (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.full_build(source, module, commit_sha, version)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean, source: Directory, module: string, commitSha: string, version: string): MavenModuleBuildResult {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.fullBuild(source, module, commitSha, version)
}newBaseContainer() 🔗
NewBaseContainer initializes the base container with caches and optional parent POM installation.
Return Type
Container ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean new-base-containerfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) *dagger.Container {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
NewBaseContainer()
}@function
def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> dagger.Container:
return (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.new_base_container()
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Container {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.newBaseContainer()
}container() 🔗
Container ensures a base container exists and returns it for further customization.
Return Type
Container ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean containerfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool) *dagger.Container {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
Container()
}@function
def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool) -> dagger.Container:
return (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.container()
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean): Container {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.container()
}getVersion() 🔗
GetVersion reads the module pom.xml (falling back to the parent POM) and returns the version value.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| moduleDir | Directory ! | - | No description provided |
Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean get-version --module-dir DIR_PATHfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool, moduleDir *dagger.Directory) string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
GetVersion(ctx, moduleDir)
}@function
async def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool, module_dir: dagger.Directory) -> str:
return await (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.get_version(module_dir)
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean, moduleDir: Directory): Promise<string> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.getVersion(moduleDir)
}getVersionOrDefault() 🔗
GetVersionOrDefault returns the module version or the provided default when it cannot be resolved.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| moduleDir | Directory ! | - | No description provided |
| defaultVersion | String ! | - | No description provided |
Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean get-version-or-default --module-dir DIR_PATH --default-version stringfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool, moduleDir *dagger.Directory, defaultVersion string) string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
GetVersionOrDefault(ctx, moduleDir, defaultVersion)
}@function
async def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool, module_dir: dagger.Directory, default_version: str) -> str:
return await (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.get_version_or_default(module_dir, default_version)
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean, moduleDir: Directory, defaultVersion: string): Promise<string> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.getVersionOrDefault(moduleDir, defaultVersion)
}newDockerBuildConfig() 🔗
NewDockerBuildConfig creates a DockerBuildConfig tailored for Maven builds.
Return Type
DockerBuildConfig !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| image | String ! | - | No description provided |
| tag | String ! | - | No description provided |
| username | String ! | - | No description provided |
| passwordSecret | Secret ! | - | No description provided |
Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean new-docker-build-config --image string --tag string --username string --password-secret env:MYSECRETfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool, image string, tag string, username string, passwordSecret *dagger.Secret) *dagger.MavenDockerBuildConfig {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
NewDockerBuildConfig(image, tag, username, passwordSecret)
}@function
def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool, image: str, tag: str, username: str, password_secret: dagger.Secret) -> dagger.MavenDockerBuildConfig:
return (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.new_docker_build_config(image, tag, username, password_secret)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean, image: string, tag: string, username: string, passwordSecret: Secret): MavenDockerBuildConfig {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.newDockerBuildConfig(image, tag, username, passwordSecret)
}newSonarConfig() 🔗
NewSonarConfig validates Maven Sonar settings and returns a reusable configuration struct.
Return Type
SonarConfig !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| host | String ! | - | No description provided |
| tokenSecret | Secret ! | - | No description provided |
| waitForQualityGate | Boolean ! | - | No description provided |
| extraOptions | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --use-jib boolean new-sonar-config --host string --token-secret env:MYSECRET --wait-for-quality-gate boolean --extra-options string1 --extra-options string2func (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, useJib bool, host string, tokenSecret *dagger.Secret, waitForQualityGate bool, extraOptions []string) *dagger.MavenSonarConfig {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib).
NewSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions)
}@function
def example(build_image: str, use_mvnw: bool, use_cache: bool, use_default_ci_options: bool, use_jib: bool, host: str, token_secret: dagger.Secret, wait_for_quality_gate: bool, extra_options: List[str]) -> dagger.MavenSonarConfig:
return (
dag.maven(build_image, use_mvnw, use_cache, use_default_ci_options, use_jib)
.new_sonar_config(host, token_secret, wait_for_quality_gate, extra_options)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, useJib: boolean, host: string, tokenSecret: Secret, waitForQualityGate: boolean, extraOptions: string[]): MavenSonarConfig {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, useJib)
.newSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions)
}ModuleBuildResult 🔗
ModuleBuildResult represents the aggregated outcome of a Maven module build.
artifacts() 🔗
Return Type
Directory ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(source *dagger.Directory, module string, commitSha string, version string) *dagger.Directory {
return dag.
Maven().
FullBuild(source, module, commitSha, version).
Artifacts()
}@function
def example(source: dagger.Directory, module: str, commit_sha: str, version: str) -> dagger.Directory:
return (
dag.maven()
.full_build(source, module, commit_sha, version)
.artifacts()
)@func()
example(source: Directory, module: string, commitSha: string, version: string): Directory {
return dag
.maven()
.fullBuild(source, module, commitSha, version)
.artifacts()
}container() 🔗
Return Type
Container ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(source *dagger.Directory, module string, commitSha string, version string) *dagger.Container {
return dag.
Maven().
FullBuild(source, module, commitSha, version).
Container()
}@function
def example(source: dagger.Directory, module: str, commit_sha: str, version: str) -> dagger.Container:
return (
dag.maven()
.full_build(source, module, commit_sha, version)
.container()
)@func()
example(source: Directory, module: string, commitSha: string, version: string): Container {
return dag
.maven()
.fullBuild(source, module, commitSha, version)
.container()
}imageUrl() 🔗
Return Type
String ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, module string, commitSha string, version string) string {
return dag.
Maven().
FullBuild(source, module, commitSha, version).
ImageUrl(ctx)
}@function
async def example(source: dagger.Directory, module: str, commit_sha: str, version: str) -> str:
return await (
dag.maven()
.full_build(source, module, commit_sha, version)
.image_url()
)@func()
async example(source: Directory, module: string, commitSha: string, version: string): Promise<string> {
return dag
.maven()
.fullBuild(source, module, commitSha, version)
.imageUrl()
}executedStages() 🔗
Return Type
[String ! ] ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, module string, commitSha string, version string) []string {
return dag.
Maven().
FullBuild(source, module, commitSha, version).
ExecutedStages(ctx)
}@function
async def example(source: dagger.Directory, module: str, commit_sha: str, version: str) -> List[str]:
return await (
dag.maven()
.full_build(source, module, commit_sha, version)
.executed_stages()
)@func()
async example(source: Directory, module: string, commitSha: string, version: string): Promise<string[]> {
return dag
.maven()
.fullBuild(source, module, commitSha, version)
.executedStages()
}stdout() 🔗
Return Type
[String ! ] ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, module string, commitSha string, version string) []string {
return dag.
Maven().
FullBuild(source, module, commitSha, version).
Stdout(ctx)
}@function
async def example(source: dagger.Directory, module: str, commit_sha: str, version: str) -> List[str]:
return await (
dag.maven()
.full_build(source, module, commit_sha, version)
.stdout()
)@func()
async example(source: Directory, module: string, commitSha: string, version: string): Promise<string[]> {
return dag
.maven()
.fullBuild(source, module, commitSha, version)
.stdout()
}stderr() 🔗
Return Type
[String ! ] ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, module string, commitSha string, version string) []string {
return dag.
Maven().
FullBuild(source, module, commitSha, version).
Stderr(ctx)
}@function
async def example(source: dagger.Directory, module: str, commit_sha: str, version: str) -> List[str]:
return await (
dag.maven()
.full_build(source, module, commit_sha, version)
.stderr()
)@func()
async example(source: Directory, module: string, commitSha: string, version: string): Promise<string[]> {
return dag
.maven()
.fullBuild(source, module, commitSha, version)
.stderr()
}DockerBuildConfig 🔗
DockerBuildConfig contains the information required to execute the Jib Maven plugin and push images.
image() 🔗
Image contains the image name without tag, for instance: registry/group/name
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-docker-build-config --image string --tag string --username string --password-secret env:MYSECRET \
imagefunc (m *MyModule) Example(ctx context.Context, image string, tag string, username string, passwordSecret *dagger.Secret) string {
return dag.
Maven().
NewDockerBuildConfig(image, tag, username, passwordSecret).
Image(ctx)
}@function
async def example(image: str, tag: str, username: str, password_secret: dagger.Secret) -> str:
return await (
dag.maven()
.new_docker_build_config(image, tag, username, password_secret)
.image()
)@func()
async example(image: string, tag: string, username: string, passwordSecret: Secret): Promise<string> {
return dag
.maven()
.newDockerBuildConfig(image, tag, username, passwordSecret)
.image()
}tag() 🔗
Tag image tag
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-docker-build-config --image string --tag string --username string --password-secret env:MYSECRET \
tagfunc (m *MyModule) Example(ctx context.Context, image string, tag string, username string, passwordSecret *dagger.Secret) string {
return dag.
Maven().
NewDockerBuildConfig(image, tag, username, passwordSecret).
Tag(ctx)
}@function
async def example(image: str, tag: str, username: str, password_secret: dagger.Secret) -> str:
return await (
dag.maven()
.new_docker_build_config(image, tag, username, password_secret)
.tag()
)@func()
async example(image: string, tag: string, username: string, passwordSecret: Secret): Promise<string> {
return dag
.maven()
.newDockerBuildConfig(image, tag, username, passwordSecret)
.tag()
}username() 🔗
Username to connect to a private registry
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-docker-build-config --image string --tag string --username string --password-secret env:MYSECRET \
usernamefunc (m *MyModule) Example(ctx context.Context, image string, tag string, username string, passwordSecret *dagger.Secret) string {
return dag.
Maven().
NewDockerBuildConfig(image, tag, username, passwordSecret).
Username(ctx)
}@function
async def example(image: str, tag: str, username: str, password_secret: dagger.Secret) -> str:
return await (
dag.maven()
.new_docker_build_config(image, tag, username, password_secret)
.username()
)@func()
async example(image: string, tag: string, username: string, passwordSecret: Secret): Promise<string> {
return dag
.maven()
.newDockerBuildConfig(image, tag, username, passwordSecret)
.username()
}passwordSecret() 🔗
Password for the user to connect to a private registry
Return Type
Secret ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-docker-build-config --image string --tag string --username string --password-secret env:MYSECRET \
password-secretfunc (m *MyModule) Example(image string, tag string, username string, passwordSecret *dagger.Secret) *dagger.Secret {
return dag.
Maven().
NewDockerBuildConfig(image, tag, username, passwordSecret).
PasswordSecret()
}@function
def example(image: str, tag: str, username: str, password_secret: dagger.Secret) -> dagger.Secret:
return (
dag.maven()
.new_docker_build_config(image, tag, username, password_secret)
.password_secret()
)@func()
example(image: string, tag: string, username: string, passwordSecret: Secret): Secret {
return dag
.maven()
.newDockerBuildConfig(image, tag, username, passwordSecret)
.passwordSecret()
}SonarConfig 🔗
SonarConfig stores the data required to invoke SonarQube analysis for a module.
host() 🔗
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-sonar-config --host string --token-secret env:MYSECRET --wait-for-quality-gate boolean --extra-options string1 --extra-options string2 \
hostfunc (m *MyModule) Example(ctx context.Context, host string, tokenSecret *dagger.Secret, waitForQualityGate bool, extraOptions []string) string {
return dag.
Maven().
NewSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions).
Host(ctx)
}@function
async def example(host: str, token_secret: dagger.Secret, wait_for_quality_gate: bool, extra_options: List[str]) -> str:
return await (
dag.maven()
.new_sonar_config(host, token_secret, wait_for_quality_gate, extra_options)
.host()
)@func()
async example(host: string, tokenSecret: Secret, waitForQualityGate: boolean, extraOptions: string[]): Promise<string> {
return dag
.maven()
.newSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions)
.host()
}tokenSecret() 🔗
Return Type
Secret ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-sonar-config --host string --token-secret env:MYSECRET --wait-for-quality-gate boolean --extra-options string1 --extra-options string2 \
token-secretfunc (m *MyModule) Example(host string, tokenSecret *dagger.Secret, waitForQualityGate bool, extraOptions []string) *dagger.Secret {
return dag.
Maven().
NewSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions).
TokenSecret()
}@function
def example(host: str, token_secret: dagger.Secret, wait_for_quality_gate: bool, extra_options: List[str]) -> dagger.Secret:
return (
dag.maven()
.new_sonar_config(host, token_secret, wait_for_quality_gate, extra_options)
.token_secret()
)@func()
example(host: string, tokenSecret: Secret, waitForQualityGate: boolean, extraOptions: string[]): Secret {
return dag
.maven()
.newSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions)
.tokenSecret()
}projectKey() 🔗
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-sonar-config --host string --token-secret env:MYSECRET --wait-for-quality-gate boolean --extra-options string1 --extra-options string2 \
project-keyfunc (m *MyModule) Example(ctx context.Context, host string, tokenSecret *dagger.Secret, waitForQualityGate bool, extraOptions []string) string {
return dag.
Maven().
NewSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions).
ProjectKey(ctx)
}@function
async def example(host: str, token_secret: dagger.Secret, wait_for_quality_gate: bool, extra_options: List[str]) -> str:
return await (
dag.maven()
.new_sonar_config(host, token_secret, wait_for_quality_gate, extra_options)
.project_key()
)@func()
async example(host: string, tokenSecret: Secret, waitForQualityGate: boolean, extraOptions: string[]): Promise<string> {
return dag
.maven()
.newSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions)
.projectKey()
}waitForQualityGate() 🔗
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-sonar-config --host string --token-secret env:MYSECRET --wait-for-quality-gate boolean --extra-options string1 --extra-options string2 \
wait-for-quality-gatefunc (m *MyModule) Example(ctx context.Context, host string, tokenSecret *dagger.Secret, waitForQualityGate bool, extraOptions []string) bool {
return dag.
Maven().
NewSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions).
WaitForQualityGate(ctx)
}@function
async def example(host: str, token_secret: dagger.Secret, wait_for_quality_gate: bool, extra_options: List[str]) -> bool:
return await (
dag.maven()
.new_sonar_config(host, token_secret, wait_for_quality_gate, extra_options)
.wait_for_quality_gate()
)@func()
async example(host: string, tokenSecret: Secret, waitForQualityGate: boolean, extraOptions: string[]): Promise<boolean> {
return dag
.maven()
.newSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions)
.waitForQualityGate()
}extraOptions() 🔗
Return Type
[String ! ] ! Example
dagger -m github.com/BasisTI/daggerverse/maven@31644f3dd85e7f117f9132b31e7df2622b3857c7 call \
new-sonar-config --host string --token-secret env:MYSECRET --wait-for-quality-gate boolean --extra-options string1 --extra-options string2 \
extra-optionsfunc (m *MyModule) Example(ctx context.Context, host string, tokenSecret *dagger.Secret, waitForQualityGate bool, extraOptions []string) []string {
return dag.
Maven().
NewSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions).
ExtraOptions(ctx)
}@function
async def example(host: str, token_secret: dagger.Secret, wait_for_quality_gate: bool, extra_options: List[str]) -> List[str]:
return await (
dag.maven()
.new_sonar_config(host, token_secret, wait_for_quality_gate, extra_options)
.extra_options()
)@func()
async example(host: string, tokenSecret: Secret, waitForQualityGate: boolean, extraOptions: string[]): Promise<string[]> {
return dag
.maven()
.newSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions)
.extraOptions()
}