Dragee
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/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4Entrypoint
Return Type
Dragee Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
func (m *MyModule) Example() *dagger.Dragee {
return dag.
Dragee()
}@function
def example() -> dagger.Dragee:
return (
dag.dragee()
)@func()
example(): Dragee {
return dag
.dragee()
}Types
Dragee 🔗
bunContainer() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| bunVersion | String ! | "latest" | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
bun-container --bun-version stringfunc (m *MyModule) Example(bunVersion string) *dagger.Container {
return dag.
Dragee().
BunContainer(bunVersion)
}@function
def example(bun_version: str) -> dagger.Container:
return (
dag.dragee()
.bun_container(bun_version)
)@func()
example(bunVersion: string): Container {
return dag
.dragee()
.bunContainer(bunVersion)
}nodeContainer() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| nodeVersion | String ! | "current-alpine3.21" | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
node-container --node-version stringfunc (m *MyModule) Example(nodeVersion string) *dagger.Container {
return dag.
Dragee().
NodeContainer(nodeVersion)
}@function
def example(node_version: str) -> dagger.Container:
return (
dag.dragee()
.node_container(node_version)
)@func()
example(nodeVersion: string): Container {
return dag
.dragee()
.nodeContainer(nodeVersion)
}installDependencies() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
install-dependencies --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Dragee().
InstallDependencies(source)
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.dragee()
.install_dependencies(source)
)@func()
example(source: Directory): Container {
return dag
.dragee()
.installDependencies(source)
}mountAppWith() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
mount-app-with --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Dragee().
MountAppWith(source)
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.dragee()
.mount_app_with(source)
)@func()
example(source: Directory): Container {
return dag
.dragee()
.mountAppWith(source)
}test() 🔗
It runs the tests of the project
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| app | Container ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
test --app IMAGE:TAGfunc (m *MyModule) Example(app *dagger.Container) *dagger.Container {
return dag.
Dragee().
Test(app)
}@function
def example(app: dagger.Container) -> dagger.Container:
return (
dag.dragee()
.test(app)
)@func()
example(app: Container): Container {
return dag
.dragee()
.test(app)
}lint() 🔗
This function runs the lint of the project
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| app | Container ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
lint --app IMAGE:TAGfunc (m *MyModule) Example(app *dagger.Container) *dagger.Container {
return dag.
Dragee().
Lint(app)
}@function
def example(app: dagger.Container) -> dagger.Container:
return (
dag.dragee()
.lint(app)
)@func()
example(app: Container): Container {
return dag
.dragee()
.lint(app)
}build() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
build --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Dragee().
Build(source)
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.dragee()
.build(source)
)@func()
example(source: Directory): Container {
return dag
.dragee()
.build(source)
}onPullRequest() 🔗
This function runs the lint and test of the project on a pull request trigger
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| url | String ! | - | - the repository url (it can either be a http or a git url) |
| branch | String ! | "main" | - the branch to use - defaults to `main` |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
on-pull-request --url string --branch stringfunc (m *MyModule) Example(ctx context.Context, url string, branch string) {
return dag.
Dragee().
OnPullRequest(ctx, url, branch)
}@function
async def example(url: str, branch: str) -> None:
return await (
dag.dragee()
.on_pull_request(url, branch)
)@func()
async example(url: string, branch: string): Promise<void> {
return dag
.dragee()
.onPullRequest(url, branch)
}lintAndTest() 🔗
This function runs the lint and test of the project (used by on_pull_request but can be used to test local changes)
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | the source directory |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
lint-and-test --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Dragee().
LintAndTest(source)
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.dragee()
.lint_and_test(source)
)@func()
example(source: Directory): Container {
return dag
.dragee()
.lintAndTest(source)
}onPublish() 🔗
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| npmToken | Secret ! | - | No description provided |
| source | Directory | - | No description provided |
| gitUrl | String | - | No description provided |
| branch | String | - | No description provided |
| tag | String | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
on-publish --npm-token env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, npmToken *dagger.Secret) {
return dag.
Dragee().
OnPublish(ctx, npmToken)
}@function
async def example(npm_token: dagger.Secret) -> None:
return await (
dag.dragee()
.on_publish(npm_token)
)@func()
async example(npmToken: Secret): Promise<void> {
return dag
.dragee()
.onPublish(npmToken)
}buildAndPublish() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| npmToken | Secret ! | - | No description provided |
| source | Directory ! | - | No description provided |
| tag | String ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
build-and-publish --npm-token env:MYSECRET --source DIR_PATH --tag stringfunc (m *MyModule) Example(npmToken *dagger.Secret, source *dagger.Directory, tag string) *dagger.Container {
return dag.
Dragee().
BuildAndPublish(npmToken, source, tag)
}@function
def example(npm_token: dagger.Secret, source: dagger.Directory, tag: str) -> dagger.Container:
return (
dag.dragee()
.build_and_publish(npm_token, source, tag)
)@func()
example(npmToken: Secret, source: Directory, tag: string): Container {
return dag
.dragee()
.buildAndPublish(npmToken, source, tag)
}publish() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| app | Container ! | - | No description provided |
| npmToken | Secret ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
publish --app IMAGE:TAG --npm-token env:MYSECRETfunc (m *MyModule) Example(app *dagger.Container, npmToken *dagger.Secret) *dagger.Container {
return dag.
Dragee().
Publish(app, npmToken)
}@function
def example(app: dagger.Container, npm_token: dagger.Secret) -> dagger.Container:
return (
dag.dragee()
.publish(app, npm_token)
)@func()
example(app: Container, npmToken: Secret): Container {
return dag
.dragee()
.publish(app, npmToken)
}updateAppVersion() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | No description provided |
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
update-app-version --version string --source DIR_PATHfunc (m *MyModule) Example(version string, source *dagger.Directory) *dagger.Container {
return dag.
Dragee().
UpdateAppVersion(version, source)
}@function
def example(version: str, source: dagger.Directory) -> dagger.Container:
return (
dag.dragee()
.update_app_version(version, source)
)@func()
example(version: string, source: Directory): Container {
return dag
.dragee()
.updateAppVersion(version, source)
}getLatestTag() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| url | String ! | - | No description provided |
Example
dagger -m github.com/dragee-io/daggerverse@ecd943610666c52c192ee2203d70d52100f5d3c4 call \
get-latest-tag --url stringfunc (m *MyModule) Example(ctx context.Context, url string) string {
return dag.
Dragee().
GetLatestTag(ctx, url)
}@function
async def example(url: str) -> str:
return await (
dag.dragee()
.get_latest_tag(url)
)@func()
async example(url: string): Promise<string> {
return dag
.dragee()
.getLatestTag(url)
}