Merge pull request #1740 from talentedmrjones/remove-up-command

removes dagger up in favor of dagger do
This commit is contained in:
Andrea Luzzardi 2022-03-10 10:21:48 -08:00 committed by GitHub
commit 05cc2adec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 286 additions and 536 deletions

View File

@ -38,7 +38,6 @@ func init() {
} }
rootCmd.AddCommand( rootCmd.AddCommand(
upCmd,
versionCmd, versionCmd,
docCmd, docCmd,
doCmd, doCmd,

View File

@ -1,98 +0,0 @@
package cmd
import (
"context"
"os"
"cuelang.org/go/cue"
"go.dagger.io/dagger/cmd/dagger/cmd/common"
"go.dagger.io/dagger/cmd/dagger/logger"
"go.dagger.io/dagger/plan"
"go.dagger.io/dagger/solver"
"golang.org/x/term"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var upCmd = &cobra.Command{
// FIXME: this command will be removed soon
Hidden: true,
Deprecated: "please use `dagger do ACTION` instead",
Use: "up",
Short: "Bring an environment online with latest plan and inputs",
Args: cobra.MaximumNArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
// Fix Viper bug for duplicate flags:
// https://github.com/spf13/viper/issues/233
if err := viper.BindPFlags(cmd.Flags()); err != nil {
panic(err)
}
},
Run: func(cmd *cobra.Command, args []string) {
var (
lg = logger.New()
tty *logger.TTYOutput
err error
)
if f := viper.GetString("log-format"); f == "tty" || f == "auto" && term.IsTerminal(int(os.Stdout.Fd())) {
tty, err = logger.NewTTYOutput(os.Stderr)
if err != nil {
lg.Fatal().Err(err).Msg("failed to initialize TTY logger")
}
tty.Start()
defer tty.Stop()
lg = lg.Output(tty)
}
ctx := lg.WithContext(cmd.Context())
cl := common.NewClient(ctx)
p, err := plan.Load(ctx, plan.Config{
Args: args,
With: viper.GetStringSlice("with"),
Target: viper.GetString("target"),
})
if err != nil {
lg.Fatal().Err(err).Msg("failed to load plan")
}
doneCh := common.TrackCommand(ctx, cmd)
err = cl.Do(ctx, p.Context(), func(ctx context.Context, s solver.Solver) error {
return p.Do(ctx, cue.ParsePath(viper.GetString("target")), s)
})
<-doneCh
if err != nil {
lg.Fatal().Err(err).Msg("failed to up environment")
}
},
}
// func checkUniverseVersion(ctx context.Context, projectPath string) bool {
// lg := log.Ctx(ctx)
// isLatest, err := mod.IsUniverseLatest(ctx, projectPath)
// if err != nil {
// lg.Debug().Err(err).Msg("failed to check universe version")
// return false
// }
// if !isLatest {
// return true
// }
// lg.Debug().Msg("universe is up to date")
// return false
// }
func init() {
upCmd.Flags().BoolP("force", "f", false, "Force up, disable inputs check")
upCmd.Flags().StringArrayP("with", "w", []string{}, "")
upCmd.Flags().StringP("target", "t", "", "Run a single target of the DAG (for debugging only)")
if err := viper.BindPFlags(upCmd.Flags()); err != nil {
panic(err)
}
}

View File

@ -4,5 +4,5 @@ setup() {
common_setup common_setup
} }
@test "alpine" { @test "alpine" {
dagger up dagger "do" -p ./test.cue test
} }

View File

@ -8,7 +8,7 @@ import (
) )
dagger.#Plan & { dagger.#Plan & {
actions: tests: { actions: test: {
// Test: customize alpine version // Test: customize alpine version
alpineVersion: { alpineVersion: {
build: alpine.#Build & { build: alpine.#Build & {

View File

@ -5,5 +5,5 @@ setup() {
} }
@test "aws/cli" { @test "aws/cli" {
dagger up ./sts_get_caller_identity.cue dagger "do" -p ./sts_get_caller_identity.cue verify
} }

View File

@ -5,7 +5,7 @@ setup() {
} }
@test "aws" { @test "aws" {
dagger up ./default_version.cue dagger "do" -p ./default_version.cue getVersion
dagger up ./credentials.cue dagger "do" -p ./credentials.cue verify
dagger up ./config_file.cue dagger "do" -p ./config_file.cue verify
} }

View File

@ -5,6 +5,6 @@ setup() {
} }
@test "bash" { @test "bash" {
dagger up dagger "do" -p ./test.cue test
} }

View File

@ -8,7 +8,7 @@ import (
) )
dagger.#Plan & { dagger.#Plan & {
actions: tests: { actions: test: {
_pull: docker.#Pull & { _pull: docker.#Pull & {
source: "index.docker.io/debian" source: "index.docker.io/debian"

View File

@ -8,7 +8,7 @@ import (
) )
dagger.#Plan & { dagger.#Plan & {
actions: tests: build: { actions: test: build: {
// Test: simple docker.#Build // Test: simple docker.#Build
simple: { simple: {
#testValue: "hello world" #testValue: "hello world"

View File

@ -7,7 +7,7 @@ import (
dagger.#Plan & { dagger.#Plan & {
actions: tests: image: { actions: test: image: {
// Test: change image config with docker.#Set // Test: change image config with docker.#Set
set: { set: {

View File

@ -8,7 +8,7 @@ import (
) )
dagger.#Plan & { dagger.#Plan & {
actions: tests: run: { actions: test: run: {
_build: alpine.#Build _build: alpine.#Build
_image: _build.output _image: _build.output

View File

@ -5,5 +5,5 @@ setup() {
} }
@test "docker" { @test "docker" {
dagger up dagger "do" -p ./ test
} }

View File

@ -10,7 +10,7 @@ import (
dagger.#Plan & { dagger.#Plan & {
client: filesystem: "./data/hello": read: contents: dagger.#FS client: filesystem: "./data/hello": read: contents: dagger.#FS
actions: tests: build: { actions: test: {
_baseImage: alpine.#Build _baseImage: alpine.#Build
simple: { simple: {

View File

@ -7,7 +7,7 @@ import (
) )
dagger.#Plan & { dagger.#Plan & {
actions: tests: container: { actions: test: {
_source: dagger.#Scratch & {} _source: dagger.#Scratch & {}
simple: go.#Container & { simple: go.#Container & {

View File

@ -7,7 +7,7 @@ import (
) )
dagger.#Plan & { dagger.#Plan & {
actions: tests: image: { actions: test: {
_source: dagger.#Scratch & {} _source: dagger.#Scratch & {}
simple: { simple: {

View File

@ -5,8 +5,8 @@ setup() {
} }
@test "bash" { @test "bash" {
dagger up ./build.cue dagger "do" -p ./build.cue test
dagger up ./container.cue dagger "do" -p ./container.cue test
dagger up ./image.cue dagger "do" -p ./image.cue test
dagger up ./test.cue dagger "do" -p ./test.cue test
} }

View File

@ -8,7 +8,7 @@ import (
dagger.#Plan & { dagger.#Plan & {
client: filesystem: "./data/hello": read: contents: dagger.#FS client: filesystem: "./data/hello": read: contents: dagger.#FS
actions: tests: test: simple: go.#Test & { actions: test: go.#Test & {
source: client.filesystem."./data/hello".read.contents source: client.filesystem."./data/hello".read.contents
package: "./greeting" package: "./greeting"
} }

View File

@ -5,5 +5,5 @@ setup() {
} }
@test "netlify" { @test "netlify" {
dagger up dagger "do" test
} }

View File

@ -16,7 +16,7 @@ dagger.#Plan & {
stdout: dagger.#Secret stdout: dagger.#Secret
} }
actions: tests: { actions: test: {
// Configuration common to all tests // Configuration common to all tests
common: { common: {

View File

@ -5,5 +5,5 @@ setup() {
} }
@test "yarn" { @test "yarn" {
dagger up dagger "do" test
} }

View File

@ -13,7 +13,7 @@ dagger.#Plan & {
"./data/bar": read: contents: dagger.#FS "./data/bar": read: contents: dagger.#FS
} }
actions: tests: { actions: test: {
// Configuration for all tests // Configuration for all tests
common: { common: {

View File

@ -199,12 +199,12 @@ setup() {
cd "$TESTDIR" cd "$TESTDIR"
# Run with amd64 platform # Run with amd64 platform
run "$DAGGER" up ./plan/platform/config_platform_linux_amd64.cue run "$DAGGER" "do" -p./plan/platform/config_platform_linux_amd64.cue verify
# Run with arm64 platform # Run with arm64 platform
run "$DAGGER" up ./plan/platform/config_platform_linux_arm64.cue run "$DAGGER" "do" -p./plan/platform/config_platform_linux_arm64.cue verify
# Run with invalid platform # Run with invalid platform
run "$DAGGER" up ./plan/platform/config_platform_failure_invalid_platform.cue run "$DAGGER" "do" -p./plan/platform/config_platform_failure_invalid_platform.cue verify
assert_failure assert_failure
} }

View File

@ -2,153 +2,129 @@ setup() {
load 'helpers' load 'helpers'
common_setup common_setup
cd "$TESTDIR" || exit
} }
@test "task: #Pull" { @test "task: #Pull" {
cd "$TESTDIR"/tasks/pull "$DAGGER" "do" -p ./tasks/pull/pull.cue pull
"$DAGGER" up ./pull.cue "$DAGGER" "do" -p ./tasks/pull/pull_auth.cue pull
}
@test "task: #Pull with auth" {
cd "$TESTDIR"
"$DAGGER" up ./tasks/pull/pull_auth.cue
} }
@test "task: #Push" { @test "task: #Push" {
cd "$TESTDIR" "$DAGGER" "do" -p ./tasks/push/push.cue pullContent
"$DAGGER" up ./tasks/push/push.cue
} }
@test "task: #ReadFile" { @test "task: #ReadFile" {
cd "$TESTDIR"/tasks/readfile "$DAGGER" "do" -p ./tasks/readfile/readfile.cue readfile
"$DAGGER" up
} }
@test "task: #WriteFile" { @test "task: #WriteFile" {
cd "$TESTDIR"/tasks/writefile "$DAGGER" "do" -p ./tasks/writefile/writefile.cue readfile
"$DAGGER" up ./writefile.cue run "$DAGGER" "do" -p ./tasks/writefile/writefile_failure_diff_contents.cue readfile
}
@test "task: #WriteFile failure: different contents" {
cd "$TESTDIR"/tasks/writefile
run "$DAGGER" up ./writefile_failure_diff_contents.cue
assert_failure assert_failure
} }
@test "task: #Exec" { @test "task: #Exec" {
cd "$TESTDIR"/tasks/exec cd ./tasks/exec
"$DAGGER" up ./args.cue "$DAGGER" "do" -p ./args.cue verify
"$DAGGER" up ./env.cue "$DAGGER" "do" -p ./env.cue verify
"$DAGGER" up ./env_secret.cue "$DAGGER" "do" -p ./env_secret.cue verify
"$DAGGER" up ./hosts.cue "$DAGGER" "do" -p ./hosts.cue verify
"$DAGGER" up ./mount_cache.cue "$DAGGER" "do" -p ./mount_cache.cue test
"$DAGGER" up ./mount_fs.cue "$DAGGER" "do" -p ./mount_fs.cue test
TESTSECRET="hello world" "$DAGGER" up ./mount_secret.cue TESTSECRET="hello world" "$DAGGER" "do" -p ./mount_secret.cue test
"$DAGGER" up ./mount_tmp.cue "$DAGGER" "do" -p ./mount_tmp.cue verify
"$DAGGER" up ./mount_service.cue "$DAGGER" "do" -p ./mount_service.cue verify
"$DAGGER" up ./user.cue "$DAGGER" "do" -p ./user.cue test
"$DAGGER" up ./workdir.cue "$DAGGER" "do" -p ./workdir.cue verify
} }
@test "task: #Copy" { @test "task: #Copy" {
cd "$TESTDIR"/tasks/copy "$DAGGER" "do" -p ./tasks/copy/copy_exec.cue test
"$DAGGER" up ./copy_exec.cue "$DAGGER" "do" -p ./tasks/copy/copy_file.cue test
"$DAGGER" up ./copy_file.cue
run "$DAGGER" up ./copy_exec_invalid.cue run "$DAGGER" "do" -p ./tasks/copy/copy_exec_invalid.cue test
assert_failure assert_failure
} }
@test "task: #Mkdir" { @test "task: #Mkdir" {
# Make directory # Make directory
cd "$TESTDIR"/tasks/mkdir "$DAGGER" "do" -p ./tasks/mkdir/mkdir.cue readChecker
"$DAGGER" up ./mkdir.cue
# Create parents # Create parents
cd "$TESTDIR"/tasks/mkdir "$DAGGER" "do" -p ./tasks/mkdir/mkdir_parents.cue readChecker
"$DAGGER" up ./mkdir_parents.cue
# Disable parents creation # Disable parents creation
cd "$TESTDIR"/tasks/mkdir run "$DAGGER" "do" -p ./tasks/mkdir/mkdir_failure_disable_parents.cue readChecker
run "$DAGGER" up ./mkdir_failure_disable_parents.cue
assert_failure assert_failure
} }
@test "task: #Dockerfile" { @test "task: #Dockerfile" {
cd "$TESTDIR"/tasks/dockerfile cd "$TESTDIR"/tasks/dockerfile
"$DAGGER" "do" -p ./dockerfile.cue
"$DAGGER" up ./dockerfile.cue "$DAGGER" "do" -p ./inlined_dockerfile.cue verify
"$DAGGER" up ./inlined_dockerfile.cue "$DAGGER" "do" -p ./inlined_dockerfile_heredoc.cue verify
"$DAGGER" up ./inlined_dockerfile_heredoc.cue "$DAGGER" "do" -p ./dockerfile_path.cue verify
"$DAGGER" up ./dockerfile_path.cue "$DAGGER" "do" -p ./build_args.cue build
"$DAGGER" up ./build_args.cue "$DAGGER" "do" -p ./image_config.cue build
"$DAGGER" up ./image_config.cue "$DAGGER" "do" -p ./labels.cue build
"$DAGGER" up ./labels.cue "$DAGGER" "do" -p ./platform.cue build
"$DAGGER" up ./platform.cue "$DAGGER" "do" -p ./build_auth.cue build
"$DAGGER" up ./build_auth.cue
} }
@test "task: #Scratch" { @test "task: #Scratch" {
cd "$TESTDIR"/tasks/scratch "$DAGGER" "do" -p ./tasks/scratch/scratch.cue exec
"$DAGGER" up ./scratch.cue -l debug "$DAGGER" "do" -p ./tasks/scratch/scratch_build_scratch.cue build
"$DAGGER" up ./scratch_build_scratch.cue -l debug "$DAGGER" "do" -p ./tasks/scratch/scratch_writefile.cue readfile
"$DAGGER" up ./scratch_writefile.cue -l debug
} }
@test "task: #Subdir" { @test "task: #Subdir" {
cd "$TESTDIR"/tasks/subdir "$DAGGER" "do" -p ./tasks/subdir/subdir_simple.cue verify
"$DAGGER" up ./subdir_simple.cue
run "$DAGGER" up ./subdir_invalid_path.cue run "$DAGGER" "do" -p ./tasks/subdir/subdir_invalid_path.cue verify
assert_failure assert_failure
run "$DAGGER" up ./subdir_invalid_exec.cue run "$DAGGER" "do" -p ./tasks/subdir/subdir_invalid_exec.cue verify
assert_failure assert_failure
} }
@test "task: #GitPull" { @test "task: #GitPull" {
cd "$TESTDIR" "$DAGGER" "do" -p ./tasks/gitpull/exists.cue gitPull
"$DAGGER" up ./tasks/gitpull/exists.cue "$DAGGER" "do" -p ./tasks/gitpull/git_dir.cue verify
"$DAGGER" up ./tasks/gitpull/git_dir.cue "$DAGGER" "do" -p ./tasks/gitpull/private_repo.cue testContent
"$DAGGER" up ./tasks/gitpull/private_repo.cue
run "$DAGGER" up ./tasks/gitpull/invalid.cue run "$DAGGER" "do" -p ./tasks/gitpull/invalid.cue invalid
assert_failure assert_failure
run "$DAGGER" up ./tasks/gitpull/bad_remote.cue run "$DAGGER" "do" -p ./tasks/gitpull/bad_remote.cue badremote
assert_failure assert_failure
run "$DAGGER" up ./tasks/gitpull/bad_ref.cue run "$DAGGER" "do" -p ./tasks/gitpull/bad_ref.cue badref
assert_failure assert_failure
} }
@test "task: #HTTPFetch" { @test "task: #HTTPFetch" {
cd "$TESTDIR" "$DAGGER" "do" -p ./tasks/httpfetch/exist.cue fetch
"$DAGGER" up ./tasks/httpfetch/exist.cue run "$DAGGER" "do" -p ./tasks/httpfetch/not_exist.cue fetch
run "$DAGGER" up ./tasks/httpfetch/not_exist.cue
assert_failure assert_failure
} }
@test "task: #NewSecret" { @test "task: #NewSecret" {
cd "$TESTDIR"/tasks/newsecret "$DAGGER" "do" -p ./tasks/newsecret/newsecret.cue verify
"$DAGGER" up ./newsecret.cue
} }
@test "task: #TrimSecret" { @test "task: #TrimSecret" {
cd "$TESTDIR"/tasks/trimsecret "$DAGGER" "do" -p ./tasks/trimsecret/trimsecret.cue verify
"$DAGGER" up ./trimsecret.cue
} }
@test "task: #Source" { @test "task: #Source" {
cd "$TESTDIR"/tasks/source "$DAGGER" "do" -p ./tasks/source/source.cue test
"$DAGGER" up ./source.cue "$DAGGER" "do" -p ./tasks/source/source_include_exclude.cue test
"$DAGGER" up ./source_include_exclude.cue "$DAGGER" "do" -p ./tasks/source/source_relative.cue verifyHello
"$DAGGER" up ./source_relative.cue
run "$DAGGER" up ./source_invalid_path.cue run "$DAGGER" "do" -p ./tasks/source/source_invalid_path.cue source
assert_failure assert_failure
run "$DAGGER" up ./source_not_exist.cue run "$DAGGER" "do" -p ./tasks/source/source_not_exist.cue source
assert_failure assert_failure
} }

View File

@ -19,7 +19,7 @@ dagger.#Plan & {
"""#, """#,
] ]
} }
test: {
verify_file: dagger.#ReadFile & { verify_file: dagger.#ReadFile & {
input: exec.output input: exec.output
path: "/output.txt" path: "/output.txt"
@ -44,3 +44,4 @@ dagger.#Plan & {
} }
} }
} }
}

View File

@ -20,6 +20,7 @@ dagger.#Plan & {
] ]
} }
test: {
verify_file: dagger.#ReadFile & { verify_file: dagger.#ReadFile & {
input: exec.output input: exec.output
path: "/output.txt" path: "/output.txt"
@ -43,3 +44,4 @@ dagger.#Plan & {
} }
} }
} }
}

