bucketuploader
No long description provided.
Installation
dagger install github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78Entrypoint
Return Type
Bucketuploader !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| endpoint | Secret ! | - | Bucket endpoint URL |
| bucket | Secret ! | - | Bucket name |
| accessKeyId | Secret ! | - | Bucket access key ID |
| secretAccessKey | Secret ! | - | Bucket secret access key |
Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
--endpoint env:MYSECRET --bucket env:MYSECRET --access-key-id env:MYSECRET --secret-access-key env:MYSECRETfunc (m *MyModule) Example(endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret) *dagger.Bucketuploader {
return dag.
Bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey)
}@function
def example(endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret) -> dagger.Bucketuploader:
return (
dag.bucketuploader(endpoint, bucket, access_key_id, secret_access_key)
)@func()
example(endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret): Bucketuploader {
return dag
.bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey)
}Types
Bucketuploader 🔗
Bucketuploader provides bucket upload artifact capabilities. It expects an S3-compatible bucket via the AWS CLI.
uploadTree() 🔗
UploadTree uploads a directory to the bucket under an explicit prefix, preserving the directory’s internal structure as the key suffix.
Unlike UploadLatest or UploadNightly, which use fixed prefix conventions, UploadTree allows the caller to specify any prefix: useful for one off releases, OCI registry layouts, or nested directory structures with specifc key paths.
When metadata is supplied, matching files (by relative path) are uploaded individually with the specified Content-Type and/or checksum headers.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| artifacts | Directory ! | - | Directory to upload — internal structure becomes the key suffix |
| prefix | String | - | Bucket key prefix. Use "" to upload at the bucket root. |
| metadata | [FilePathMetadata ! ] | - | Per-file upload metadata (Content-Type, checksum, etc.). Each entry's Path field should match a relative path inside the artifacts directory. |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret, artifacts *dagger.Directory) {
return dag.
Bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey).
UploadTree(ctx, artifacts)
}@function
async def example(endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret, artifacts: dagger.Directory) -> None:
return await (
dag.bucketuploader(endpoint, bucket, access_key_id, secret_access_key)
.upload_tree(artifacts)
)@func()
async example(endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret, artifacts: Directory): Promise<void> {
return dag
.bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey)
.uploadTree(artifacts)
}uploadLatest() 🔗
UploadLatest uploads artifacts under both the given version prefix and a “latest” prefix, so that the most recent release is always accessible at a well-known path.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| artifacts | Directory ! | - | Directory containing build artifacts to upload |
| version | String ! | - | Version string used as the bucket path prefix (e.g., "v1.2.3") |
| metadata | [FilePathMetadata ! ] | - | Per-file upload metadata (Content-Type, checksum, etc.). Each entry's Path field should match a relative path inside the artifacts directory. |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret, artifacts *dagger.Directory, version string) {
return dag.
Bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey).
UploadLatest(ctx, artifacts, version)
}@function
async def example(endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret, artifacts: dagger.Directory, version: str) -> None:
return await (
dag.bucketuploader(endpoint, bucket, access_key_id, secret_access_key)
.upload_latest(artifacts, version)
)@func()
async example(endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret, artifacts: Directory, version: string): Promise<void> {
return dag
.bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey)
.uploadLatest(artifacts, version)
}uploadNightly() 🔗
UploadNightly uploads artifacts under the “nightly” prefix.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| artifacts | Directory ! | - | Directory containing build artifacts to upload |
| metadata | [FilePathMetadata ! ] | - | Per-file upload metadata (Content-Type, checksum, etc.). Each entry's Path field should match a relative path inside the artifacts directory. |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret, artifacts *dagger.Directory) {
return dag.
Bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey).
UploadNightly(ctx, artifacts)
}@function
async def example(endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret, artifacts: dagger.Directory) -> None:
return await (
dag.bucketuploader(endpoint, bucket, access_key_id, secret_access_key)
.upload_nightly(artifacts)
)@func()
async example(endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret, artifacts: Directory): Promise<void> {
return dag
.bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey)
.uploadNightly(artifacts)
}uploadFile() 🔗
UploadFile uploads a single file to the bucket under an optional path prefix. This is useful for standalone files like install scripts.
When metadata is provided, the file is uploaded with the specified Content-Type and/or checksum headers.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | The file to upload |
| prefix | String | - | Bucket path prefix (e.g., "scripts"). When empty the file is placed at the bucket root. |
| metadata | FileMetadata | - | Upload metadata for this file (Content-Type, checksum, etc.). |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret, file *dagger.File) {
return dag.
Bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey).
UploadFile(ctx, file)
}@function
async def example(endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret, file: dagger.File) -> None:
return await (
dag.bucketuploader(endpoint, bucket, access_key_id, secret_access_key)
.upload_file(file)
)@func()
async example(endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret, file: File): Promise<void> {
return dag
.bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey)
.uploadFile(file)
}newFileMetadata() 🔗
NewFileMetadata returns a new empty NewFileMetadata instance. Use the With* methods to set individual fields:
meta := uploader.NewFileMetadata().
WithContentType("application/gzip").
WithChecksumSHA256("base64hash...")
Return Type
FileMetadata ! Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
--endpoint env:MYSECRET --bucket env:MYSECRET --access-key-id env:MYSECRET --secret-access-key env:MYSECRET new-file-metadatafunc (m *MyModule) Example(endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret) *dagger.BucketuploaderFileMetadata {
return dag.
Bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey).
NewFileMetadata()
}@function
def example(endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret) -> dagger.BucketuploaderFileMetadata:
return (
dag.bucketuploader(endpoint, bucket, access_key_id, secret_access_key)
.new_file_metadata()
)@func()
example(endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret): BucketuploaderFileMetadata {
return dag
.bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey)
.newFileMetadata()
}newFilePathMetadata() 🔗
NewFilePathMetadata returns a new NewFilePathMetadata for the given relative path. Use the With* methods to set individual fields:
pm := uploader.NewFilePathMetadata("bin/my-binary").
WithContentType("application/gzip").
WithChecksumSHA256("base64hash...")
Return Type
FilePathMetadata !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| filePath | String ! | - | Relative path of the file inside the artifacts directory |
Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
--endpoint env:MYSECRET --bucket env:MYSECRET --access-key-id env:MYSECRET --secret-access-key env:MYSECRET new-file-path-metadata --file-path stringfunc (m *MyModule) Example(endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret, filePath string) *dagger.BucketuploaderFilePathMetadata {
return dag.
Bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey).
NewFilePathMetadata(filePath)
}@function
def example(endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret, file_path: str) -> dagger.BucketuploaderFilePathMetadata:
return (
dag.bucketuploader(endpoint, bucket, access_key_id, secret_access_key)
.new_file_path_metadata(file_path)
)@func()
example(endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret, filePath: string): BucketuploaderFilePathMetadata {
return dag
.bucketuploader(endpoint, bucket, accessKeyId, secretAccessKey)
.newFilePathMetadata(filePath)
}FileMetadata 🔗
FileMetadata holds optional upload headers for a file.
checksumSha256() 🔗
Base64-encoded SHA-256 checksum of the file contents. When set, the x-amz-checksum-sha256 header is sent with the upload.
Return Type
String ! Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-metadata \
checksum-sha-2-5-6func (m *MyModule) Example(ctx context.Context) string {
return dag.
Bucketuploader().
NewFileMetadata().
ChecksumSha256(ctx)
}@function
async def example() -> str:
return await (
dag.bucketuploader()
.new_file_metadata()
.checksum_sha256()
)@func()
async example(): Promise<string> {
return dag
.bucketuploader()
.newFileMetadata()
.checksumSha256()
}contentType() 🔗
MIME content type for the file (e.g., “application/octet-stream”). When set, the Content-Type header is sent with the upload.
Return Type
String ! Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-metadata \
content-typefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Bucketuploader().
NewFileMetadata().
ContentType(ctx)
}@function
async def example() -> str:
return await (
dag.bucketuploader()
.new_file_metadata()
.content_type()
)@func()
async example(): Promise<string> {
return dag
.bucketuploader()
.newFileMetadata()
.contentType()
}withChecksumSha256() 🔗
WithChecksumSHA256 sets the base64-encoded SHA-256 checksum that will be sent as the x-amz-checksum-sha256 header during upload.
Return Type
FileMetadata !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| checksum | String ! | - | Base64-encoded SHA-256 checksum |
Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-metadata \
with-checksum-sha-2-5-6 --checksum stringfunc (m *MyModule) Example(checksum string) *dagger.BucketuploaderFileMetadata {
return dag.
Bucketuploader().
NewFileMetadata().
WithChecksumSha256(checksum)
}@function
def example(checksum: str) -> dagger.BucketuploaderFileMetadata:
return (
dag.bucketuploader()
.new_file_metadata()
.with_checksum_sha256(checksum)
)@func()
example(checksum: string): BucketuploaderFileMetadata {
return dag
.bucketuploader()
.newFileMetadata()
.withChecksumSha256(checksum)
}withContentType() 🔗
WithContentType sets the MIME content type that will be sent as the Content-Type header during upload.
Return Type
FileMetadata !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| contentType | String ! | - | MIME content type (e.g., "application/octet-stream") |
Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-metadata \
with-content-type --content-type stringfunc (m *MyModule) Example(contentType string) *dagger.BucketuploaderFileMetadata {
return dag.
Bucketuploader().
NewFileMetadata().
WithContentType(contentType)
}@function
def example(content_type: str) -> dagger.BucketuploaderFileMetadata:
return (
dag.bucketuploader()
.new_file_metadata()
.with_content_type(content_type)
)@func()
example(contentType: string): BucketuploaderFileMetadata {
return dag
.bucketuploader()
.newFileMetadata()
.withContentType(contentType)
}FilePathMetadata 🔗
FilePathMetadata pairs a relative file path with upload metadata. Used by directory-based upload methods to apply per-file headers.
path() 🔗
Relative path of the file inside the artifacts directory (e.g., “bin/my-binary”).
Return Type
String ! Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-path-metadata --file-path string \
pathfunc (m *MyModule) Example(ctx context.Context, filePath string) string {
return dag.
Bucketuploader().
NewFilePathMetadata(filePath).
Path(ctx)
}@function
async def example(file_path: str) -> str:
return await (
dag.bucketuploader()
.new_file_path_metadata(file_path)
.path()
)@func()
async example(filePath: string): Promise<string> {
return dag
.bucketuploader()
.newFilePathMetadata(filePath)
.path()
}checksumSha256() 🔗
Base64-encoded SHA-256 checksum of the file contents. When set, the x-amz-checksum-sha256 header is sent with the upload.
Return Type
String ! Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-path-metadata --file-path string \
checksum-sha-2-5-6func (m *MyModule) Example(ctx context.Context, filePath string) string {
return dag.
Bucketuploader().
NewFilePathMetadata(filePath).
ChecksumSha256(ctx)
}@function
async def example(file_path: str) -> str:
return await (
dag.bucketuploader()
.new_file_path_metadata(file_path)
.checksum_sha256()
)@func()
async example(filePath: string): Promise<string> {
return dag
.bucketuploader()
.newFilePathMetadata(filePath)
.checksumSha256()
}contentType() 🔗
MIME content type for the file (e.g., “application/octet-stream”). When set, the Content-Type header is sent with the upload.
Return Type
String ! Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-path-metadata --file-path string \
content-typefunc (m *MyModule) Example(ctx context.Context, filePath string) string {
return dag.
Bucketuploader().
NewFilePathMetadata(filePath).
ContentType(ctx)
}@function
async def example(file_path: str) -> str:
return await (
dag.bucketuploader()
.new_file_path_metadata(file_path)
.content_type()
)@func()
async example(filePath: string): Promise<string> {
return dag
.bucketuploader()
.newFilePathMetadata(filePath)
.contentType()
}withChecksumSha256() 🔗
WithChecksumSHA256 sets the base64-encoded SHA-256 checksum that will be sent as the x-amz-checksum-sha256 header during upload.
Return Type
FilePathMetadata !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| checksum | String ! | - | Base64-encoded SHA-256 checksum |
Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-path-metadata --file-path string \
with-checksum-sha-2-5-6 --checksum stringfunc (m *MyModule) Example(filePath string, checksum string) *dagger.BucketuploaderFilePathMetadata {
return dag.
Bucketuploader().
NewFilePathMetadata(filePath).
WithChecksumSha256(checksum)
}@function
def example(file_path: str, checksum: str) -> dagger.BucketuploaderFilePathMetadata:
return (
dag.bucketuploader()
.new_file_path_metadata(file_path)
.with_checksum_sha256(checksum)
)@func()
example(filePath: string, checksum: string): BucketuploaderFilePathMetadata {
return dag
.bucketuploader()
.newFilePathMetadata(filePath)
.withChecksumSha256(checksum)
}withContentType() 🔗
WithContentType sets the MIME content type that will be sent as the Content-Type header during upload.
Return Type
FilePathMetadata !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| contentType | String ! | - | MIME content type (e.g., "application/octet-stream") |
Example
dagger -m github.com/papercomputeco/daggerverse/bucketupload@bc9900cae1ca7b7d7577e3dfe0a453aba815fe78 call \
new-file-path-metadata --file-path string \
with-content-type --content-type stringfunc (m *MyModule) Example(filePath string, contentType string) *dagger.BucketuploaderFilePathMetadata {
return dag.
Bucketuploader().
NewFilePathMetadata(filePath).
WithContentType(contentType)
}@function
def example(file_path: str, content_type: str) -> dagger.BucketuploaderFilePathMetadata:
return (
dag.bucketuploader()
.new_file_path_metadata(file_path)
.with_content_type(content_type)
)@func()
example(filePath: string, contentType: string): BucketuploaderFilePathMetadata {
return dag
.bucketuploader()
.newFilePathMetadata(filePath)
.withContentType(contentType)
}