maven
Dagger module to build maven Projects
Installation
dagger install github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256Entrypoint
Return Type
Maven !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| buildImage | String ! | "maven:3.9.11-eclipse-temurin-21" | image for executing Builds. The default is deliberately not the -alpine variant: alpine is musl-based and the node binary frontend-maven-plugin downloads is glibc-linked, so frontend builds die on it. |
| 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" |
| reactorMode | Boolean ! | false | Build the target module from the reactor root, with -pl and -am, instead of mounting the module alone. Required by multi-module projects whose modules depend on sibling modules, and by parents that version themselves through a revision property. |
| useJib | Boolean ! | true | No description provided |
| useDocker | Boolean ! | false | Bind a Docker daemon to the build. Required by test suites that use Testcontainers: the Maven image ships no daemon, and without one they fail with "Could not find a valid Docker environment". Off by default because it costs a dind container per build. |
| sonarPluginVersion | String ! | "5.7.0.6970" | Version of sonar-maven-plugin to run the analysis with. Pinned so a SonarSource release cannot break the pipelines without a commit, and so the scanner stays compatible with the server the org actually runs. |
Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version stringfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) *dagger.Maven {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
}@function
def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> dagger.Maven:
return (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Maven {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
}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@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string imagefunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Image(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> str:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.image()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<string> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.image()
}useMvnw() 🔗
Use Maven Wrapper
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string use-mvnwfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Usemvnw(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> bool:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.usemvnw()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.useMvnw()
}useCache() 🔗
Use Cache for Maven repository
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string use-cachefunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Usecache(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> bool:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.usecache()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.useCache()
}useDefaultCiOptions() 🔗
Use default maven parameters for CI builds
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string use-default-ci-optionsfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Usedefaultcioptions(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> bool:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.usedefaultcioptions()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.useDefaultCiOptions()
}extraOptions() 🔗
Extra maven options, for example properties: “-Dmyprop=1”
Return Type
[String ! ] ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string extra-optionsfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) []string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Extraoptions(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> List[str]:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.extraoptions()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<string[]> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.extraOptions()
}reactorMode() 🔗
Build the target module from the reactor root instead of in isolation
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string reactor-modefunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Reactormode(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> bool:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.reactormode()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.reactorMode()
}useJib() 🔗
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string use-jibfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Usejib(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> bool:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.usejib()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.useJib()
}useDocker() 🔗
Bind a Docker daemon to the build, for test suites that use Testcontainers
Return Type
Boolean ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string use-dockerfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) bool {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Usedocker(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> bool:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.usedocker()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<boolean> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.useDocker()
}sonarPluginVersion() 🔗
Version of sonar-maven-plugin used for the analysis
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string sonar-plugin-versionfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Sonarpluginversion(ctx)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> str:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.sonarpluginversion()
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Promise<string> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.sonarPluginVersion()
}container() 🔗
Container ensures a base container exists and returns it for further customization.
Return Type
Container ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string containerfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) *dagger.Container {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Container()
}@function
def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> dagger.Container:
return (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.container()
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Container {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.container()
}fullBuild() 🔗
FullBuild executes the three-stage pipeline (build/test, Sonar, Docker publish) for a single Maven module.
With ReactorMode off, source is the module directory itself and the module is built in isolation. With ReactorMode on, source is the reactor root and module is the path of the target module inside it.
Return Type
ModuleBuildResult !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
| module | String ! | - | Module name. In reactor mode, the module path relative to the reactor root. |
| 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 |
| gitlabConfig | GitLabConfig | - | GitLab configuration for reporting commit statuses |
| modulePath | String | - | Caminho do módulo relativo à raiz do repositório. Quando informado, É o que permite ao Sonar fazer blame. O .git vive na raiz do repositório e o índice do git
referencia os arquivos pelo caminho a partir dela, então montar o .git dentro do diretório do
módulo NÃO funciona: o git passaria a resolver Ignorado em ReactorMode, que já monta a raiz por construção. |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string, source *dagger.Directory, module string, commitSha string, version string) *dagger.MavenModuleBuildResult {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Fullbuild(source, module, commitSha, version)
}@function
def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str, source: dagger.Directory, module: str, commitsha: str, version: str) -> dagger.MavenModuleBuildResult:
return (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.fullbuild(source, module, commitsha, version)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string, source: Directory, module: string, commitSha: string, version: string): MavenModuleBuildResult {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.fullBuild(source, module, commitSha, version)
}getVersion() 🔗
GetVersion reads pom.xml from the given directory and returns the project version.
In reactor mode the directory is the reactor root, so the POM read here is the parent that declares the version for the whole build; a ${revision} there is resolved against the property, which is where CI-friendly reactors keep the actual number.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| moduleDir | Directory ! | - | No description provided |
Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string get-version --module-dir DIR_PATHfunc (m *MyModule) Example(ctx context.Context, buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string, moduleDir *dagger.Directory) string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Getversion(ctx, moduleDir)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str, moduledir: dagger.Directory) -> str:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.getversion(moduledir)
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string, moduleDir: Directory): Promise<string> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.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@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string 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, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string, moduleDir *dagger.Directory, defaultVersion string) string {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Getversionordefault(ctx, moduleDir, defaultVersion)
}@function
async def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str, moduledir: dagger.Directory, defaultversion: str) -> str:
return await (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.getversionordefault(moduledir, defaultversion)
)@func()
async example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string, moduleDir: Directory, defaultVersion: string): Promise<string> {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.getVersionOrDefault(moduleDir, defaultVersion)
}newBaseContainer() 🔗
NewBaseContainer initializes the base container with caches and the optional Docker daemon.
Return Type
Container ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string new-base-containerfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string) *dagger.Container {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Newbasecontainer()
}@function
def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str) -> dagger.Container:
return (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.newbasecontainer()
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string): Container {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.newBaseContainer()
}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@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string 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, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string, image string, tag string, username string, passwordSecret *dagger.Secret) *dagger.MavenDockerBuildConfig {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Newdockerbuildconfig(image, tag, username, passwordSecret)
}@function
def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str, image: str, tag: str, username: str, passwordsecret: dagger.Secret) -> dagger.MavenDockerBuildConfig:
return (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.newdockerbuildconfig(image, tag, username, passwordsecret)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string, image: string, tag: string, username: string, passwordSecret: Secret): MavenDockerBuildConfig {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.newDockerBuildConfig(image, tag, username, passwordSecret)
}newGitLabConfig() 🔗
NewGitLabConfig validates the provided inputs and returns a GitLab configuration for commit statuses.
Return Type
GitLabConfig !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| host | String ! | - | No description provided |
| tokenSecret | Secret ! | - | No description provided |
| projectId | String ! | - | No description provided |
| ref | String | - | Branch da pipeline que reporta. Sem ela o status terminal pode ser anexado a outra pipeline do mesmo commit, deixando a original travada em “running”. |
Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string new-git-lab-config --host string --token-secret env:MYSECRET --project-id stringfunc (m *MyModule) Example(buildImage string, useMvnw bool, useCache bool, useDefaultCiOptions bool, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string, host string, tokenSecret *dagger.Secret, projectId string) *dagger.MavenGitLabConfig {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Newgitlabconfig(host, tokenSecret, projectId)
}@function
def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str, host: str, tokensecret: dagger.Secret, projectid: str) -> dagger.MavenGitLabConfig:
return (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.newgitlabconfig(host, tokensecret, projectid)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string, host: string, tokenSecret: Secret, projectId: string): MavenGitLabConfig {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.newGitLabConfig(host, tokenSecret, projectId)
}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 |
| projectKey | String | - | Chave do projeto no SonarQube. Se vazia, FullBuild usa o nome do módulo. |
Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
--build-image string --use-mvnw boolean --use-cache boolean --use-default-ci-options boolean --reactor-mode boolean --use-jib boolean --use-docker boolean --sonar-plugin-version string 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, reactorMode bool, useJib bool, useDocker bool, sonarPluginVersion string, host string, tokenSecret *dagger.Secret, waitForQualityGate bool, extraOptions []string) *dagger.MavenSonarConfig {
return dag.
Maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion).
Newsonarconfig(host, tokenSecret, waitForQualityGate, extraOptions)
}@function
def example(buildimage: str, usemvnw: bool, usecache: bool, usedefaultcioptions: bool, reactormode: bool, usejib: bool, usedocker: bool, sonarpluginversion: str, host: str, tokensecret: dagger.Secret, waitforqualitygate: bool, extraoptions: List[str]) -> dagger.MavenSonarConfig:
return (
dag.maven(buildimage, usemvnw, usecache, usedefaultcioptions, reactormode, usejib, usedocker, sonarpluginversion)
.newsonarconfig(host, tokensecret, waitforqualitygate, extraoptions)
)@func()
example(buildImage: string, useMvnw: boolean, useCache: boolean, useDefaultCiOptions: boolean, reactorMode: boolean, useJib: boolean, useDocker: boolean, sonarPluginVersion: string, host: string, tokenSecret: Secret, waitForQualityGate: boolean, extraOptions: string[]): MavenSonarConfig {
return dag
.maven(buildImage, useMvnw, useCache, useDefaultCiOptions, reactorMode, useJib, useDocker, sonarPluginVersion)
.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, commitsha: str, version: str) -> dagger.Directory:
return (
dag.maven()
.fullbuild(source, module, commitsha, 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, commitsha: str, version: str) -> dagger.Container:
return (
dag.maven()
.fullbuild(source, module, commitsha, 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, commitsha: str, version: str) -> str:
return await (
dag.maven()
.fullbuild(source, module, commitsha, version)
.imageurl()
)@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, commitsha: str, version: str) -> List[str]:
return await (
dag.maven()
.fullbuild(source, module, commitsha, version)
.executedstages()
)@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, commitsha: str, version: str) -> List[str]:
return await (
dag.maven()
.fullbuild(source, module, commitsha, 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, commitsha: str, version: str) -> List[str]:
return await (
dag.maven()
.fullbuild(source, module, commitsha, version)
.stderr()
)@func()
async example(source: Directory, module: string, commitSha: string, version: string): Promise<string[]> {
return dag
.maven()
.fullBuild(source, module, commitSha, version)
.stderr()
}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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, tokensecret: dagger.Secret, waitforqualitygate: bool, extraoptions: List[str]) -> str:
return await (
dag.maven()
.newsonarconfig(host, tokensecret, waitforqualitygate, extraoptions)
.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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, tokensecret: dagger.Secret, waitforqualitygate: bool, extraoptions: List[str]) -> dagger.Secret:
return (
dag.maven()
.newsonarconfig(host, tokensecret, waitforqualitygate, extraoptions)
.tokensecret()
)@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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, tokensecret: dagger.Secret, waitforqualitygate: bool, extraoptions: List[str]) -> str:
return await (
dag.maven()
.newsonarconfig(host, tokensecret, waitforqualitygate, extraoptions)
.projectkey()
)@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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, tokensecret: dagger.Secret, waitforqualitygate: bool, extraoptions: List[str]) -> bool:
return await (
dag.maven()
.newsonarconfig(host, tokensecret, waitforqualitygate, extraoptions)
.waitforqualitygate()
)@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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, tokensecret: dagger.Secret, waitforqualitygate: bool, extraoptions: List[str]) -> List[str]:
return await (
dag.maven()
.newsonarconfig(host, tokensecret, waitforqualitygate, extraoptions)
.extraoptions()
)@func()
async example(host: string, tokenSecret: Secret, waitForQualityGate: boolean, extraOptions: string[]): Promise<string[]> {
return dag
.maven()
.newSonarConfig(host, tokenSecret, waitForQualityGate, extraOptions)
.extraOptions()
}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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, passwordsecret: dagger.Secret) -> str:
return await (
dag.maven()
.newdockerbuildconfig(image, tag, username, passwordsecret)
.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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, passwordsecret: dagger.Secret) -> str:
return await (
dag.maven()
.newdockerbuildconfig(image, tag, username, passwordsecret)
.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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, passwordsecret: dagger.Secret) -> str:
return await (
dag.maven()
.newdockerbuildconfig(image, tag, username, passwordsecret)
.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@bd6f229658c0e64a3253dfd6c18079ff12c75256 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, passwordsecret: dagger.Secret) -> dagger.Secret:
return (
dag.maven()
.newdockerbuildconfig(image, tag, username, passwordsecret)
.passwordsecret()
)@func()
example(image: string, tag: string, username: string, passwordSecret: Secret): Secret {
return dag
.maven()
.newDockerBuildConfig(image, tag, username, passwordSecret)
.passwordSecret()
}GitLabConfig 🔗
GitLabConfig stores the data needed to report commit statuses to GitLab.
host() 🔗
URL base (ex: “https://gitlab.com”)
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
new-git-lab-config --host string --token-secret env:MYSECRET --project-id string \
hostfunc (m *MyModule) Example(ctx context.Context, host string, tokenSecret *dagger.Secret, projectId string) string {
return dag.
Maven().
Newgitlabconfig(host, tokenSecret, projectId).
Host(ctx)
}@function
async def example(host: str, tokensecret: dagger.Secret, projectid: str) -> str:
return await (
dag.maven()
.newgitlabconfig(host, tokensecret, projectid)
.host()
)@func()
async example(host: string, tokenSecret: Secret, projectId: string): Promise<string> {
return dag
.maven()
.newGitLabConfig(host, tokenSecret, projectId)
.host()
}tokenSecret() 🔗
Token com scope
api
Return Type
Secret ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
new-git-lab-config --host string --token-secret env:MYSECRET --project-id string \
token-secretfunc (m *MyModule) Example(host string, tokenSecret *dagger.Secret, projectId string) *dagger.Secret {
return dag.
Maven().
Newgitlabconfig(host, tokenSecret, projectId).
Tokensecret()
}@function
def example(host: str, tokensecret: dagger.Secret, projectid: str) -> dagger.Secret:
return (
dag.maven()
.newgitlabconfig(host, tokensecret, projectid)
.tokensecret()
)@func()
example(host: string, tokenSecret: Secret, projectId: string): Secret {
return dag
.maven()
.newGitLabConfig(host, tokenSecret, projectId)
.tokenSecret()
}projectId() 🔗
ID numérico ou path URL-encoded
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
new-git-lab-config --host string --token-secret env:MYSECRET --project-id string \
project-idfunc (m *MyModule) Example(ctx context.Context, host string, tokenSecret *dagger.Secret, projectId string) string {
return dag.
Maven().
Newgitlabconfig(host, tokenSecret, projectId).
Projectid(ctx)
}@function
async def example(host: str, tokensecret: dagger.Secret, projectid: str) -> str:
return await (
dag.maven()
.newgitlabconfig(host, tokensecret, projectid)
.projectid()
)@func()
async example(host: string, tokenSecret: Secret, projectId: string): Promise<string> {
return dag
.maven()
.newGitLabConfig(host, tokenSecret, projectId)
.projectId()
}ref() 🔗
Branch da pipeline (ex: CI_COMMIT_REF_NAME)
Return Type
String ! Example
dagger -m github.com/BasisTI/daggerverse/maven@bd6f229658c0e64a3253dfd6c18079ff12c75256 call \
new-git-lab-config --host string --token-secret env:MYSECRET --project-id string \
reffunc (m *MyModule) Example(ctx context.Context, host string, tokenSecret *dagger.Secret, projectId string) string {
return dag.
Maven().
Newgitlabconfig(host, tokenSecret, projectId).
Ref(ctx)
}@function
async def example(host: str, tokensecret: dagger.Secret, projectid: str) -> str:
return await (
dag.maven()
.newgitlabconfig(host, tokensecret, projectid)
.ref()
)@func()
async example(host: string, tokenSecret: Secret, projectId: string): Promise<string> {
return dag
.maven()
.newGitLabConfig(host, tokenSecret, projectId)
.ref()
}