tapes
Package main provides reproducible builds and tests locally and in GitHub actions.It is the main harness for handling nearly all dev operations.
Installation
dagger install github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7Entrypoint
Return Type
Tapes !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Project source directory. |
Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
func (m *MyModule) Example() *dagger.Tapes {
return dag.
Tapes()
}@function
def example() -> dagger.Tapes:
return (
dag.tapes()
)@func()
example(): Tapes {
return dag
.tapes()
}Types
Tapes 🔗
Tapes is the main module for the Tapes CI/CD pipeline
build() 🔗
Build and return directory of go binaries for all platforms. Linux targets are cross-compiled using Zig as the C toolchain. Darwin targets are cross-compiled using osxcross (macOS SDK
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ldflags | String | "-s -w" | Linker flags for go build |
Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
buildfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Tapes().
Build()
}@function
def example() -> dagger.Directory:
return (
dag.tapes()
.build()
)@func()
example(): Directory {
return dag
.tapes()
.build()
}buildRelease() 🔗
BuildRelease compiles versioned release binaries with embedded version info
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | Version string of build |
| commit | String ! | - | Git commit SHA of build |
Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
build-release --version string --commit stringfunc (m *MyModule) Example(version string, commit string) *dagger.Directory {
return dag.
Tapes().
BuildRelease(version, commit)
}@function
def example(version: str, commit: str) -> dagger.Directory:
return (
dag.tapes()
.build_release(version, commit)
)@func()
example(version: string, commit: string): Directory {
return dag
.tapes()
.buildRelease(version, commit)
}checkGenerate() 🔗
CheckGenerate verifies that generated code (e.g. ent) is up to date by running go generate and diffing the result against the committed files.
Return Type
String ! Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
check-generatefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Tapes().
CheckGenerate(ctx)
}@function
async def example() -> str:
return await (
dag.tapes()
.check_generate()
)@func()
async example(): Promise<string> {
return dag
.tapes()
.checkGenerate()
}checkGoModTidy() 🔗
CheckGoModTidy runs “go mod tidy” and fails if it produces any changes to go.mod or go.sum, indicating that the caller forgot to tidy before committing.
Return Type
String ! Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
check-go-mod-tidyfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Tapes().
CheckGoModTidy(ctx)
}@function
async def example() -> str:
return await (
dag.tapes()
.check_go_mod_tidy()
)@func()
async example(): Promise<string> {
return dag
.tapes()
.checkGoModTidy()
}checkLint() 🔗
CheckLint runs golangci-lint against the tapes source code without applying fixes.
Return Type
String ! Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
check-lintfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Tapes().
CheckLint(ctx)
}@function
async def example() -> str:
return await (
dag.tapes()
.check_lint()
)@func()
async example(): Promise<string> {
return dag
.tapes()
.checkLint()
}e2Etest() 🔗
E2etest runs end-to-end tests against Postgres and Ollama services.
It stands up a PostgreSQL database and an Ollama LLM service, builds the tapes binary, runs the proxy and API as Dagger services backed by Postgres, and uses hurl to verify the full pipeline.
Return Type
String ! Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
e-2-etestfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Tapes().
E2Etest(ctx)
}@function
async def example() -> str:
return await (
dag.tapes()
.e2_etest()
)@func()
async example(): Promise<string> {
return dag
.tapes()
.e2Etest()
}fixLint() 🔗
FixLint runs golangci-lint against the tapes source code with –fix, applying automatic fixes where possible, and returns the modified source directory.
Return Type
Directory ! Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
fix-lintfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Tapes().
FixLint()
}@function
def example() -> dagger.Directory:
return (
dag.tapes()
.fix_lint()
)@func()
example(): Directory {
return dag
.tapes()
.fixLint()
}nightly() 🔗
Nightly builds and uploads nightly artifacts
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| commit | String ! | - | Git commit SHA |
| 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/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
nightly --commit string --endpoint env:MYSECRET --bucket env:MYSECRET --access-key-id env:MYSECRET --secret-access-key env:MYSECRETfunc (m *MyModule) Example(commit string, endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret) *dagger.Directory {
return dag.
Tapes().
Nightly(commit, endpoint, bucket, accessKeyId, secretAccessKey)
}@function
def example(commit: str, endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret) -> dagger.Directory:
return (
dag.tapes()
.nightly(commit, endpoint, bucket, access_key_id, secret_access_key)
)@func()
example(commit: string, endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret): Directory {
return dag
.tapes()
.nightly(commit, endpoint, bucket, accessKeyId, secretAccessKey)
}releaseLatest() 🔗
Release builds release binaries and uploads to bucket
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | Version string (e.g., "v1.0.0") |
| commit | String ! | - | Git commit SHA |
| 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/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
release-latest --version string --commit string --endpoint env:MYSECRET --bucket env:MYSECRET --access-key-id env:MYSECRET --secret-access-key env:MYSECRETfunc (m *MyModule) Example(version string, commit string, endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret) *dagger.Directory {
return dag.
Tapes().
ReleaseLatest(version, commit, endpoint, bucket, accessKeyId, secretAccessKey)
}@function
def example(version: str, commit: str, endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret) -> dagger.Directory:
return (
dag.tapes()
.release_latest(version, commit, endpoint, bucket, access_key_id, secret_access_key)
)@func()
example(version: string, commit: string, endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret): Directory {
return dag
.tapes()
.releaseLatest(version, commit, endpoint, bucket, accessKeyId, secretAccessKey)
}test() 🔗
Test runs the tapes unit tests via “go test”
Return Type
String ! Example
dagger -m github.com/papercomputeco/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
testfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Tapes().
Test(ctx)
}@function
async def example() -> str:
return await (
dag.tapes()
.test()
)@func()
async example(): Promise<string> {
return dag
.tapes()
.test()
}uploadInstallSh() 🔗
UploadInstallSh uploads the install.sh script to the artifacts bucket
Return Type
Void !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/tapes@94322bfdc7fae242ce8ee014521677e2e2785cb7 call \
upload-install-sh --endpoint env:MYSECRET --bucket env:MYSECRET --access-key-id env:MYSECRET --secret-access-key env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, endpoint *dagger.Secret, bucket *dagger.Secret, accessKeyId *dagger.Secret, secretAccessKey *dagger.Secret) {
return dag.
Tapes().
UploadInstallSh(ctx, endpoint, bucket, accessKeyId, secretAccessKey)
}@function
async def example(endpoint: dagger.Secret, bucket: dagger.Secret, access_key_id: dagger.Secret, secret_access_key: dagger.Secret) -> None:
return await (
dag.tapes()
.upload_install_sh(endpoint, bucket, access_key_id, secret_access_key)
)@func()
async example(endpoint: Secret, bucket: Secret, accessKeyId: Secret, secretAccessKey: Secret): Promise<void> {
return dag
.tapes()
.uploadInstallSh(endpoint, bucket, accessKeyId, secretAccessKey)
}