Dagger
Search

determine-environment

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/BCIT-LTC/daggerverse/determine-environment@c4f22323b9fbdd61d391a32bf3c41440f64d9c9a

Entrypoint

Return Type
DetermineEnvironment !
Example
dagger -m github.com/BCIT-LTC/daggerverse/determine-environment@c4f22323b9fbdd61d391a32bf3c41440f64d9c9a call \
func (m *myModule) example() *dagger.DetermineEnvironment  {
	return dag.
			DetermineEnvironment()
}
@function
def example() -> dagger.DetermineEnvironment:
	return (
		dag.determine_environment()
	)
@func()
example(): DetermineEnvironment {
	return dag
		.determineEnvironment()
}

Types

DetermineEnvironment 🔗

Object type for determining the CI environment

getenv() 🔗

Determine the environment of the project

Return Type
String !
Arguments
NameTypeDefault ValueDescription
commitmessageString !-Source directory containing the project files
branchString !-Branch name to check for the environment
mapstringString !-JSON string containing the environment map
Example
dagger -m github.com/BCIT-LTC/daggerverse/determine-environment@c4f22323b9fbdd61d391a32bf3c41440f64d9c9a call \
 getenv --commitmessage string --branch string --mapstring string
func (m *myModule) example(ctx context.Context, commitmessage string, branch string, mapstring string) string  {
	return dag.
			DetermineEnvironment().
			Getenv(ctx, commitmessage, branch, mapstring)
}
@function
async def example(commitmessage: str, branch: str, mapstring: str) -> str:
	return await (
		dag.determine_environment()
		.getenv(commitmessage, branch, mapstring)
	)
@func()
async example(commitmessage: string, branch: string, mapstring: string): Promise<string> {
	return dag
		.determineEnvironment()
		.getenv(commitmessage, branch, mapstring)
}