View File

@ -14,6 +14,7 @@ dagger.#Plan & {
source: "busybox:1.34.1-glibc@sha256:ec98391b8f0911db08be2ee6c46813eeac17b9625b402ea1ce45dcfcd05d78d6" source: "busybox:1.34.1-glibc@sha256:ec98391b8f0911db08be2ee6c46813eeac17b9625b402ea1ce45dcfcd05d78d6"
} }
test: {
verify_alpine_3_15_0: dagger.#ReadFile & { verify_alpine_3_15_0: dagger.#ReadFile & {
input: alpine3_15_0.output input: alpine3_15_0.output
path: "/etc/alpine-release" path: "/etc/alpine-release"
@ -38,3 +39,4 @@ dagger.#Plan & {
} }
} }
} }
}

View File

@ -22,73 +22,3 @@ dagger.#Plan & {
} }
} }
} }
// TestDockerfilePath: #up: [
// op.#DockerBuild & {
// context: TestData
// dockerfilePath: "./dockerfilepath/Dockerfile.custom"
// },
// op.#Exec & {
// args: ["sh", "-c", "test $(cat /test) = dockerfilePath"]
// },
// ]
// TestBuildArgs: #up: [
// op.#DockerBuild & {
// dockerfile: """
// FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
// ARG TEST=foo
// RUN test "${TEST}" = "bar"
// """
// buildArg: TEST: "bar"
// },
// ]
// // FIXME: this doesn't test anything beside not crashing
// TestBuildLabels: #up: [
// op.#DockerBuild & {
// dockerfile: """
// FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
// """
// label: FOO: "bar"
// },
// ]
// // FIXME: this doesn't test anything beside not crashing
// TestBuildPlatform: #up: [
// op.#DockerBuild & {
// dockerfile: """
// FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
// """
// platforms: ["linux/amd64"]
// },
// ]
// TestImageMetadata: #up: [
// op.#DockerBuild & {
// dockerfile: """
// FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
// ENV CHECK foobar
// ENV DOUBLECHECK test
// """
// },
// op.#Exec & {
// args: ["sh", "-c", #"""
// env
// test "$CHECK" = "foobar"
// """#]
// },
// ]
// // Make sure the metadata is carried over with a `Load`
// TestImageMetadataIndirect: #up: [
// op.#Load & {
// from: TestImageMetadata
// },
// op.#Exec & {
// args: ["sh", "-c", #"""
// env
// test "$DOUBLECHECK" = "test"
// """#]
// },
// ]

