packer
No long description provided.
Installation
dagger install github.com/stuttgart-things/dagger/packer@v0.12.0Entrypoint
Return Type
Packer Example
dagger -m github.com/stuttgart-things/dagger/packer@c59fc8d78eed1d717a5cd26a015200e0e19e31e5 call \
func (m *MyModule) Example() *dagger.Packer {
return dag.
Packer()
}@function
def example() -> dagger.Packer:
return (
dag.packer()
)@func()
example(): Packer {
return dag
.packer()
}Types
Packer 🔗
baseImage() 🔗
Base Wolfi image to use
Return Type
String ! Example
dagger -m github.com/stuttgart-things/dagger/packer@c59fc8d78eed1d717a5cd26a015200e0e19e31e5 call \
base-imagefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Packer().
BaseImage(ctx)
}@function
async def example() -> str:
return await (
dag.packer()
.base_image()
)@func()
async example(): Promise<string> {
return dag
.packer()
.baseImage()
}build() 🔗
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| packerVersion | String | "1.12.0" | The Packer version to use |
| arch | String | "linux_amd64" | The Packer arch |
| repoUrl | String | - | No description provided |
| branch | String | "main" | The Branch name |
| initOnly | Boolean | false | If true, only init packer w/out build |
| vaultAddr | String | - | vaultAddr |
| vaultRoleId | String | - | vaultRoleID |
| vaultSecretId | Secret | - | vaultSecretID |
| vaultToken | Secret | - | vaultToken |
| buildPath | String ! | - | No description provided |
| token | Secret | - | injected securely |
| localDir | Directory | - | NEW: optional local directory |
Example
dagger -m github.com/stuttgart-things/dagger/packer@c59fc8d78eed1d717a5cd26a015200e0e19e31e5 call \
build --build-path stringfunc (m *MyModule) Example(ctx context.Context, buildPath string) {
return dag.
Packer().
Build(ctxbuildPath)
}@function
async def example(build_path: str) -> None:
return await (
dag.packer()
.build(build_path)
)@func()
async example(buildPath: string): Promise<void> {
return dag
.packer()
.build(buildPath)
}clonePrivateRepo() 🔗
ClonePrivateRepo clones a private GitHub repo using HTTPS and a personal access token
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repoUrl | String ! | - | e.g. "https://github.com/your-org/your-private-repo.git" |
| branch | String ! | - | e.g. "main" |
| token | Secret ! | - | injected securely |
Example
dagger -m github.com/stuttgart-things/dagger/packer@c59fc8d78eed1d717a5cd26a015200e0e19e31e5 call \
clone-private-repo --repo-url string --branch string --token env:MYSECRETfunc (m *MyModule) Example(repoUrl string, branch string, token *dagger.Secret) *dagger.Directory {
return dag.
Packer().
ClonePrivateRepo(repoUrl, branch, token)
}@function
def example(repo_url: str, branch: str, token: dagger.Secret) -> dagger.Directory:
return (
dag.packer()
.clone_private_repo(repo_url, branch, token)
)@func()
example(repoUrl: string, branch: string, token: Secret): Directory {
return dag
.packer()
.clonePrivateRepo(repoUrl, branch, token)
}