Skip to content

Merge dagger.io/dagger/engine into dagger.io/dagger#1579

Merged
shykes merged 1 commit intodagger:mainfrom
shykes:api-cosmetics
Feb 16, 2022
Merged

Merge dagger.io/dagger/engine into dagger.io/dagger#1579
shykes merged 1 commit intodagger:mainfrom
shykes:api-cosmetics

Conversation

@shykes
Copy link
Copy Markdown
Contributor

@shykes shykes commented Feb 9, 2022

Overview

Merge dagger.io/dagger/engine into dagger.io/dagger. The result is a single package known as the Dagger CUE API, version 0.2. It is documented below.

Dagger CUE API (0.2+)

As of Dagger 0.2 (codename Europa), the Dagger CUE API can be imported at dagger.io/dagger.

The Dagger CUE API is the set of CUE packages released alongside the Dagger engine, to allow developers to access its features.

Plan definition

#Plan defines the structure of a Dagger plan - a complete configuration executable by dagger up.

Core types

Dagger extends the CUE type system with the following core types:

  • #FS: a reference to a filesystem tree
  • #Secret: a secure reference to an external secret
  • #Service a reference to a network service endpoints

Core actions

Dagger works by executing actions in a certain order and passing data between actions in a certain layout.

Developers can combine actions into higher-level actions, which in turn can be combined into even higher-level actions,
and so on at arbitrary levels of depth. At the bottom of this abstraction stack are core actions: these
are implemented by Dagger itself, and are always available.

The following core actions are available:

Core action File Description
#Exec exec.cue Execute a command in a docker-compatible container
#HTTPFetch http.cue Download an archive from an HTTP server
#Push image.cue Upload an image to a docker registry
#Pull image.cue Download an image from a docker registry
#Dockerfile image.cue Execute a Dockerfile
#Set image.cue Modify a docker image
#GitPush git.cue Upload a repository to a remote git server
#GitPull git.cue Download a repository from a remote git server
#DecodeSecret secrets.cue Decode a secret without leaking its contents
#NewSecret secrets.cue Dynamically create a new secret
#Source fs.cue Access the source for the current CUE package
#Mkdir fs.cue Create a directory in a filesystem tree
#ReadFile fs.cue Read a file from a tree
#WriteFile fs.cue Write a file to a tree
#Scratch fs.cue Create an empty tree
#Copy fs.cue Copy files between two trees
#Subdir fs.cue Read a subdirectory from a filesystem tree

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 10, 2022

✔️ Deploy Preview for devel-docs-dagger-io ready!

🔨 Explore the source changes: 1f362087762ee88a60bb759a8c1487abab2c3e11

🔍 Inspect the deploy log: https://app.netlify.com/sites/devel-docs-dagger-io/deploys/620c2de20939aa00074a2af4

😎 Browse the preview: https://deploy-preview-1579--devel-docs-dagger-io.netlify.app

@shykes

This comment was marked as resolved.

@shykes

This comment was marked as resolved.

@shykes shykes changed the title API cosmetics For discussion: API cosmetics Feb 10, 2022
Copy link
Copy Markdown
Member

@TomChv TomChv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand why core types are move to dagger.io/dagger, that's easier to maintains and it feel more logical.
But I'm not sure about the name builtins, to more, #Exec.. are more like primitive action, I'm not sure that engine was the perfect name, but builtins feel strange to me.
I don't have a better proposal for now, just giving my feeling

Builtin actions
Import path: dagger.io/dagger/engine

It should be dagger.io/dagger/builtins no?

You also forget the git ignore in tests/core/secrets/simple/cue.mod

@shykes

This comment was marked as resolved.

@shykes

This comment was marked as resolved.

@shykes shykes mentioned this pull request Feb 11, 2022
@gerhard

This comment was marked as off-topic.

@gerhard

This comment was marked as resolved.

@shykes shykes changed the title For discussion: API cosmetics For discussion: Dagger API 0.2 Feb 11, 2022
@shykes

This comment was marked as resolved.

@samalba

This comment was marked as resolved.

@shykes shykes changed the title For discussion: Dagger API 0.2 Merge dagger.io/dagger/engine into dagger.io/dagger Feb 16, 2022
@shykes
Copy link
Copy Markdown
Contributor Author

shykes commented Feb 16, 2022

Should be good to go @aluzzardi

@shykes
Copy link
Copy Markdown
Contributor Author

shykes commented Feb 16, 2022

Final touches:

@shykes shykes requested a review from aluzzardi February 16, 2022 20:02
@shykes
Copy link
Copy Markdown
Contributor Author

shykes commented Feb 16, 2022

Should be all good to go (for real now :)

@shykes shykes merged commit c08d9d9 into dagger:main Feb 16, 2022
@shykes
Copy link
Copy Markdown
Contributor Author

shykes commented Feb 16, 2022

Good-bye, engine, and thanks for all the fish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants