What Artifact Stores Does Dewy Support? A Complete Guide to Pluggable Storage Backends
Dewy supports four artifact stores: Amazon S3 (and S3-compatible services), Docker/OCI registries, Google Cloud Storage (GCS), and GitHub Releases, all implementing a common Store interface defined in artifact/artifact.go.
The linyows/dewy project provides a pluggable artifact-storage layer that abstracts upload and download operations behind a unified interface. This architecture enables build pipelines to store artifacts in diverse backends without modifying core deployment logic. Understanding what artifact stores Dewy supports is essential for configuring continuous delivery workflows that match your infrastructure requirements.
Supported Artifact Stores in Dewy
Dewy ships with four concrete storage implementations, each contained in its own file within the artifact/ directory. When Dewy executes a build pipeline, the desired store is selected via the configuration file (config.go), and the appropriate implementation is instantiated at runtime.
Amazon S3
The S3 store uploads artifacts to Amazon S3 or any S3-compatible service such as MinIO or Wasabi. This implementation resides in [artifact/s3.go](https://github.com/linyows/dewy/blob/main/artifact/s3.go) and accepts configuration parameters including bucket name, region, and AWS credentials.
Docker and OCI Registries
The OCI store pushes artifacts as OCI images to Docker-compatible registries including Docker Hub, GitHub Container Registry (GHCR), and Harbor. Implemented in [artifact/oci.go](https://github.com/linyows/dewy/blob/main/artifact/oci.go), this store treats build artifacts as container image layers, enabling distribution through existing registry infrastructure.
Google Cloud Storage (GCS)
The GCS store stores artifacts in Google Cloud Storage buckets. Located in [artifact/gs.go](https://github.com/linyows/dewy/blob/main/artifact/gs.go), this implementation integrates with GCP's authentication mechanisms and bucket policies.
GitHub Releases
The GitHub Releases store publishes artifacts as assets attached to GitHub releases. Found in [artifact/ghr.go](https://github.com/linyows/dewy/blob/main/artifact/ghr.go), this store is ideal for open-source projects that distribute binaries alongside source code releases.
The Store Interface Architecture
All artifact stores implement the same Store interface defined in [artifact/artifact.go](https://github.com/linyows/dewy/blob/main/artifact/artifact.go). This interface standardizes interactions across storage backends by requiring three core methods:
Upload– Transfers artifact data from the build environment to the storage backendDownload– Retrieves artifacts for deployment or caching purposesDelete– Removes specific artifacts when they are no longer needed
This abstraction allows Dewy to switch between S3, OCI, GCS, and GitHub Releases without changing the underlying build pipeline logic.
Configuring Artifact Stores
Store selection and instantiation occur at runtime through the configuration system defined in config.go. Each store constructor accepts a configuration struct specific to its authentication and endpoint requirements:
- S3:
S3ConfigwithBucket,Region,AccessID, andSecret - OCI:
OCIConfigwithRegistry,Repository,Username, andPassword - GCS: Uses Google Application Default Credentials with bucket configuration
- GitHub Releases:
GHRConfigwithOwner,Repo,ReleaseTag, andToken
Practical Implementation Examples
The following examples demonstrate how to instantiate and use each artifact store programmatically:
Uploading to Amazon S3
store, err := artifact.NewS3Store(artifact.S3Config{
Bucket: "my-artifacts",
Region: "us-east-1",
AccessID: "AKIA…",
Secret: "••••••",
})
if err != nil { log.Fatal(err) }
err = store.Upload(ctx, "build.tar.gz", bytes.NewReader(data))
Publishing to GitHub Releases
store, err := artifact.NewGHRStore(artifact.GHRConfig{
Owner: "linyows",
Repo: "my-project",
ReleaseTag: "v1.2.3",
Token: os.Getenv("GITHUB_TOKEN"),
})
if err != nil { log.Fatal(err) }
err = store.Upload(ctx, "binary.zip", bytes.NewReader(binData))
Pushing to an OCI Registry
store, err := artifact.NewOCIStore(artifact.OCIConfig{
Registry: "ghcr.io",
Repository: "linyows/my-app",
Username: "linyows",
Password: os.Getenv("GHCR_TOKEN"),
})
if err != nil { log.Fatal(err) }
err = store.Upload(ctx, "my-app:latest", imageTarReader)
Summary
- Dewy supports four concrete artifact store implementations: Amazon S3, Docker/OCI registries, Google Cloud Storage, and GitHub Releases.
- All stores implement the
Storeinterface inartifact/artifact.go, providing standardizedUpload,Download, andDeletemethods. - Store selection is configured in
config.goand instantiated at runtime based on your infrastructure requirements. - Each store supports environment-specific authentication patterns, from AWS IAM credentials to GitHub personal access tokens.
Frequently Asked Questions
What is the primary interface for artifact stores in Dewy?
The Store interface defined in artifact/artifact.go serves as the primary contract for all artifact storage implementations. This interface requires three methods—Upload, Download, and Delete—which ensure consistent behavior across S3, OCI, GCS, and GitHub Releases backends.
Can I use S3-compatible alternatives like MinIO or Wasabi with Dewy?
Yes, the S3 store implementation in artifact/s3.go supports any S3-compatible service. Configure the endpoint URL, region, and credentials in S3Config to connect to alternatives such as MinIO, Wasabi, or Ceph Object Gateway instead of Amazon S3 proper.
How does Dewy handle authentication for OCI registries?
The OCI store in artifact/oci.go accepts authentication via the OCIConfig struct, which includes Username and Password fields. For private registries like GHCR or Docker Hub, pass a personal access token or registry password through environment variables into the configuration.
Is it possible to implement a custom artifact store for Dewy?
Yes, you can implement a custom store by creating a new Go file in the artifact/ directory that satisfies the Store interface defined in artifact/artifact.go. After implementing Upload, Download, and Delete methods, register your constructor in config.go to enable runtime selection alongside the built-in S3, OCI, GCS, and GitHub Releases options.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →