packer
No long description provided.
Installation
dagger install github.com/stuttgart-things/dagger/packer@v0.10.0
Entrypoint
Return Type
Packer
Example
dagger -m github.com/stuttgart-things/dagger/packer@40431af7005b8f4b0566959c7dd915eff6a61d55 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@40431af7005b8f4b0566959c7dd915eff6a61d55 call \
base-image
func (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@40431af7005b8f4b0566959c7dd915eff6a61d55 call \
build --build-path string
func (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@40431af7005b8f4b0566959c7dd915eff6a61d55 call \
clone-private-repo --repo-url string --branch string --token env:MYSECRET
func (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)
}