bupha
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/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83beEntrypoint
Return Type
Bupha ! Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
func (m *MyModule) Example() *dagger.Bupha {
return dag.
Bupha()
}@function
def example() -> dagger.Bupha:
return (
dag.bupha()
)@func()
example(): Bupha {
return dag
.bupha()
}Types
Bupha 🔗
coverageGate() 🔗
Blocking gate: scripts/coverage.sh –tooling-gate.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| repo | String ! | "repo" | No description provided |
| token | Secret | null | No description provided |
| sccacheConf | Secret | null | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
coverage-gate --repo stringfunc (m *MyModule) Example(ctx context.Context, repo string) string {
return dag.
Bupha().
Coveragegate(ctxrepo)
}@function
async def example(repo: str) -> str:
return await (
dag.bupha()
.coveragegate(repo)
)@func()
async example(repo: string): Promise<string> {
return dag
.bupha()
.coverageGate(repo)
}coverageReport() 🔗
Run scripts/coverage.sh and return the coverage/ directory.
Requires the repo to carry scripts/coverage.sh (platform’s convention). Export: dagger call … coverage-report export –path=coverage
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| repo | String ! | "repo" | No description provided |
| token | Secret | null | No description provided |
| sccacheConf | Secret | null | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
coverage-report --repo stringfunc (m *MyModule) Example(repo string) *dagger.Directory {
return dag.
Bupha().
Coveragereport(repo)
}@function
def example(repo: str) -> dagger.Directory:
return (
dag.bupha()
.coveragereport(repo)
)@func()
example(repo: string): Directory {
return dag
.bupha()
.coverageReport(repo)
}doctests() 🔗
Run workspace doctests (nextest does not cover them).
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| repo | String ! | "repo" | No description provided |
| token | Secret | null | No description provided |
| sccacheConf | Secret | null | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
doctests --repo stringfunc (m *MyModule) Example(ctx context.Context, repo string) string {
return dag.
Bupha().
Doctests(ctxrepo)
}@function
async def example(repo: str) -> str:
return await (
dag.bupha()
.doctests(repo)
)@func()
async example(repo: string): Promise<string> {
return dag
.bupha()
.doctests(repo)
}doctor() 🔗
Smoke-test the workspace container: toolchain versions + dev-link.
Cheap end-to-end check of everything except compiling Rust — image build, source mount, dev-link patch rewrite, git auth.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| repo | String ! | "repo" | No description provided |
| token | Secret | null | No description provided |
| sccacheConf | Secret | null | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
doctor --repo stringfunc (m *MyModule) Example(ctx context.Context, repo string) string {
return dag.
Bupha().
Doctor(ctxrepo)
}@function
async def example(repo: str) -> str:
return await (
dag.bupha()
.doctor(repo)
)@func()
async example(repo: string): Promise<string> {
return dag
.bupha()
.doctor(repo)
}run() 🔗
Run an arbitrary shell script inside the workspace container.
Escape hatch for repo-specific gates without writing module code.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| script | String ! | - | No description provided |
| repo | String ! | "repo" | No description provided |
| token | Secret | null | No description provided |
| sccacheConf | Secret | null | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
run --script string --repo stringfunc (m *MyModule) Example(ctx context.Context, script string, repo string) string {
return dag.
Bupha().
Run(ctxscript, repo)
}@function
async def example(script: str, repo: str) -> str:
return await (
dag.bupha()
.run(script, repo)
)@func()
async example(script: string, repo: string): Promise<string> {
return dag
.bupha()
.run(script, repo)
}runScript() 🔗
Run a shell script in a workspace container (auth + sccache env).
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | An OCI-compatible container, also known as a Docker container. |
| script | String ! | - | No description provided |
| authed | Boolean ! | false | No description provided |
| sccacheEnv | Boolean ! | false | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
run-script --ctr IMAGE:TAG --script string --authed boolean --sccache-env booleanfunc (m *MyModule) Example(ctr *dagger.Container, script string, authed bool, sccacheEnv bool) *dagger.Container {
return dag.
Bupha().
Runscript(ctr, script, authed, sccacheEnv)
}@function
def example(ctr: dagger.Container, script: str, authed: bool, sccacheenv: bool) -> dagger.Container:
return (
dag.bupha()
.runscript(ctr, script, authed, sccacheenv)
)@func()
example(ctr: Container, script: string, authed: boolean, sccacheEnv: boolean): Container {
return dag
.bupha()
.runScript(ctr, script, authed, sccacheEnv)
}test() 🔗
Run the full test gate: shards parallel nextest partitions + doctests.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| shards | Integer ! | 1 | No description provided |
| jobs | Integer ! | 2 | No description provided |
| repo | String ! | "repo" | No description provided |
| token | Secret | null | No description provided |
| sccacheConf | Secret | null | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
test --shards integer --jobs integer --repo stringfunc (m *MyModule) Example(ctx context.Context, shards int, jobs int, repo string) string {
return dag.
Bupha().
Test(ctxshards, jobs, repo)
}@function
async def example(shards: int, jobs: int, repo: str) -> str:
return await (
dag.bupha()
.test(shards, jobs, repo)
)@func()
async example(shards: number, jobs: number, repo: string): Promise<string> {
return dag
.bupha()
.test(shards, jobs, repo)
}testShard() 🔗
Run one nextest partition (count:shard/shards) over the workspace.
-j is deliberately low: heavy suites are memory-bound — scale out
via shards, not up via jobs.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| shard | Integer ! | 1 | No description provided |
| shards | Integer ! | 1 | No description provided |
| jobs | Integer ! | 2 | No description provided |
| repo | String ! | "repo" | No description provided |
| token | Secret | null | No description provided |
| sccacheConf | Secret | null | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
test-shard --shard integer --shards integer --jobs integer --repo stringfunc (m *MyModule) Example(ctx context.Context, shard int, shards int, jobs int, repo string) string {
return dag.
Bupha().
Testshard(ctxshard, shards, jobs, repo)
}@function
async def example(shard: int, shards: int, jobs: int, repo: str) -> str:
return await (
dag.bupha()
.testshard(shard, shards, jobs, repo)
)@func()
async example(shard: number, shards: number, jobs: number, repo: string): Promise<string> {
return dag
.bupha()
.testShard(shard, shards, jobs, repo)
}withSibling() 🔗
Mount a sibling checkout at /work/, link it, cache its target/.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | An OCI-compatible container, also known as a Docker container. |
| name | String ! | - | No description provided |
| source | Directory ! | - | A directory. |
| mainRepo | String ! | "repo" | No description provided |
| patchHost | String ! | "" | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
with-sibling --ctr IMAGE:TAG --name string --source DIR_PATH --main-repo string --patch-host stringfunc (m *MyModule) Example(ctr *dagger.Container, name string, source *dagger.Directory, mainRepo string, patchHost string) *dagger.Container {
return dag.
Bupha().
Withsibling(ctr, name, source, mainRepo, patchHost)
}@function
def example(ctr: dagger.Container, name: str, source: dagger.Directory, mainrepo: str, patchhost: str) -> dagger.Container:
return (
dag.bupha()
.withsibling(ctr, name, source, mainrepo, patchhost)
)@func()
example(ctr: Container, name: string, source: Directory, mainRepo: string, patchHost: string): Container {
return dag
.bupha()
.withSibling(ctr, name, source, mainRepo, patchHost)
}workspace() 🔗
Workspace container: source at /work/, caches, dev-link, self-patch.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
| repo | String ! | "repo" | No description provided |
| token | Secret | null | No description provided |
| sccacheConf | Secret | null | No description provided |
| patchHost | String ! | "" | No description provided |
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
workspace --repo string --patch-host stringfunc (m *MyModule) Example(repo string, patchHost string) *dagger.Container {
return dag.
Bupha().
Workspace(repo, patchHost)
}@function
def example(repo: str, patchhost: str) -> dagger.Container:
return (
dag.bupha()
.workspace(repo, patchhost)
)@func()
example(repo: string, patchHost: string): Container {
return dag
.bupha()
.workspace(repo, patchHost)
}