Skip to content

dagger/sdk-sdk

Repository files navigation

sdk-sdk

Shared contract checks for official SDK helper modules.

Start a new Dang SDK helper module:

dagger call sdk-sdk init --name my-sdk

--name is the Dagger module name. The generated Dang root type is derived from it, for example my-sdk becomes MySdk.

Run it from an SDK helper module workspace:

cd ./my/sdk/repo
dagger -m github.com/dagger/sdk-sdk check

The checks receive the current Workspace, find that workspace's dagger.json, serve the SDK helper module from the workspace, inspect the public GraphQL schema users see from the CLI, then exercise a small set of user-facing behaviors without applying returned changesets.

The first coverage is intentionally small:

  • init(ws, name, path, template, ignoreGenerated): Changeset!
  • mod(ws, path, findUp): Mod!
  • Mod.path
  • Mod.dependencies.add(source, name): Changeset!
  • Mod.engine.required
  • Mod.engine.require(version): Changeset!

The Go SDK currently exposes Mod.deps; the contract accepts that alias while the shared API is being introduced.

Changeset paths are treated as module-relative. For example, init is expected to report .dagger/modules/<name>/dagger.json, and dependency updates are expected to report dagger.json.

About

Develop your own custom SDK for Dagger. For expert Dagger developers only!

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages