go-ci
The module is written in Go and uses Dagger functions to define the build steps.Installation
dagger install github.com/d3rp3tt3/daggerverse/go-ci@e52f0231c81d5b785253eefd614cee98554933bf
Entrypoint
Return Type
GoCi
Example
dagger -m github.com/d3rp3tt3/daggerverse/go-ci@e52f0231c81d5b785253eefd614cee98554933bf call \
func (m *myModule) example() *GoCi {
return dag.
GoCi()
}
@function
def example() -> dag.GoCi:
return (
dag.go_ci()
)
@func()
example(): GoCi {
return dag
.goCi()
}
Types
GoCi 🔗
serve() 🔗
create a service from the production image
Return Type
Service !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/d3rp3tt3/daggerverse/go-ci@e52f0231c81d5b785253eefd614cee98554933bf call \
serve --source DIR_PATH
func (m *myModule) example(source *Directory) *Service {
return dag.
GoCi().
Serve(source)
}
@function
def example(source: dagger.Directory) -> dagger.Service:
return (
dag.go_ci()
.serve(source)
)
@func()
example(source: Directory): Service {
return dag
.goCi()
.serve(source)
}
publish() 🔗
publish an image
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/d3rp3tt3/daggerverse/go-ci@e52f0231c81d5b785253eefd614cee98554933bf call \
publish --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
GoCi().
Publish(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.go_ci()
.publish(source)
)
@func()
async example(source: Directory): Promise<string> {
return dag
.goCi()
.publish(source)
}
package() 🔗
create a production image
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/d3rp3tt3/daggerverse/go-ci@e52f0231c81d5b785253eefd614cee98554933bf call \
package --source DIR_PATH
func (m *myModule) example(source *Directory) *Container {
return dag.
GoCi().
Package(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.go_ci()
.package(source)
)
@func()
example(source: Directory): Container {
return dag
.goCi()
.package(source)
}
build() 🔗
create a production build
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/d3rp3tt3/daggerverse/go-ci@e52f0231c81d5b785253eefd614cee98554933bf call \
build --source DIR_PATH
func (m *myModule) example(source *Directory) *Directory {
return dag.
GoCi().
Build(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.go_ci()
.build(source)
)
@func()
example(source: Directory): Directory {
return dag
.goCi()
.build(source)
}
test() 🔗
run unit tests
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/d3rp3tt3/daggerverse/go-ci@e52f0231c81d5b785253eefd614cee98554933bf call \
test --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
GoCi().
Test(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.go_ci()
.test(source)
)
@func()
async example(source: Directory): Promise<string> {
return dag
.goCi()
.test(source)
}