Dagger
Search

bupha

This module has been generated via dagger init and serves as a reference to
basic 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@4f37c65137bef38faf7f8835f7115f1e9c0e83be

Entrypoint

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
NameTypeDefault ValueDescription
sourceDirectory -No description provided
repoString !"repo"No description provided
tokenSecret nullNo description provided
sccacheConfSecret nullNo description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 coverage-gate --repo string
func (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
NameTypeDefault ValueDescription
sourceDirectory -No description provided
repoString !"repo"No description provided
tokenSecret nullNo description provided
sccacheConfSecret nullNo description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 coverage-report --repo string
func (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
NameTypeDefault ValueDescription
sourceDirectory -No description provided
repoString !"repo"No description provided
tokenSecret nullNo description provided
sccacheConfSecret nullNo description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 doctests --repo string
func (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
NameTypeDefault ValueDescription
sourceDirectory -No description provided
repoString !"repo"No description provided
tokenSecret nullNo description provided
sccacheConfSecret nullNo description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 doctor --repo string
func (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
NameTypeDefault ValueDescription
sourceDirectory -No description provided
scriptString !-No description provided
repoString !"repo"No description provided
tokenSecret nullNo description provided
sccacheConfSecret nullNo description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 run --script string --repo string
func (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
NameTypeDefault ValueDescription
ctrContainer !-

An OCI-compatible container, also known as a Docker container.

scriptString !-No description provided
authedBoolean !falseNo description provided
sccacheEnvBoolean !falseNo description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 run-script --ctr IMAGE:TAG --script string --authed boolean --sccache-env boolean
func (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
NameTypeDefault ValueDescription
sourceDirectory -No description provided
shardsInteger !1No description provided
jobsInteger !2No description provided
repoString !"repo"No description provided
tokenSecret nullNo description provided
sccacheConfSecret nullNo description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 test --shards integer --jobs integer --repo string
func (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
NameTypeDefault ValueDescription
sourceDirectory -No description provided
shardInteger !1No description provided
shardsInteger !1No description provided
jobsInteger !2No description provided
repoString !"repo"No description provided
tokenSecret nullNo description provided
sccacheConfSecret nullNo description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 test-shard --shard integer --shards integer --jobs integer --repo string
func (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
NameTypeDefault ValueDescription
ctrContainer !-

An OCI-compatible container, also known as a Docker container.

nameString !-No description provided
sourceDirectory !-

A directory.

mainRepoString !"repo"No description provided
patchHostString !""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 string
func (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
NameTypeDefault ValueDescription
sourceDirectory -No description provided
repoString !"repo"No description provided
tokenSecret nullNo description provided
sccacheConfSecret nullNo description provided
patchHostString !""No description provided
Example
dagger -m github.com/9aia/bupha/modules/dagger@4f37c65137bef38faf7f8835f7115f1e9c0e83be call \
 workspace --repo string --patch-host string
func (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)
}