View File

@ -23,73 +23,3 @@ dagger.#Plan & {
} }
} }
} }
// TestDockerfilePath: #up: [
// op.#DockerBuild & {
// context: TestData
// dockerfilePath: "./dockerfilepath/Dockerfile.custom"
// },
// op.#Exec & {
// args: ["sh", "-c", "test $(cat /test) = dockerfilePath"]
// },
// ]
// TestBuildArgs: #up: [
// op.#DockerBuild & {
// dockerfile: """
// FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
// ARG TEST=foo
// RUN test "${TEST}" = "bar"
// """
// buildArg: TEST: "bar"
// },
// ]
// // FIXME: this doesn't test anything beside not crashing
// TestBuildLabels: #up: [
// op.#DockerBuild & {
// dockerfile: """
// FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
// """
// label: FOO: "bar"
// },
// ]
// // FIXME: this doesn't test anything beside not crashing
// TestBuildPlatform: #up: [
// op.#DockerBuild & {
// dockerfile: """
// FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
// """
// platforms: ["linux/amd64"]
// },
// ]
// TestImageMetadata: #up: [
// op.#DockerBuild & {
// dockerfile: """
// FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
// ENV CHECK foobar
// ENV DOUBLECHECK test
// """
// },
// op.#Exec & {
// args: ["sh", "-c", #"""
// env
// test "$CHECK" = "foobar"
// """#]
// },
// ]
// // Make sure the metadata is carried over with a `Load`
// TestImageMetadataIndirect: #up: [
// op.#Load & {
// from: TestImageMetadata
// },
// op.#Exec & {
// args: ["sh", "-c", #"""
// env
// test "$DOUBLECHECK" = "test"
// """#]
// },
// ]

