common
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/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4
Entrypoint
Return Type
Common
Example
dagger -m github.com/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4 call \
func (m *myModule) example() *Common {
return dag.
Common()
}
@function
def example() -> dag.Common:
return (
dag.common()
)
@func()
example(): Common {
return dag
.common()
}
Types
Common 🔗
builder() 🔗
The base image for use with claircore.
Return Type
Container !
Example
dagger -m github.com/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4 call \
builder
func (m *myModule) example() *Container {
return dag.
Common().
Builder()
}
@function
def example() -> dagger.Container:
return (
dag.common()
.builder()
)
@func()
example(): Container {
return dag
.common()
.builder()
}
buildEnv() 🔗
Create an environment suitable for building the indicated source.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
cgo | Boolean | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4 call \
build-env --source DIR_PATH
func (m *myModule) example(source *Directory) *Container {
return dag.
Common().
BuildEnv(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.common()
.build_env(source)
)
@func()
example(source: Directory): Container {
return dag
.common()
.buildEnv(source)
}
releaseEnv() 🔗
Create an environment suitable for building the indicated source for release.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4 call \
release-env --source DIR_PATH
func (m *myModule) example(source *Directory) *Container {
return dag.
Common().
ReleaseEnv(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.common()
.release_env(source)
)
@func()
example(source: Directory): Container {
return dag
.common()
.releaseEnv(source)
}
testEnv() 🔗
Create an environment suitable for testing the indicated source.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
race | Boolean | - | No description provided |
database | Service | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4 call \
test-env --source DIR_PATH
func (m *myModule) example(source *Directory) *Container {
return dag.
Common().
TestEnv(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.common()
.test_env(source)
)
@func()
example(source: Directory): Container {
return dag
.common()
.testEnv(source)
}
test() 🔗
Return the result of running tests on the indicated source.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
race | Boolean | - | No description provided |
cover | Boolean | - | No description provided |
unit | Boolean | - | No description provided |
database | Service | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4 call \
test --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
Common().
Test(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.common()
.test(source)
)
@func()
async example(source: Directory): Promise<string> {
return dag
.common()
.test(source)
}
goDistribution() 🔗
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String | - | No description provided |
arch | String | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4 call \
go-distribution
func (m *myModule) example() *Directory {
return dag.
Common().
GoDistribution()
}
@function
def example() -> dagger.Directory:
return (
dag.common()
.go_distribution()
)
@func()
example(): Directory {
return dag
.common()
.goDistribution()
}
ubi() 🔗
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@fb169e08b7054b48032eae63a6ecea57a5e7d7f4 call \
ubi
func (m *myModule) example() *Container {
return dag.
Common().
Ubi()
}
@function
def example() -> dagger.Container:
return (
dag.common()
.ubi()
)
@func()
example(): Container {
return dag
.common()
.ubi()
}