melange
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/opopops/daggerverse/melange@v1.9.4Entrypoint
Return Type
Melange !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| image | String | "cgr.dev/chainguard/wolfi-base:latest" | wolfi-base image |
| version | String | "0.26.13" | Melange version |
| user | String | "65532" | Image user |
Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
func (m *MyModule) Example() *dagger.Melange {
return dag.
Melange()
}@function
def example() -> dagger.Melange:
return (
dag.melange()
)@func()
example(): Melange {
return dag
.melange()
}Types
SigningKey 🔗
Signing Key
name() 🔗
Return Type
String Example
Function MelangeSigningKey.name is not accessible from the melange moduleFunction MelangeSigningKey.name is not accessible from the melange moduleFunction MelangeSigningKey.name is not accessible from the melange moduleFunction MelangeSigningKey.name is not accessible from the melange moduleprivate() 🔗
Return Type
Secret Example
Function MelangeSigningKey.private is not accessible from the melange moduleFunction MelangeSigningKey.private is not accessible from the melange moduleFunction MelangeSigningKey.private is not accessible from the melange moduleFunction MelangeSigningKey.private is not accessible from the melange modulegenerate() 🔗
Generate a key pair for package signing
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String | "melange.rsa" | Key name |
| size | Integer | 4096 | the size of the prime to calculate |
Example
Function MelangeSigningKey.generate is not accessible from the melange moduleFunction MelangeSigningKey.generate is not accessible from the melange moduleFunction MelangeSigningKey.generate is not accessible from the melange moduleFunction MelangeSigningKey.generate is not accessible from the melange modulepublic() 🔗
Return the public key
Return Type
File ! Example
Function MelangeSigningKey.public is not accessible from the melange moduleFunction MelangeSigningKey.public is not accessible from the melange moduleFunction MelangeSigningKey.public is not accessible from the melange moduleFunction MelangeSigningKey.public is not accessible from the melange modulewithGenerate() 🔗
Generate a key pair for package signing for chaining (for testing purpose)
Return Type
SigningKey !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String | "melange.rsa" | Key name |
| size | Integer | 4096 | the size of the prime to calculate |
Example
Function MelangeSigningKey.withGenerate is not accessible from the melange moduleFunction MelangeSigningKey.withGenerate is not accessible from the melange moduleFunction MelangeSigningKey.withGenerate is not accessible from the melange moduleFunction MelangeSigningKey.withGenerate is not accessible from the melange moduleMelange 🔗
Melange
build() 🔗
Build a package from a YAML configuration file
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| config | File ! | - | Config file |
| version | String | "" | Version to bump to |
| sourceDir | Directory | null | Directory used for included sources |
| signingKey | Secret | null | Key to use for signing |
| arch | [Scalar ! ] | [] | Target architectures |
Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
build --config file:pathfunc (m *MyModule) Example(config *dagger.File) *dagger.Directory {
return dag.
Melange().
Build(config)
}@function
def example(config: dagger.File) -> dagger.Directory:
return (
dag.melange()
.build(config)
)@func()
example(config: File): Directory {
return dag
.melange()
.build(config)
}bump() 🔗
Update a Melange YAML file to reflect a new package version
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| config | File ! | - | Config file |
| version | String ! | - | Version to bump to |
Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
bump --config file:path --version stringfunc (m *MyModule) Example(config *dagger.File, version string) *dagger.File {
return dag.
Melange().
Bump(config, version)
}@function
def example(config: dagger.File, version: str) -> dagger.File:
return (
dag.melange()
.bump(config, version)
)@func()
example(config: File, version: string): File {
return dag
.melange()
.bump(config, version)
}container() 🔗
Returns melange container
Return Type
Container ! Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Melange().
Container()
}@function
def example() -> dagger.Container:
return (
dag.melange()
.container()
)@func()
example(): Container {
return dag
.melange()
.container()
}hasSigningKey() 🔗
Check if signing key is present
Return Type
Boolean ! Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
has-signing-keyfunc (m *MyModule) Example(ctx context.Context) bool {
return dag.
Melange().
HasSigningKey(ctx)
}@function
async def example() -> bool:
return await (
dag.melange()
.has_signing_key()
)@func()
async example(): Promise<boolean> {
return dag
.melange()
.hasSigningKey()
}keygen() 🔗
Generate a key pair for package signing
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String | "melange.rsa" | Key name |
| keySize | Integer | 4096 | the size of the prime to calculate |
Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
keygenfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Melange().
Keygen()
}@function
def example() -> dagger.Directory:
return (
dag.melange()
.keygen()
)@func()
example(): Directory {
return dag
.melange()
.keygen()
}publicKey() 🔗
Returns the public key
Return Type
File ! Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
public-keyfunc (m *MyModule) Example() *dagger.File {
return dag.
Melange().
PublicKey()
}@function
def example() -> dagger.File:
return (
dag.melange()
.public_key()
)@func()
example(): File {
return dag
.melange()
.publicKey()
}withBuild() 🔗
Build a package from a YAML configuration file (for chaining)
Return Type
Melange !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| config | File ! | - | Config file |
| version | String | "" | Version to bump to |
| signingKey | Secret | null | Key to use for signing |
| arch | [Scalar ! ] | [] | Target architectures |
Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
with-build --config file:pathfunc (m *MyModule) Example(config *dagger.File) *dagger.Melange {
return dag.
Melange().
WithBuild(config)
}@function
def example(config: dagger.File) -> dagger.Melange:
return (
dag.melange()
.with_build(config)
)@func()
example(config: File): Melange {
return dag
.melange()
.withBuild(config)
}withKeygen() 🔗
Generate a key for package signing (for chaining)
Return Type
Melange !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String | "melange.rsa" | Key name |
| keySize | Integer | 4096 | the size of the prime to calculate |
Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
with-keygenfunc (m *MyModule) Example() *dagger.Melange {
return dag.
Melange().
WithKeygen()
}@function
def example() -> dagger.Melange:
return (
dag.melange()
.with_keygen()
)@func()
example(): Melange {
return dag
.melange()
.withKeygen()
}withSigningKey() 🔗
Include the specified signing key (for chaining)
Return Type
Melange !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| key | Secret ! | - | Key to use for signing |
| name | String | "melange.rsa" | Key name |
Example
dagger -m github.com/opopops/daggerverse/melange@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
with-signing-key --key env:MYSECRETfunc (m *MyModule) Example(key *dagger.Secret) *dagger.Melange {
return dag.
Melange().
WithSigningKey(key)
}@function
def example(key: dagger.Secret) -> dagger.Melange:
return (
dag.melange()
.with_signing_key(key)
)@func()
example(key: Secret): Melange {
return dag
.melange()
.withSigningKey(key)
}