View File

@ -6,6 +6,7 @@ import (
dagger.#Plan & { dagger.#Plan & {
client: filesystem: "secret.txt": read: contents: dagger.#Secret client: filesystem: "secret.txt": read: contents: dagger.#Secret
actions: { actions: {
image: dagger.#Pull & { image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"

View File

@ -28,6 +28,7 @@ dagger.#Plan & {
] ]
} }
test: {
verify: dagger.#Exec & { verify: dagger.#Exec & {
input: image.output input: image.output
mounts: cache: { mounts: cache: {
@ -61,3 +62,4 @@ dagger.#Plan & {
} }
} }
} }
}

View File

@ -20,6 +20,7 @@ dagger.#Plan & {
] ]
} }
test: {
verify: dagger.#Exec & { verify: dagger.#Exec & {
input: image.output input: image.output
mounts: fs: { mounts: fs: {
@ -69,3 +70,4 @@ dagger.#Plan & {
} }
} }
} }
}

View File

@ -11,6 +11,7 @@ dagger.#Plan & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
} }
test: {
verify: dagger.#Exec & { verify: dagger.#Exec & {
input: image.output input: image.output
mounts: secret: { mounts: secret: {
@ -44,6 +45,6 @@ dagger.#Plan & {
"""#, """#,
] ]
} }
}
} }
} }

View File

@ -14,7 +14,7 @@ dagger.#Plan & {
input: image.output input: image.output
args: ["adduser", "-D", "test"] args: ["adduser", "-D", "test"]
} }
test: {
verifyUsername: dagger.#Exec & { verifyUsername: dagger.#Exec & {
input: addUser.output input: addUser.output
user: "test" user: "test"
@ -36,6 +36,6 @@ dagger.#Plan & {
"""#, """#,
] ]
} }
}
} }
} }

View File

@ -23,6 +23,7 @@ dagger.#Plan & {
args: ["/src/test.sh"] args: ["/src/test.sh"]
} }
test: {
verifyHello: dagger.#ReadFile & { verifyHello: dagger.#ReadFile & {
input: source.output input: source.output
path: "/world.txt" path: "/world.txt"
@ -40,3 +41,4 @@ dagger.#Plan & {
} }
} }
} }
}