Dagger
Search

dagger-demo

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/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d

Entrypoint

Return Type
DaggerDemo !
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
func (m *MyModule) Example() *dagger.DaggerDemo  {
	return dag.
			DaggerDemo()
}
@function
def example() -> dagger.DaggerDemo:
	return (
		dag.dagger_demo()
	)
@func()
example(): DaggerDemo {
	return dag
		.daggerDemo()
}

Types

DaggerDemo 🔗

buildAndPushImages() 🔗

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-A projekt gyökérkönyvtára, tartalmazza a backend/ és frontend/ mappákat
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
 build-and-push-images --src DIR_PATH
func (m *MyModule) Example(ctx context.Context, src *dagger.Directory)   {
	return dag.
			DaggerDemo().
			BuildAndPushImages(ctx, src)
}
@function
async def example(src: dagger.Directory) -> None:
	return await (
		dag.dagger_demo()
		.build_and_push_images(src)
	)
@func()
async example(src: Directory): Promise<void> {
	return dag
		.daggerDemo()
		.buildAndPushImages(src)
}

deployFullStack() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-Manifestek könyvtára
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
 deploy-full-stack --src DIR_PATH
func (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string  {
	return dag.
			DaggerDemo().
			DeployFullStack(ctx, src)
}
@function
async def example(src: dagger.Directory) -> str:
	return await (
		dag.dagger_demo()
		.deploy_full_stack(src)
	)
@func()
async example(src: Directory): Promise<string> {
	return dag
		.daggerDemo()
		.deployFullStack(src)
}

kubectl() 🔗

Ez a függvény futtat egy kubectl parancsot a megadott K3s szolgáltatáson, és visszaadja a parancs kimenetét.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
commands[String ! ] !-No description provided
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
 kubectl --commands string1 --commands string2
func (m *MyModule) Example(ctx context.Context, commands []string) string  {
	return dag.
			DaggerDemo().
			Kubectl(ctx, commands)
}
@function
async def example(commands: List[str]) -> str:
	return await (
		dag.dagger_demo()
		.kubectl(commands)
	)
@func()
async example(commands: string[]): Promise<string> {
	return dag
		.daggerDemo()
		.kubectl(commands)
}

server() 🔗

Létrehoz egy helyi regisztrációs szolgáltatást, előtölti a docker képet, majd elindít egy K3s szervert, amely ezt a szolgáltatást használja. Visszatérési érték: egy K3s szolgáltatás (dagger.Service).

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-location of directory containing Dockerfile
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
 server --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.Service  {
	return dag.
			DaggerDemo().
			Server(src)
}
@function
def example(src: dagger.Directory) -> dagger.Service:
	return (
		dag.dagger_demo()
		.server(src)
	)
@func()
example(src: Directory): Service {
	return dag
		.daggerDemo()
		.server(src)
}

testBackend() 🔗

Teszteli a backend /api végpontját.

Return Type
String !
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
 test-backend
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			DaggerDemo().
			TestBackend(ctx)
}
@function
async def example() -> str:
	return await (
		dag.dagger_demo()
		.test_backend()
	)
@func()
async example(): Promise<string> {
	return dag
		.daggerDemo()
		.testBackend()
}

testE2E() 🔗

Lekéri a frontend root-ot, ahol a JS végrehajtódna, és azonnal a /api proxy-végpontot is kipróbálja.

Return Type
String !
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
 test-e-2-e
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			DaggerDemo().
			TestE2E(ctx)
}
@function
async def example() -> str:
	return await (
		dag.dagger_demo()
		.test_e2_e()
	)
@func()
async example(): Promise<string> {
	return dag
		.daggerDemo()
		.testE2E()
}

testFrontend() 🔗

Teszteli a frontend UI-t.

Return Type
String !
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
 test-frontend
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			DaggerDemo().
			TestFrontend(ctx)
}
@function
async def example() -> str:
	return await (
		dag.dagger_demo()
		.test_frontend()
	)
@func()
async example(): Promise<string> {
	return dag
		.daggerDemo()
		.testFrontend()
}

waitReady() 🔗

Megvárja, hogy mind a backend, mind a frontend pod Ready legyen.

Return Type
Void !
Example
dagger -m github.com/BRicsi02/dagger-demo@d0b5743e27fba2880e299e12ee01ef18b269a95d call \
 wait-ready
func (m *MyModule) Example(ctx context.Context)   {
	return dag.
			DaggerDemo().
			WaitReady(ctx)
}
@function
async def example() -> None:
	return await (
		dag.dagger_demo()
		.wait_ready()
	)
@func()
async example(): Promise<void> {
	return dag
		.daggerDemo()
		.waitReady()
}