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@0d98fadb3264c4ea93064a1d30de153681e3a345
Entrypoint
Return Type
Common
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 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 🔗
dhall() 🔗
Return Type
Container !
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 call \
dhall
func (m *myModule) example() *Container {
return dag.
Common().
Dhall()
}
@function
def example() -> dagger.Container:
return (
dag.common()
.dhall()
)
@func()
example(): Container {
return dag
.common()
.dhall()
}
compileDhall() 🔗
CompileDhall returns the results of dhall-to-yaml
called on all *.dhall
files in “source”, with the common dhall helpers mounted on ./lib
.
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 call \
compile-dhall --source DIR_PATH
func (m *myModule) example(source *Directory) *Directory {
return dag.
Common().
CompileDhall(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.common()
.compile_dhall(source)
)
@func()
example(source: Directory): Directory {
return dag
.common()
.compileDhall(source)
}
actions() 🔗
Return Type
Directory !
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 call \
actions
func (m *myModule) example() *Directory {
return dag.
Common().
Actions()
}
@function
def example() -> dagger.Directory:
return (
dag.common()
.actions()
)
@func()
example(): Directory {
return dag
.common()
.actions()
}
embeddedWorkflows() 🔗
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
mod | Directory ! | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 call \
embedded-workflows --mod DIR_PATH
func (m *myModule) example(mod *Directory) *Directory {
return dag.
Common().
EmbeddedWorkflows(mod)
}
@function
def example(mod: dagger.Directory) -> dagger.Directory:
return (
dag.common()
.embedded_workflows(mod)
)
@func()
example(mod: Directory): Directory {
return dag
.common()
.embeddedWorkflows(mod)
}
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@0d98fadb3264c4ea93064a1d30de153681e3a345 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()
}
goVersions() 🔗
Return Type
File !
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 call \
go-versions
func (m *myModule) example() *File {
return dag.
Common().
GoVersions()
}
@function
def example() -> dagger.File:
return (
dag.common()
.go_versions()
)
@func()
example(): File {
return dag
.common()
.goVersions()
}
untar() 🔗
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tarball | File ! | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 call \
untar --tarball file:path
func (m *myModule) example(tarball *File) *Directory {
return dag.
Common().
Untar(tarball)
}
@function
def example(tarball: dagger.File) -> dagger.Directory:
return (
dag.common()
.untar(tarball)
)
@func()
example(tarball: File): Directory {
return dag
.common()
.untar(tarball)
}
ubi() 🔗
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String | - | No description provided |
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 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()
}
builder() 🔗
The base image for use with claircore.
Return Type
Container !
Example
dagger -m github.com/quay/clair-workflows/common@0d98fadb3264c4ea93064a1d30de153681e3a345 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@0d98fadb3264c4ea93064a1d30de153681e3a345 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@0d98fadb3264c4ea93064a1d30de153681e3a345 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@0d98fadb3264c4ea93064a1d30de153681e3a345 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@0d98fadb3264c4ea93064a1d30de153681e3a345 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)
}