From 6460a5c9fc5d365baf4550791927c4169202ba6c Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Sat, 13 Mar 2021 06:29:37 +0000 Subject: [PATCH] Rename dagger.#Dir to dagger.#Artifact Signed-off-by: Solomon Hykes --- examples/dagger-dev/main.cue | 2 +- stdlib/dagger/dagger.cue | 9 ++++++--- stdlib/go/go.cue | 6 +++--- stdlib/netlify/netlify.cue | 2 +- stdlib/yarn/yarn.cue | 2 +- tests/dockerbuild/main.cue | 2 +- tests/stdlib/go/go.cue | 2 +- tests/stdlib/yarn/yarn.cue | 2 +- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/examples/dagger-dev/main.cue b/examples/dagger-dev/main.cue index 0c3239d7..34e4dfb3 100644 --- a/examples/dagger-dev/main.cue +++ b/examples/dagger-dev/main.cue @@ -13,7 +13,7 @@ import ( "dagger.io/docker" ) -repository: dagger.#Dir +repository: dagger.#Artifact // Build `dagger` using Go build: go.#Build & { diff --git a/stdlib/dagger/dagger.cue b/stdlib/dagger/dagger.cue index ca4725d4..2854a3c4 100644 --- a/stdlib/dagger/dagger.cue +++ b/stdlib/dagger/dagger.cue @@ -1,8 +1,11 @@ package dagger -// Any component can be referenced as a directory, since -// every dagger script outputs a filesystem state (aka a directory) -#Dir: #compute: [...#Op] +// An artifact such as source code checkout, container image, binary archive... +// May be passed as user input, or computed by a buildkit pipeline +#Artifact: #compute: [...#Op] + +// deprecated, use #Artifact instead. +#Dir: #Artifact // Secret value // FIXME: currently aliased as a string to mark secrets diff --git a/stdlib/go/go.cue b/stdlib/go/go.cue index e8acbd2d..82b57f07 100644 --- a/stdlib/go/go.cue +++ b/stdlib/go/go.cue @@ -12,7 +12,7 @@ import ( args: [...string] // Source Directory to build - source: dagger.#Dir + source: dagger.#Artifact // Environment variables env: [string]: string @@ -40,7 +40,7 @@ import ( version: *#Go.version | string // Source Directory to build - source: dagger.#Dir + source: dagger.#Artifact // Packages to build packages: *"." | string @@ -81,7 +81,7 @@ import ( version: *#Go.version | string // Source Directory to build - source: dagger.#Dir + source: dagger.#Artifact // Packages to test packages: *"." | string diff --git a/stdlib/netlify/netlify.cue b/stdlib/netlify/netlify.cue index 5a0bd558..d6ebf8d3 100644 --- a/stdlib/netlify/netlify.cue +++ b/stdlib/netlify/netlify.cue @@ -21,7 +21,7 @@ import ( account: #Account // Contents of the application to deploy - contents: dagger.#Dir + contents: dagger.#Artifact // Deploy to this Netlify site name: string diff --git a/stdlib/yarn/yarn.cue b/stdlib/yarn/yarn.cue index b0ac793b..94570762 100644 --- a/stdlib/yarn/yarn.cue +++ b/stdlib/yarn/yarn.cue @@ -8,7 +8,7 @@ import ( // Yarn Script #Script: { // Source code of the javascript application - source: dagger.#Dir + source: dagger.#Artifact // Run this yarn script run: string | *"build" diff --git a/tests/dockerbuild/main.cue b/tests/dockerbuild/main.cue index 29585dd4..6bb729e9 100644 --- a/tests/dockerbuild/main.cue +++ b/tests/dockerbuild/main.cue @@ -3,7 +3,7 @@ package test import "dagger.io/dagger" // Set to `--input-dir=./tests/dockerbuild/testdata` -TestData: dagger.#Dir +TestData: dagger.#Artifact TestInlinedDockerfile: #compute: [ dagger.#DockerBuild & { diff --git a/tests/stdlib/go/go.cue b/tests/stdlib/go/go.cue index 82d16769..da4a654f 100644 --- a/tests/stdlib/go/go.cue +++ b/tests/stdlib/go/go.cue @@ -6,7 +6,7 @@ import ( "dagger.io/alpine" ) -TestData: dagger.#Dir +TestData: dagger.#Artifact TestGoBuild: { build: go.#Build & { diff --git a/tests/stdlib/yarn/yarn.cue b/tests/stdlib/yarn/yarn.cue index a13a7fec..593e9988 100644 --- a/tests/stdlib/yarn/yarn.cue +++ b/tests/stdlib/yarn/yarn.cue @@ -6,7 +6,7 @@ import ( "dagger.io/alpine" ) -TestData: dagger.#Dir +TestData: dagger.#Artifact TestYarn: { run: yarn.#Script & {