From cfbd70a8230b776b176164508a7009d65c697d60 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:43:12 -0700 Subject: [PATCH 01/38] Remove compute Signed-off-by: Joel Longtine --- cmd/dagger/cmd/compute.go | 236 -------------------------------------- cmd/dagger/cmd/root.go | 1 - 2 files changed, 237 deletions(-) delete mode 100644 cmd/dagger/cmd/compute.go diff --git a/cmd/dagger/cmd/compute.go b/cmd/dagger/cmd/compute.go deleted file mode 100644 index 320d87be..00000000 --- a/cmd/dagger/cmd/compute.go +++ /dev/null @@ -1,236 +0,0 @@ -package cmd - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "os" - "strings" - - "cuelang.org/go/cue" - "github.com/containerd/containerd/platforms" - specs "github.com/opencontainers/image-spec/specs-go/v1" - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/environment" - "go.dagger.io/dagger/plancontext" - "go.dagger.io/dagger/solver" - "go.dagger.io/dagger/state" - "go.mozilla.org/sops/v3" - "go.mozilla.org/sops/v3/decrypt" - - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var computeCmd = &cobra.Command{ - Use: "compute CONFIG", - Short: "Compute a configuration (DEPRECATED)", - Args: cobra.ExactArgs(1), - Hidden: true, - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - doneCh := common.TrackCommand(ctx, cmd) - - st := &state.State{ - Context: plancontext.New(), - Name: "FIXME", - Platform: platforms.Format(specs.Platform{OS: "linux", Architecture: "amd64"}), - Path: args[0], - Plan: state.Plan{ - Module: args[0], - }, - } - - for _, input := range viper.GetStringSlice("input-string") { - parts := strings.SplitN(input, "=", 2) - if len(parts) != 2 { - lg.Fatal().Msgf("failed to parse input: input-string") - } - - k, v := parts[0], parts[1] - err := st.SetInput(k, state.TextInput(v)) - if err != nil { - lg. - Fatal(). - Err(err). - Str("input", k). - Msg("failed to add input") - } - } - - for _, input := range viper.GetStringSlice("input-dir") { - parts := strings.SplitN(input, "=", 2) - if len(parts) != 2 { - lg.Fatal().Msgf("failed to parse input: input-dir") - } - - k, v := parts[0], parts[1] - err := st.SetInput(k, state.DirInput(v, []string{}, []string{})) - if err != nil { - lg. - Fatal(). - Err(err). - Str("input", k). - Msg("failed to add input") - } - } - - for _, input := range viper.GetStringSlice("input-git") { - parts := strings.SplitN(input, "=", 2) - if len(parts) != 2 { - lg.Fatal().Msgf("failed to parse input: input-git") - } - - k, v := parts[0], parts[1] - err := st.SetInput(k, state.GitInput(v, "", "")) - if err != nil { - lg. - Fatal(). - Err(err). - Str("input", k). - Msg("failed to add input") - } - } - - if f := viper.GetString("input-json"); f != "" { - lg := lg.With().Str("path", f).Logger() - - content, err := os.ReadFile(f) - if err != nil { - lg.Fatal().Err(err).Msg("failed to read file") - } - - plaintext, err := decrypt.Data(content, "json") - if err != nil && !errors.Is(err, sops.MetadataNotFound) { - lg.Fatal().Err(err).Msg("unable to decrypt") - } - - if len(plaintext) > 0 { - content = plaintext - } - - if !json.Valid(content) { - lg.Fatal().Msg("invalid json") - } - - err = st.SetInput("", state.JSONInput(string(content))) - if err != nil { - lg.Fatal().Err(err).Msg("failed to add input") - } - } - - if f := viper.GetString("input-yaml"); f != "" { - lg := lg.With().Str("path", f).Logger() - - content, err := os.ReadFile(f) - if err != nil { - lg.Fatal().Err(err).Msg("failed to read file") - } - - plaintext, err := decrypt.Data(content, "yaml") - if err != nil && !errors.Is(err, sops.MetadataNotFound) { - lg.Fatal().Err(err).Msg("unable to decrypt") - } - - if len(plaintext) > 0 { - content = plaintext - } - - err = st.SetInput("", state.YAMLInput(string(content))) - if err != nil { - lg.Fatal().Err(err).Msg("failed to add input") - } - } - - if f := viper.GetString("input-file"); f != "" { - lg := lg.With().Str("path", f).Logger() - - parts := strings.SplitN(f, "=", 2) - k, v := parts[0], parts[1] - - content, err := os.ReadFile(v) - if err != nil { - lg.Fatal().Err(err).Msg("failed to read file") - } - - if len(content) > 0 { - err = st.SetInput(k, state.FileInput(v)) - if err != nil { - lg.Fatal().Err(err).Msg("failed to set input string") - } - } - } - - cl := common.NewClient(ctx) - - v := compiler.NewValue() - plan, err := st.CompilePlan(ctx) - if err != nil { - lg.Fatal().Err(err).Msg("failed to compile plan") - } - if err := v.FillPath(cue.MakePath(), plan); err != nil { - lg.Fatal().Err(err).Msg("failed to compile plan") - } - - inputs, err := st.CompileInputs() - if err != nil { - lg.Fatal().Err(err).Msg("failed to compile inputs") - } - - if err := v.FillPath(cue.MakePath(), inputs); err != nil { - lg.Fatal().Err(err).Msg("failed to compile inputs") - } - - env, err := environment.New(st) - if err != nil { - lg.Fatal().Err(err).Msg("unable to create environment") - } - - err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error { - // check that all inputs are set - checkInputs(ctx, env) - - if err := env.Up(ctx, s); err != nil { - return err - } - - if err := v.FillPath(cue.MakePath(), env.Computed()); err != nil { - return err - } - - fmt.Println(v.JSON()) - return nil - }) - - <-doneCh - - if err != nil { - lg.Fatal().Err(err).Msg("failed to up environment") - } - }, -} - -func init() { - computeCmd.Flags().StringSlice("input-string", []string{}, "TARGET=STRING") - computeCmd.Flags().StringSlice("input-dir", []string{}, "TARGET=PATH") - computeCmd.Flags().String("input-file", "", "TARGET=PATH") - computeCmd.Flags().StringSlice("input-git", []string{}, "TARGET=REMOTE#REF") - computeCmd.Flags().String("input-json", "", "JSON") - computeCmd.Flags().String("input-yaml", "", "YAML") - - if err := viper.BindPFlags(computeCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index e784927e..13933ea0 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -56,7 +56,6 @@ func init() { rootCmd.AddCommand( initCmd, newCmd, - computeCmd, listCmd, queryCmd, upCmd, From 16733fa9eb9f89a70da2312c740efaf536291825 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:46:10 -0700 Subject: [PATCH 02/38] Remove cmd input Signed-off-by: Joel Longtine --- cmd/dagger/cmd/input/bool.go | 38 ---------- cmd/dagger/cmd/input/dir.go | 69 ----------------- cmd/dagger/cmd/input/git.go | 43 ----------- cmd/dagger/cmd/input/json.go | 40 ---------- cmd/dagger/cmd/input/list.go | 131 --------------------------------- cmd/dagger/cmd/input/root.go | 112 ---------------------------- cmd/dagger/cmd/input/secret.go | 59 --------------- cmd/dagger/cmd/input/socket.go | 68 ----------------- cmd/dagger/cmd/input/text.go | 40 ---------- cmd/dagger/cmd/input/unset.go | 34 --------- cmd/dagger/cmd/input/yaml.go | 40 ---------- cmd/dagger/cmd/root.go | 2 - 12 files changed, 676 deletions(-) delete mode 100644 cmd/dagger/cmd/input/bool.go delete mode 100644 cmd/dagger/cmd/input/dir.go delete mode 100644 cmd/dagger/cmd/input/git.go delete mode 100644 cmd/dagger/cmd/input/json.go delete mode 100644 cmd/dagger/cmd/input/list.go delete mode 100644 cmd/dagger/cmd/input/root.go delete mode 100644 cmd/dagger/cmd/input/secret.go delete mode 100644 cmd/dagger/cmd/input/socket.go delete mode 100644 cmd/dagger/cmd/input/text.go delete mode 100644 cmd/dagger/cmd/input/unset.go delete mode 100644 cmd/dagger/cmd/input/yaml.go diff --git a/cmd/dagger/cmd/input/bool.go b/cmd/dagger/cmd/input/bool.go deleted file mode 100644 index 0dd1a691..00000000 --- a/cmd/dagger/cmd/input/bool.go +++ /dev/null @@ -1,38 +0,0 @@ -package input - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" -) - -var boolCmd = &cobra.Command{ - Use: "bool ", - Short: "Add a boolean input", - Args: cobra.ExactArgs(2), - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - updateEnvironmentInput( - ctx, - cmd, - args[0], - state.BoolInput(readInput(ctx, args[1])), - ) - }, -} - -func init() { - if err := viper.BindPFlags(boolCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/input/dir.go b/cmd/dagger/cmd/input/dir.go deleted file mode 100644 index 7af9cbb7..00000000 --- a/cmd/dagger/cmd/input/dir.go +++ /dev/null @@ -1,69 +0,0 @@ -package input - -import ( - "os" - "path/filepath" - "strings" - - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" -) - -var dirCmd = &cobra.Command{ - Use: "dir TARGET PATH", - Short: "Add a local directory as input artifact", - Args: cobra.ExactArgs(2), - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - p, err := filepath.Abs(args[1]) - if err != nil { - lg.Fatal().Err(err).Str("path", args[1]).Msg("unable to resolve path") - } - - // Check that directory exists - if _, err := os.Stat(p); os.IsNotExist(err) { - lg.Fatal().Err(err).Str("path", args[1]).Msg("dir doesn't exist") - } - - project := common.CurrentProject(ctx) - if !strings.HasPrefix(p, project.Path) { - lg.Fatal().Err(err).Str("path", args[1]).Msg("dir is outside the project") - } - p, err = filepath.Rel(project.Path, p) - if err != nil { - lg.Fatal().Err(err).Str("path", args[1]).Msg("unable to resolve path") - } - if !strings.HasPrefix(p, ".") { - p = "./" + p - } - - updateEnvironmentInput(ctx, cmd, args[0], - state.DirInput( - p, - viper.GetStringSlice("include"), - viper.GetStringSlice("exclude"), - ), - ) - }, -} - -func init() { - dirCmd.Flags().StringSlice("include", []string{}, "Include pattern") - dirCmd.Flags().StringSlice("exclude", []string{}, "Exclude pattern") - - if err := viper.BindPFlags(dirCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/input/git.go b/cmd/dagger/cmd/input/git.go deleted file mode 100644 index 5cddefa0..00000000 --- a/cmd/dagger/cmd/input/git.go +++ /dev/null @@ -1,43 +0,0 @@ -package input - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" -) - -var gitCmd = &cobra.Command{ - Use: "git TARGET REMOTE [REF] [SUBDIR]", - Short: "Add a git repository as input artifact", - Args: cobra.RangeArgs(2, 4), - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - ref := "HEAD" - if len(args) > 2 { - ref = args[2] - } - - subDir := "" - if len(args) > 3 { - subDir = args[3] - } - - updateEnvironmentInput(ctx, cmd, args[0], state.GitInput(args[1], ref, subDir)) - }, -} - -func init() { - if err := viper.BindPFlags(gitCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/input/json.go b/cmd/dagger/cmd/input/json.go deleted file mode 100644 index f5c47325..00000000 --- a/cmd/dagger/cmd/input/json.go +++ /dev/null @@ -1,40 +0,0 @@ -package input - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" -) - -var jsonCmd = &cobra.Command{ - Use: "json [-f] ", - Short: "Add a JSON input", - Args: cobra.ExactArgs(2), - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - updateEnvironmentInput( - ctx, - cmd, - args[0], - state.JSONInput(readInput(ctx, args[1])), - ) - }, -} - -func init() { - jsonCmd.Flags().BoolP("file", "f", false, "Read value from file") - - if err := viper.BindPFlags(jsonCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/input/list.go b/cmd/dagger/cmd/input/list.go deleted file mode 100644 index 8589db02..00000000 --- a/cmd/dagger/cmd/input/list.go +++ /dev/null @@ -1,131 +0,0 @@ -package input - -import ( - "context" - "fmt" - "os" - "text/tabwriter" - - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/environment" - "go.dagger.io/dagger/plancontext" - "go.dagger.io/dagger/solver" - "go.dagger.io/dagger/state" - - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var listCmd = &cobra.Command{ - Use: "list [TARGET] [flags]", - Short: "List the inputs of an environment", - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - project := common.CurrentProject(ctx) - st := common.CurrentEnvironmentState(ctx, project) - - lg = lg.With(). - Str("environment", st.Name). - Logger() - - doneCh := common.TrackProjectCommand(ctx, cmd, project, st) - - env, err := environment.New(st) - if err != nil { - lg.Fatal().Err(err).Msg("unable to create environment") - } - - cl := common.NewClient(ctx) - err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error { - inputs, err := env.ScanInputs(ctx, false) - if err != nil { - return err - } - - w := tabwriter.NewWriter(os.Stdout, 0, 4, 2, ' ', 0) - fmt.Fprintln(w, "Input\tValue\tSet by user\tDescription") - - for _, inp := range inputs { - isConcrete := (inp.IsConcreteR() == nil) - _, hasDefault := inp.Default() - - switch { - case plancontext.IsSecretValue(inp): - if _, err := env.Context().Secrets.FromValue(inp); err != nil { - isConcrete = false - } - case plancontext.IsFSValue(inp): - if _, err := env.Context().FS.FromValue(inp); err != nil { - isConcrete = false - } - case plancontext.IsServiceValue(inp): - if _, err := env.Context().Services.FromValue(inp); err != nil { - isConcrete = false - } - } - - if !viper.GetBool("all") { - // skip input that is not overridable - if !hasDefault && isConcrete { - continue - } - } - - if !viper.GetBool("show-optional") && !viper.GetBool("all") { - // skip input if there is already a default value - if hasDefault { - continue - } - } - - fmt.Fprintf(w, "%s\t%s\t%t\t%s\n", - inp.Path(), - common.FormatValue(inp), - isUserSet(st, inp), - common.ValueDocOneLine(inp), - ) - } - - w.Flush() - return nil - }) - - <-doneCh - - if err != nil { - lg.Fatal().Err(err).Msg("failed to query environment") - } - - }, -} - -func isUserSet(env *state.State, val *compiler.Value) bool { - for key := range env.Inputs { - if val.Path().String() == key { - return true - } - } - - return false -} - -func init() { - listCmd.Flags().BoolP("all", "a", false, "List all inputs (include non-overridable)") - listCmd.Flags().Bool("show-optional", false, "List optional inputs (those with default values)") - - if err := viper.BindPFlags(listCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/input/root.go b/cmd/dagger/cmd/input/root.go deleted file mode 100644 index 57b1a785..00000000 --- a/cmd/dagger/cmd/input/root.go +++ /dev/null @@ -1,112 +0,0 @@ -package input - -import ( - "context" - "io" - "os" - - "github.com/rs/zerolog/log" - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/environment" - "go.dagger.io/dagger/solver" - "go.dagger.io/dagger/state" - "go.dagger.io/dagger/telemetry" -) - -// Cmd exposes the top-level command -var Cmd = &cobra.Command{ - Use: "input", - Short: "Manage an environment's inputs", -} - -func init() { - Cmd.AddCommand( - dirCmd, - gitCmd, - secretCmd, - textCmd, - jsonCmd, - yamlCmd, - listCmd, - boolCmd, - socketCmd, - unsetCmd, - ) -} - -func updateEnvironmentInput(ctx context.Context, cmd *cobra.Command, target string, input state.Input) { - lg := *log.Ctx(ctx) - - project := common.CurrentProject(ctx) - st := common.CurrentEnvironmentState(ctx, project) - - lg = lg.With(). - Str("environment", st.Name). - Logger() - - doneCh := common.TrackProjectCommand(ctx, cmd, project, st, &telemetry.Property{ - Name: "input_target", - Value: target, - }) - - st.SetInput(target, input) - - env, err := environment.New(st) - if err != nil { - lg.Fatal().Err(err).Msg("unable to create environment") - } - - cl := common.NewClient(ctx) - err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error { - // the inputs are set, check for cue errors by scanning all the inputs - _, err := env.ScanInputs(ctx, true) - if err != nil { - return err - } - return nil - }) - - <-doneCh - - if err != nil { - lg.Fatal().Err(err).Msg("invalid input") - } - - if err := project.Save(ctx, st); err != nil { - lg.Fatal().Err(err).Msg("cannot update environment") - } -} - -func readInput(ctx context.Context, source string) string { - lg := log.Ctx(ctx) - - if !viper.GetBool("file") { - return source - } - - if source == "-" { - // stdin source - data, err := io.ReadAll(os.Stdin) - if err != nil { - lg. - Fatal(). - Err(err). - Msg("failed to read input from stdin") - } - return string(data) - } - - // file source - data, err := os.ReadFile(source) - if err != nil { - lg. - Fatal(). - Err(err). - Str("path", source). - Msg("failed to read input from file") - } - - return string(data) -} diff --git a/cmd/dagger/cmd/input/secret.go b/cmd/dagger/cmd/input/secret.go deleted file mode 100644 index b33a4230..00000000 --- a/cmd/dagger/cmd/input/secret.go +++ /dev/null @@ -1,59 +0,0 @@ -package input - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" - "golang.org/x/term" -) - -var secretCmd = &cobra.Command{ - Use: "secret [-f] []", - Short: "Add an encrypted input secret", - Args: cobra.RangeArgs(1, 2), - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - var secret string - if len(args) == 1 { - // No value specified: prompt terminal - fmt.Print("Secret: ") - data, err := term.ReadPassword(int(os.Stdin.Fd())) - if err != nil { - lg.Fatal().Err(err).Msg("unable to read secret from terminal") - } - fmt.Println("") - secret = string(data) - } else { - // value specified: read it - secret = readInput(ctx, args[1]) - } - - updateEnvironmentInput( - ctx, - cmd, - args[0], - state.SecretInput(secret), - ) - }, -} - -func init() { - secretCmd.Flags().BoolP("file", "f", false, "Read value from file") - - if err := viper.BindPFlags(secretCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/input/socket.go b/cmd/dagger/cmd/input/socket.go deleted file mode 100644 index 3a6d6801..00000000 --- a/cmd/dagger/cmd/input/socket.go +++ /dev/null @@ -1,68 +0,0 @@ -package input - -import ( - "context" - "os" - "runtime" - - "github.com/rs/zerolog/log" - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" -) - -var socketCmd = &cobra.Command{ - Use: "socket ", - Short: "Add a socket input", - Args: cobra.ExactArgs(2), - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - updateEnvironmentInput( - ctx, - cmd, - args[0], - state.SocketInput(detectStreamType(ctx, args[1])), - ) - }, -} - -func detectStreamType(ctx context.Context, path string) (string, string) { - lg := log.Ctx(ctx) - - if runtime.GOOS == "windows" { - // support the unix format for convenience - if path == "/var/run/docker.sock" || path == "\\var\\run\\docker.sock" { - path = "\\\\.\\pipe\\docker_engine" - lg.Info().Str("path", path).Msg("Windows detected, override unix socket path") - } - - return path, "npipe" - } - - st, err := os.Stat(path) - if err != nil { - lg.Fatal().Err(err).Str("path", path).Msg("invalid unix socket") - } - - if st.Mode()&os.ModeSocket == 0 { - lg.Fatal().Str("path", path).Msg("not a unix socket") - } - - return path, "unix" -} - -func init() { - if err := viper.BindPFlags(boolCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/input/text.go b/cmd/dagger/cmd/input/text.go deleted file mode 100644 index bfe63cd8..00000000 --- a/cmd/dagger/cmd/input/text.go +++ /dev/null @@ -1,40 +0,0 @@ -package input - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" -) - -var textCmd = &cobra.Command{ - Use: "text [-f] ", - Short: "Add a text input", - Args: cobra.ExactArgs(2), - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - updateEnvironmentInput( - ctx, - cmd, - args[0], - state.TextInput(readInput(ctx, args[1])), - ) - }, -} - -func init() { - textCmd.Flags().BoolP("file", "f", false, "Read value from file") - - if err := viper.BindPFlags(textCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/input/unset.go b/cmd/dagger/cmd/input/unset.go deleted file mode 100644 index 26287ba5..00000000 --- a/cmd/dagger/cmd/input/unset.go +++ /dev/null @@ -1,34 +0,0 @@ -package input - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" -) - -var unsetCmd = &cobra.Command{ - Use: "unset [TARGET]", - Short: "Remove input of an environment", - Args: cobra.ExactArgs(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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - project := common.CurrentProject(ctx) - st := common.CurrentEnvironmentState(ctx, project) - st.RemoveInputs(args[0]) - - if err := project.Save(ctx, st); err != nil { - lg.Fatal().Err(err).Str("environment", st.Name).Msg("cannot update environment") - } - lg.Info().Str("environment", st.Name).Msg("updated environment") - }, -} diff --git a/cmd/dagger/cmd/input/yaml.go b/cmd/dagger/cmd/input/yaml.go deleted file mode 100644 index a4204eaa..00000000 --- a/cmd/dagger/cmd/input/yaml.go +++ /dev/null @@ -1,40 +0,0 @@ -package input - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" -) - -var yamlCmd = &cobra.Command{ - Use: "yaml [-f] ", - Short: "Add a YAML input", - Args: cobra.ExactArgs(2), - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - updateEnvironmentInput( - ctx, - cmd, - args[0], - state.YAMLInput(readInput(ctx, args[1])), - ) - }, -} - -func init() { - yamlCmd.Flags().BoolP("file", "f", false, "Read value from file") - - if err := viper.BindPFlags(yamlCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 13933ea0..7f3edecd 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -7,7 +7,6 @@ import ( "github.com/moby/buildkit/util/appcontext" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/cmd/input" "go.dagger.io/dagger/cmd/dagger/cmd/mod" "go.dagger.io/dagger/cmd/dagger/cmd/output" "go.dagger.io/dagger/cmd/dagger/logger" @@ -64,7 +63,6 @@ func init() { historyCmd, loginCmd, logoutCmd, - input.Cmd, output.Cmd, versionCmd, docCmd, From 817a73b7e0ac77691b4172c230f76e4849e1e506 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:48:35 -0700 Subject: [PATCH 03/38] Remove cmd output Signed-off-by: Joel Longtine --- cmd/dagger/cmd/output/dir.go | 33 ------------ cmd/dagger/cmd/output/list.go | 94 ----------------------------------- cmd/dagger/cmd/output/root.go | 14 ------ cmd/dagger/cmd/root.go | 2 - cmd/dagger/cmd/up.go | 3 +- 5 files changed, 1 insertion(+), 145 deletions(-) delete mode 100644 cmd/dagger/cmd/output/dir.go delete mode 100644 cmd/dagger/cmd/output/list.go delete mode 100644 cmd/dagger/cmd/output/root.go diff --git a/cmd/dagger/cmd/output/dir.go b/cmd/dagger/cmd/output/dir.go deleted file mode 100644 index b621dbc3..00000000 --- a/cmd/dagger/cmd/output/dir.go +++ /dev/null @@ -1,33 +0,0 @@ -package output - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var dirCmd = &cobra.Command{ - Use: "dir PATH", - Short: "Add a local directory as output artifact", - Args: cobra.ExactArgs(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) { - // lg := logger.New() - // ctx := lg.WithContext(cmd.Context()) - - panic("not implemented") - }, - // Remove hidden flag once command has been implemented - Hidden: true, -} - -func init() { - if err := viper.BindPFlags(dirCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/output/list.go b/cmd/dagger/cmd/output/list.go deleted file mode 100644 index 36887693..00000000 --- a/cmd/dagger/cmd/output/list.go +++ /dev/null @@ -1,94 +0,0 @@ -package output - -import ( - "context" - "fmt" - "os" - "text/tabwriter" - - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/environment" - "go.dagger.io/dagger/solver" - - "github.com/rs/zerolog/log" - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var listCmd = &cobra.Command{ - Use: "list [TARGET] [flags]", - Short: "List the outputs of an environment", - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - project := common.CurrentProject(ctx) - st := common.CurrentEnvironmentState(ctx, project) - - lg = lg.With(). - Str("environment", st.Name). - Logger() - - doneCh := common.TrackProjectCommand(ctx, cmd, project, st) - - env, err := environment.New(st) - if err != nil { - lg.Fatal().Err(err).Msg("unable to create environment") - } - - cl := common.NewClient(ctx) - err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error { - return ListOutputs(ctx, env, true) - }) - - <-doneCh - - if err != nil { - lg.Fatal().Err(err).Msg("failed to scan outputs") - } - }, -} - -func ListOutputs(ctx context.Context, env *environment.Environment, isTTY bool) error { - lg := log.Ctx(ctx).With(). - Str("environment", env.Name()). - Logger() - - outputs, err := env.ScanOutputs(ctx) - if err != nil { - lg.Error().Err(err).Msg("failed to scan outputs") - return err - } - - if !isTTY { - for _, out := range outputs { - lg.Info().Str("name", out.Path().String()). - Str("value", fmt.Sprintf("%v", out.Cue())). - Msg("output") - } - return nil - } - - w := tabwriter.NewWriter(os.Stdout, 0, 4, 2, ' ', 0) - fmt.Fprintln(w, "Output\tValue\tDescription") - - for _, out := range outputs { - fmt.Fprintf(w, "%s\t%s\t%s\n", - out.Path(), - common.FormatValue(out), - common.ValueDocOneLine(out), - ) - } - - w.Flush() - return nil -} diff --git a/cmd/dagger/cmd/output/root.go b/cmd/dagger/cmd/output/root.go deleted file mode 100644 index c765c55d..00000000 --- a/cmd/dagger/cmd/output/root.go +++ /dev/null @@ -1,14 +0,0 @@ -package output - -import "github.com/spf13/cobra" - -// Cmd exposes the top-level command -var Cmd = &cobra.Command{ - Use: "output", - Short: "Manage an environment's outputs", -} - -func init() { - // Cmd.AddCommand(dirCmd) - Cmd.AddCommand(listCmd) -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 7f3edecd..52f69fa3 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -8,7 +8,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" "go.dagger.io/dagger/cmd/dagger/cmd/mod" - "go.dagger.io/dagger/cmd/dagger/cmd/output" "go.dagger.io/dagger/cmd/dagger/logger" "go.dagger.io/dagger/keychain" @@ -63,7 +62,6 @@ func init() { historyCmd, loginCmd, logoutCmd, - output.Cmd, versionCmd, docCmd, mod.Cmd, diff --git a/cmd/dagger/cmd/up.go b/cmd/dagger/cmd/up.go index aa9ca433..bf7c15c8 100644 --- a/cmd/dagger/cmd/up.go +++ b/cmd/dagger/cmd/up.go @@ -9,7 +9,6 @@ import ( "cuelang.org/go/cue" "go.dagger.io/dagger/client" "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/cmd/output" "go.dagger.io/dagger/cmd/dagger/logger" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/environment" @@ -108,7 +107,7 @@ var upCmd = &cobra.Command{ if tty != nil { tty.Stop() } - return output.ListOutputs(ctx, env, term.IsTerminal(int(os.Stdout.Fd()))) + return nil }) <-doneCh From ecd2e2b107b24c35706f1db432cc5ca60cf7467b Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:50:45 -0700 Subject: [PATCH 04/38] Remove cmd history Signed-off-by: Joel Longtine --- cmd/dagger/cmd/history.go | 33 --------------------------------- cmd/dagger/cmd/root.go | 1 - 2 files changed, 34 deletions(-) delete mode 100644 cmd/dagger/cmd/history.go diff --git a/cmd/dagger/cmd/history.go b/cmd/dagger/cmd/history.go deleted file mode 100644 index 22fac682..00000000 --- a/cmd/dagger/cmd/history.go +++ /dev/null @@ -1,33 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var historyCmd = &cobra.Command{ - Use: "history", - Short: "List past changes to an environment", - Args: cobra.NoArgs, - 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) { - // lg := logger.New() - // ctx := lg.WithContext(cmd.Context()) - - panic("not implemented") - }, - // Remove hidden flag once command has been implemented - Hidden: true, -} - -func init() { - if err := viper.BindPFlags(historyCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 52f69fa3..5390b244 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -59,7 +59,6 @@ func init() { upCmd, downCmd, editCmd, - historyCmd, loginCmd, logoutCmd, versionCmd, From 1fe005557a41fa858af2f61381381dfcb2ed0076 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:52:05 -0700 Subject: [PATCH 05/38] Remove cmd query Signed-off-by: Joel Longtine --- cmd/dagger/cmd/query.go | 147 ---------------------------------------- cmd/dagger/cmd/root.go | 1 - 2 files changed, 148 deletions(-) delete mode 100644 cmd/dagger/cmd/query.go diff --git a/cmd/dagger/cmd/query.go b/cmd/dagger/cmd/query.go deleted file mode 100644 index 522734b8..00000000 --- a/cmd/dagger/cmd/query.go +++ /dev/null @@ -1,147 +0,0 @@ -package cmd - -import ( - "fmt" - - "cuelang.org/go/cue" - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/compiler" - - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var queryCmd = &cobra.Command{ - Use: "query [TARGET] [flags]", - Short: "Query the contents of an environment", - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - project := common.CurrentProject(ctx) - state := common.CurrentEnvironmentState(ctx, project) - - lg = lg.With(). - Str("environment", state.Name). - Logger() - - cueOpts := parseQueryFlags() - cuePath := cue.MakePath() - if len(args) > 0 { - cuePath = cue.ParsePath(args[0]) - } - - doneCh := common.TrackProjectCommand(ctx, cmd, project, state) - - cueVal := compiler.NewValue() - - if !viper.GetBool("no-plan") { - plan, err := state.CompilePlan(ctx) - if err != nil { - lg.Fatal().Err(err).Msg("failed to compile plan") - } - if err := cueVal.FillPath(cue.MakePath(), plan); err != nil { - lg.Fatal().Err(err).Msg("failed to compile plan") - } - } - - if !viper.GetBool("no-input") { - inputs, err := state.CompileInputs() - if err != nil { - lg.Fatal().Err(err).Msg("failed to compile inputs") - } - - if err := cueVal.FillPath(cue.MakePath(), inputs); err != nil { - lg.Fatal().Err(err).Msg("failed to compile inputs") - } - } - - if !viper.GetBool("no-computed") && state.Computed != "" { - computed, err := compiler.DecodeJSON("", []byte(state.Computed)) - if err != nil { - lg.Fatal().Err(err).Msg("failed to decode json") - } - if err := cueVal.FillPath(cue.MakePath(), computed); err != nil { - lg.Fatal().Err(err).Msg("failed to merge plan with computed") - } - } - - <-doneCh - - cueVal = cueVal.LookupPath(cuePath) - - if viper.GetBool("concrete") { - if err := cueVal.IsConcreteR(); err != nil { - lg.Fatal().Err(compiler.Err(err)).Msg("not concrete") - } - } - - format := viper.GetString("format") - switch format { - case "cue": - out, err := cueVal.Source(cueOpts...) - if err != nil { - lg.Fatal().Err(err).Msg("failed to lookup source") - } - fmt.Println(string(out)) - case "json": - fmt.Println(cueVal.JSON().PrettyString()) - case "yaml": - lg.Fatal().Msg("yaml format not yet implemented") - case "text": - out, err := cueVal.String() - if err != nil { - lg.Fatal().Err(err).Msg("value can't be formatted as text") - } - fmt.Println(out) - default: - lg.Fatal().Msgf("unsupported format: %q", format) - } - }, -} - -func parseQueryFlags() []cue.Option { - opts := []cue.Option{ - cue.Definitions(true), - } - - if viper.GetBool("concrete") { - opts = append(opts, cue.Concrete(true)) - } - - if viper.GetBool("show-optional") { - opts = append(opts, cue.Optional(true)) - } - - if viper.GetBool("show-attributes") { - opts = append(opts, cue.Attributes(true)) - } - - return opts -} - -func init() { - queryCmd.Flags().BoolP("concrete", "c", false, "Require the evaluation to be concrete") - queryCmd.Flags().BoolP("show-optional", "O", false, "Display optional fields (cue format only)") - queryCmd.Flags().BoolP("show-attributes", "A", false, "Display field attributes (cue format only)") - - // FIXME: implement the flags below - // queryCmd.Flags().String("revision", "latest", "Query a specific version of the environment") - queryCmd.Flags().StringP("format", "f", "json", "Output format (json|yaml|cue|text|env)") - queryCmd.Flags().BoolP("no-plan", "P", false, "Exclude plan from query") - queryCmd.Flags().BoolP("no-input", "I", false, "Exclude inputs from query") - queryCmd.Flags().BoolP("no-computed", "C", false, "Exclude computed values from query") - - if err := viper.BindPFlags(queryCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 5390b244..8e371722 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -55,7 +55,6 @@ func init() { initCmd, newCmd, listCmd, - queryCmd, upCmd, downCmd, editCmd, From 5220c6879c06aaafcb6e891ff9596d7098c35065 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:52:35 -0700 Subject: [PATCH 06/38] Remove cmd new Signed-off-by: Joel Longtine --- cmd/dagger/cmd/new.go | 53 ------------------------------------------ cmd/dagger/cmd/root.go | 1 - 2 files changed, 54 deletions(-) delete mode 100644 cmd/dagger/cmd/new.go diff --git a/cmd/dagger/cmd/new.go b/cmd/dagger/cmd/new.go deleted file mode 100644 index 1e3eba77..00000000 --- a/cmd/dagger/cmd/new.go +++ /dev/null @@ -1,53 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" -) - -var newCmd = &cobra.Command{ - Use: "new ", - Short: "Create a new empty environment", - Args: cobra.ExactArgs(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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - project := common.CurrentProject(ctx) - - if viper.GetString("environment") != "" { - lg. - Fatal(). - Msg("cannot use option -e,--environment for this command") - } - name := args[0] - - st, err := project.Create(ctx, name, state.Plan{ - Package: viper.GetString("package"), - }, viper.GetString("platform")) - - if err != nil { - lg.Fatal().Err(err).Msg("failed to create environment") - } - - <-common.TrackProjectCommand(ctx, cmd, project, st) - }, -} - -func init() { - newCmd.Flags().StringP("package", "p", "", "references the name of the Cue package within the module to use as a plan. Default: defer to cue loader") - newCmd.Flags().String("platform", "", "platform of the running pipeline. Default: host platform") - if err := viper.BindPFlags(newCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 8e371722..357a56c0 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -53,7 +53,6 @@ func init() { rootCmd.AddCommand( initCmd, - newCmd, listCmd, upCmd, downCmd, From a3f91023a15128ee5e434df10560b33945485809 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:53:13 -0700 Subject: [PATCH 07/38] Remove cmd edit Signed-off-by: Joel Longtine --- cmd/dagger/cmd/edit.go | 146 ----------------------------------------- cmd/dagger/cmd/root.go | 1 - 2 files changed, 147 deletions(-) delete mode 100644 cmd/dagger/cmd/edit.go diff --git a/cmd/dagger/cmd/edit.go b/cmd/dagger/cmd/edit.go deleted file mode 100644 index a80a2343..00000000 --- a/cmd/dagger/cmd/edit.go +++ /dev/null @@ -1,146 +0,0 @@ -package cmd - -import ( - "context" - "fmt" - "os" - "os/exec" - "strings" - - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/environment" - "go.dagger.io/dagger/solver" - "go.dagger.io/dagger/state" - - "github.com/google/shlex" - "github.com/spf13/cobra" - "github.com/spf13/viper" - "gopkg.in/yaml.v3" -) - -var editCmd = &cobra.Command{ - Use: "edit", - Short: "Interactively edit an environment", - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - project := common.CurrentProject(ctx) - st := common.CurrentEnvironmentState(ctx, project) - - lg = lg.With(). - Str("environment", st.Name). - Logger() - - doneCh := common.TrackProjectCommand(ctx, cmd, project, st) - - data, err := yaml.Marshal(st) - if err != nil { - lg.Fatal().Err(err).Msg("unable to marshal state") - } - - f, err := os.CreateTemp("", fmt.Sprintf("%s-*.yaml", st.Name)) - if err != nil { - lg.Fatal().Err(err).Msg("failed to create temporary file") - } - tmpPath := f.Name() - defer os.Remove(tmpPath) - - if _, err := f.Write(data); err != nil { - lg.Fatal().Err(err).Msg("unable to write file") - } - f.Close() - - if err := runEditor(ctx, tmpPath); err != nil { - lg.Fatal().Err(err).Msg("failed to start editor") - } - - data, err = os.ReadFile(tmpPath) - if err != nil { - lg.Fatal().Err(err).Msg("failed to read temporary file") - } - var newState state.State - if err := yaml.Unmarshal(data, &newState); err != nil { - lg.Fatal().Err(err).Msg("failed to decode file") - } - st.Name = newState.Name - st.Platform = newState.Platform - st.Plan = newState.Plan - st.Inputs = newState.Inputs - - env, err := environment.New(st) - if err != nil { - lg.Fatal().Err(err).Msg("unable to create environment") - } - - cl := common.NewClient(ctx) - err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error { - // check for cue errors by scanning all the inputs - _, err := env.ScanInputs(ctx, true) - if err != nil { - return err - } - return nil - }) - - <-doneCh - - if err != nil { - lg.Fatal().Err(err).Str("environment", st.Name).Msg("invalid input") - } - - if err := project.Save(ctx, st); err != nil { - lg.Fatal().Err(err).Msg("failed to save state") - } - }, -} - -func runEditor(ctx context.Context, path string) error { - editor := os.Getenv("EDITOR") - var cmd *exec.Cmd - if editor == "" { - editor, err := lookupAnyEditor("vim", "nano", "vi") - if err != nil { - return err - } - cmd = exec.CommandContext(ctx, editor, path) - } else { - parts, err := shlex.Split(editor) - if err != nil { - return fmt.Errorf("invalid $EDITOR: %s", editor) - } - parts = append(parts, path) - cmd = exec.CommandContext(ctx, parts[0], parts[1:]...) // #nosec - } - - cmd.Env = os.Environ() - cmd.Stdin = os.Stdin - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - return cmd.Run() -} - -func lookupAnyEditor(editorNames ...string) (editorPath string, err error) { - for _, editorName := range editorNames { - editorPath, err = exec.LookPath(editorName) - if err == nil { - return editorPath, nil - } - } - return "", fmt.Errorf("no editor available: dagger attempts to use the editor defined in the EDITOR environment variable, and if that's not set defaults to any of %s, but none of them could be found", strings.Join(editorNames, ", ")) -} - -func init() { - if err := viper.BindPFlags(editCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 357a56c0..90d42a57 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -56,7 +56,6 @@ func init() { listCmd, upCmd, downCmd, - editCmd, loginCmd, logoutCmd, versionCmd, From 59e97dd201acd20ae8777367a6ce219ceeea5de7 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:54:49 -0700 Subject: [PATCH 08/38] Remove cmd down Signed-off-by: Joel Longtine --- cmd/dagger/cmd/down.go | 32 -------------------------------- cmd/dagger/cmd/root.go | 1 - 2 files changed, 33 deletions(-) delete mode 100644 cmd/dagger/cmd/down.go diff --git a/cmd/dagger/cmd/down.go b/cmd/dagger/cmd/down.go deleted file mode 100644 index 398ade87..00000000 --- a/cmd/dagger/cmd/down.go +++ /dev/null @@ -1,32 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var downCmd = &cobra.Command{ - Use: "down", - Short: "Take an environment offline (WARNING: may destroy infrastructure)", - Args: cobra.NoArgs, - 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) { - panic("not implemented") - }, - // Remove hidden flag once command has been implemented - Hidden: true, -} - -func init() { - downCmd.Flags().Bool("no-cache", false, "Disable all run cache") - - if err := viper.BindPFlags(downCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 90d42a57..0f9c2327 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -55,7 +55,6 @@ func init() { initCmd, listCmd, upCmd, - downCmd, loginCmd, logoutCmd, versionCmd, From 3863477da0e2e2eb42b8e2d56e87da766412becf Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:55:18 -0700 Subject: [PATCH 09/38] Remove cmd login/logout Signed-off-by: Joel Longtine --- cmd/dagger/cmd/login.go | 33 --------------------------------- cmd/dagger/cmd/logout.go | 33 --------------------------------- cmd/dagger/cmd/root.go | 2 -- 3 files changed, 68 deletions(-) delete mode 100644 cmd/dagger/cmd/login.go delete mode 100644 cmd/dagger/cmd/logout.go diff --git a/cmd/dagger/cmd/login.go b/cmd/dagger/cmd/login.go deleted file mode 100644 index 74105901..00000000 --- a/cmd/dagger/cmd/login.go +++ /dev/null @@ -1,33 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var loginCmd = &cobra.Command{ - Use: "login", - Short: "Login to Dagger Cloud", - Args: cobra.NoArgs, - 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) { - // lg := logger.New() - // ctx := lg.WithContext(cmd.Context()) - - panic("not implemented") - }, - // Remove hidden flag once command has been implemented - Hidden: true, -} - -func init() { - if err := viper.BindPFlags(loginCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/logout.go b/cmd/dagger/cmd/logout.go deleted file mode 100644 index 62b5f0a7..00000000 --- a/cmd/dagger/cmd/logout.go +++ /dev/null @@ -1,33 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var logoutCmd = &cobra.Command{ - Use: "logout", - Short: "Logout from Dagger Cloud", - Args: cobra.NoArgs, - 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) { - // lg := logger.New() - // ctx := lg.WithContext(cmd.Context()) - - panic("not implemented") - }, - // Remove hidden flag once command has been implemented - Hidden: true, -} - -func init() { - if err := viper.BindPFlags(logoutCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 0f9c2327..4629babf 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -55,8 +55,6 @@ func init() { initCmd, listCmd, upCmd, - loginCmd, - logoutCmd, versionCmd, docCmd, mod.Cmd, From c971077222622010aa22e551dd5ad852a3e23faa Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 14:58:23 -0700 Subject: [PATCH 10/38] Remove cmd list Signed-off-by: Joel Longtine --- cmd/dagger/cmd/list.go | 71 ------------------------------------------ cmd/dagger/cmd/root.go | 1 - 2 files changed, 72 deletions(-) delete mode 100644 cmd/dagger/cmd/list.go diff --git a/cmd/dagger/cmd/list.go b/cmd/dagger/cmd/list.go deleted file mode 100644 index ac27b1f0..00000000 --- a/cmd/dagger/cmd/list.go +++ /dev/null @@ -1,71 +0,0 @@ -package cmd - -import ( - "fmt" - "os" - "path" - "strings" - "text/tabwriter" - - "github.com/mitchellh/go-homedir" - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/cmd/common" - "go.dagger.io/dagger/cmd/dagger/logger" -) - -var listCmd = &cobra.Command{ - Use: "list", - Short: "List available environments", - Args: cobra.NoArgs, - 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) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - - project := common.CurrentProject(ctx) - doneCh := common.TrackProjectCommand(ctx, cmd, project, nil) - - environments, err := project.List(ctx) - if err != nil { - lg. - Fatal(). - Err(err). - Msg("cannot list environments") - } - - w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', tabwriter.TabIndent) - defer w.Flush() - for _, e := range environments { - line := fmt.Sprintf("%s\t%s\t", e.Name, formatPath(e.Path)) - fmt.Fprintln(w, line) - } - - <-doneCh - }, -} - -func formatPath(p string) string { - dir, err := homedir.Dir() - if err != nil { - // Ignore error - return p - } - - if strings.HasPrefix(p, dir) { - return path.Join("~", p[len(dir):]) - } - return p -} - -func init() { - if err := viper.BindPFlags(listCmd.Flags()); err != nil { - panic(err) - } -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 4629babf..23820e4f 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -53,7 +53,6 @@ func init() { rootCmd.AddCommand( initCmd, - listCmd, upCmd, versionCmd, docCmd, From 034cd74ed06cc7174640de65b8d997109a437f69 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:00:38 -0700 Subject: [PATCH 11/38] Remove environment Signed-off-by: Joel Longtine --- cmd/dagger/cmd/doc.go | 26 - cmd/dagger/cmd/up.go | 106 -- cmd/dagger/logger/tty.go | 42 +- environment/environment.go | 212 ---- environment/inputs_scan.go | 82 -- environment/pipeline.go | 1248 ----------------------- plan/plan.go | 9 +- plan/task/pipeline.go | 27 - plan/task/task.go | 17 +- tests/tasks/pull/cue.mod/pkg/.gitignore | 4 +- 10 files changed, 38 insertions(+), 1735 deletions(-) delete mode 100644 environment/environment.go delete mode 100644 environment/inputs_scan.go delete mode 100644 environment/pipeline.go delete mode 100644 plan/task/pipeline.go diff --git a/cmd/dagger/cmd/doc.go b/cmd/dagger/cmd/doc.go index 48025d42..38ae93bb 100644 --- a/cmd/dagger/cmd/doc.go +++ b/cmd/dagger/cmd/doc.go @@ -20,7 +20,6 @@ import ( "go.dagger.io/dagger/cmd/dagger/cmd/common" "go.dagger.io/dagger/cmd/dagger/logger" "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/environment" "go.dagger.io/dagger/pkg" "golang.org/x/term" ) @@ -55,23 +54,6 @@ type Package struct { func Parse(ctx context.Context, packageName string, val *compiler.Value) *Package { lg := log.Ctx(ctx) - parseValues := func(field string, values []*compiler.Value) []Value { - val := []Value{} - - for _, i := range values { - v := Value{} - v.Name = strings.TrimPrefix( - i.Path().String(), - field+".", - ) - v.Type = common.FormatValue(i) - v.Description = common.ValueDocOneLine(i) - val = append(val, v) - } - - return val - } - fields, err := val.Fields(cue.Definitions(true)) if err != nil { lg.Fatal().Err(err).Msg("cannot get fields") @@ -104,14 +86,6 @@ func Parse(ctx context.Context, packageName string, val *compiler.Value) *Packag field.Name = name field.Description = common.ValueDocOneLine(v) - // Inputs - inp := environment.ScanInputs(ctx, v) - field.Inputs = parseValues(field.Name, inp) - - // Outputs - out := environment.ScanOutputs(ctx, v) - field.Outputs = parseValues(field.Name, out) - pkg.Fields = append(pkg.Fields, field) } diff --git a/cmd/dagger/cmd/up.go b/cmd/dagger/cmd/up.go index bf7c15c8..f1123507 100644 --- a/cmd/dagger/cmd/up.go +++ b/cmd/dagger/cmd/up.go @@ -2,19 +2,14 @@ package cmd import ( "context" - "errors" "fmt" "os" - "cuelang.org/go/cue" "go.dagger.io/dagger/client" "go.dagger.io/dagger/cmd/dagger/cmd/common" "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/environment" "go.dagger.io/dagger/mod" "go.dagger.io/dagger/plan" - "go.dagger.io/dagger/plancontext" "go.dagger.io/dagger/solver" "golang.org/x/term" @@ -68,58 +63,6 @@ var upCmd = &cobra.Command{ return } - project := common.CurrentProject(ctx) - st := common.CurrentEnvironmentState(ctx, project) - - lg = lg.With(). - Str("environment", st.Name). - Logger() - - universeUpdateCh := make(chan bool) - go func() { - universeUpdateCh <- checkUniverseVersion(ctx, project.Path) - }() - - doneCh := common.TrackProjectCommand(ctx, cmd, project, st) - - env, err := environment.New(st) - if err != nil { - lg.Fatal().Err(err).Msg("unable to create environment") - } - - err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error { - // check that all inputs are set - if err := checkInputs(ctx, env); err != nil { - return err - } - - if err := env.Up(ctx, s); err != nil { - return err - } - - st.Computed = env.Computed().JSON().PrettyString() - if err := project.Save(ctx, st); err != nil { - return err - } - - // FIXME: `ListOutput` is printing to Stdout directly which messes - // up the TTY logger. - if tty != nil { - tty.Stop() - } - return nil - }) - - <-doneCh - - if err != nil { - lg.Fatal().Err(err).Msg("failed to up environment") - } - - // Warn universe version if out of date - if update := <-universeUpdateCh; update { - fmt.Println("A new version of universe is available, please run 'dagger mod get alpha.dagger.io'") - } }, } @@ -173,57 +116,8 @@ func europaUp(ctx context.Context, cl *client.Client, args ...string) error { }) } -func checkInputs(ctx context.Context, env *environment.Environment) error { - lg := log.Ctx(ctx) - warnOnly := viper.GetBool("force") - - notConcreteInputs := []*compiler.Value{} - inputs, err := env.ScanInputs(ctx, true) - if err != nil { - lg.Error().Err(err).Msg("failed to scan inputs") - return err - } - - for _, i := range inputs { - isConcrete := (i.IsConcreteR(cue.Optional(true)) == nil) - switch { - case plancontext.IsSecretValue(i): - if _, err := env.Context().Secrets.FromValue(i); err != nil { - isConcrete = false - } - case plancontext.IsFSValue(i): - if _, err := env.Context().FS.FromValue(i); err != nil { - isConcrete = false - } - case plancontext.IsServiceValue(i): - if _, err := env.Context().Services.FromValue(i); err != nil { - isConcrete = false - } - } - - if !isConcrete { - notConcreteInputs = append(notConcreteInputs, i) - } - } - - for _, i := range notConcreteInputs { - if warnOnly { - lg.Warn().Str("input", i.Path().String()).Msg("required input is missing") - } else { - lg.Error().Str("input", i.Path().String()).Msg("required input is missing") - } - } - - if !warnOnly && len(notConcreteInputs) > 0 { - return errors.New("some required inputs are not set, please re-run with `--force` if you think it's a mistake") - } - - return nil -} - func init() { upCmd.Flags().BoolP("force", "f", false, "Force up, disable inputs check") - upCmd.Flags().String("output", "", "Write computed output. Prints on stdout if set to-") upCmd.Flags().StringArrayP("with", "w", []string{}, "") upCmd.Flags().StringP("target", "t", "", "Run a single target of the DAG (for debugging only)") upCmd.Flags().Bool("no-vendor", false, "Force up, disable inputs check") diff --git a/cmd/dagger/logger/tty.go b/cmd/dagger/logger/tty.go index 6fa22a41..a1bb958a 100644 --- a/cmd/dagger/logger/tty.go +++ b/cmd/dagger/logger/tty.go @@ -14,14 +14,14 @@ import ( "github.com/containerd/console" "github.com/morikuni/aec" "github.com/tonistiigi/vt100" - "go.dagger.io/dagger/environment" + "go.dagger.io/dagger/plan/task" ) type Event map[string]interface{} type Group struct { Name string - State environment.State + State task.State Events []Event Started *time.Time Completed *time.Time @@ -43,7 +43,7 @@ func (l *Logs) Add(event Event) error { l.l.Lock() defer l.l.Unlock() - task, ok := event["task"].(string) + taskPath, ok := event["task"].(string) if !ok { l.Messages = append(l.Messages, Message{ Event: event, @@ -52,12 +52,8 @@ func (l *Logs) Add(event Event) error { return nil } - // Hide `#up.*` from log group names - // FIXME: remove in Europa - groupKey := strings.Split(task, ".#up")[0] - // Hide hidden fields (e.g. `._*`) from log group names - groupKey = strings.Split(groupKey, "._")[0] + groupKey := strings.Split(taskPath, "._")[0] group := l.groups[groupKey] @@ -82,8 +78,8 @@ func (l *Logs) Add(event Event) error { // For each task in a group, the status will transition from computing to complete, then back to computing and so on. // The transition is fast enough not to cause a problem. if st, ok := event["state"].(string); ok { - group.State = environment.State(st) - if group.State == environment.StateComputing { + group.State = task.State(st) + if group.State == task.StateComputing { group.Completed = nil } else { now := time.Now() @@ -228,7 +224,7 @@ func (c *TTYOutput) linesPerGroup(width, height int) int { runningGroups := 0 for _, message := range c.logs.Messages { - if group := message.Group; group != nil && group.State == environment.StateComputing { + if group := message.Group; group != nil && group.State == task.StateComputing { runningGroups++ } } @@ -268,13 +264,13 @@ func (c *TTYOutput) printGroup(group *Group, width, maxLines int) int { prefix := "" switch group.State { - case environment.StateComputing: + case task.StateComputing: prefix = "[+]" - case environment.StateCanceled: + case task.StateCanceled: prefix = "[✗]" - case environment.StateFailed: + case task.StateFailed: prefix = "[✗]" - case environment.StateCompleted: + case task.StateCompleted: prefix = "[✔]" } @@ -298,13 +294,13 @@ func (c *TTYOutput) printGroup(group *Group, width, maxLines int) int { // color switch group.State { - case environment.StateComputing: + case task.StateComputing: out = aec.Apply(out, aec.LightBlueF) - case environment.StateCanceled: + case task.StateCanceled: out = aec.Apply(out, aec.LightYellowF) - case environment.StateFailed: + case task.StateFailed: out = aec.Apply(out, aec.LightRedF) - case environment.StateCompleted: + case task.StateCompleted: out = aec.Apply(out, aec.LightGreenF) } @@ -314,19 +310,19 @@ func (c *TTYOutput) printGroup(group *Group, width, maxLines int) int { printEvents := []Event{} switch group.State { - case environment.StateComputing: + case task.StateComputing: printEvents = group.Events // for computing tasks, show only last N if len(printEvents) > maxLines { printEvents = printEvents[len(printEvents)-maxLines:] } - case environment.StateCanceled: + case task.StateCanceled: // for completed tasks, don't show any logs printEvents = []Event{} - case environment.StateFailed: + case task.StateFailed: // for failed, show all logs printEvents = group.Events - case environment.StateCompleted: + case task.StateCompleted: // for completed tasks, don't show any logs printEvents = []Event{} } diff --git a/environment/environment.go b/environment/environment.go deleted file mode 100644 index fe4b4609..00000000 --- a/environment/environment.go +++ /dev/null @@ -1,212 +0,0 @@ -package environment - -import ( - "context" - "fmt" - - "cuelang.org/go/cue" - cueflow "cuelang.org/go/tools/flow" - "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/plancontext" - "go.dagger.io/dagger/solver" - "go.dagger.io/dagger/state" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" - - "github.com/rs/zerolog/log" -) - -type Environment struct { - state *state.State - - // Layer 1: plan configuration - plan *compiler.Value - - // Layer 2: user inputs - input *compiler.Value - - // plan + inputs - src *compiler.Value - - // Layer 3: computed values - computed *compiler.Value -} - -func New(st *state.State) (*Environment, error) { - var err error - - e := &Environment{ - state: st, - } - - e.plan, err = st.CompilePlan(context.TODO()) - if err != nil { - return nil, err - } - - e.input, err = st.CompileInputs() - if err != nil { - return nil, err - } - - e.computed = compiler.NewValue() - - e.src = compiler.NewValue() - if err := e.src.FillPath(cue.MakePath(), e.plan); err != nil { - return nil, err - } - if err := e.src.FillPath(cue.MakePath(), e.input); err != nil { - return nil, err - } - - return e, nil -} - -func (e *Environment) Name() string { - return e.state.Name -} - -func (e *Environment) Computed() *compiler.Value { - return e.computed -} - -func (e *Environment) Context() *plancontext.Context { - return e.state.Context -} - -// Up missing values in environment configuration, and write them to state. -func (e *Environment) Up(ctx context.Context, s solver.Solver) error { - ctx, span := otel.Tracer("dagger").Start(ctx, "environment.Up") - defer span.End() - - // Orchestrate execution with cueflow - flow := cueflow.New( - &cueflow.Config{}, - e.src.Cue(), - newTaskFunc(newPipelineRunner(e.computed, s, e.state.Context)), - ) - if err := flow.Run(ctx); err != nil { - return err - } - - // FIXME: canceling the context makes flow return `nil` - // Check explicitly if the context is canceled. - select { - case <-ctx.Done(): - return ctx.Err() - default: - return nil - } -} - -type DownOpts struct{} - -func (e *Environment) Down(ctx context.Context, _ *DownOpts) error { - panic("NOT IMPLEMENTED") -} - -type QueryOpts struct{} - -func newTaskFunc(runner cueflow.RunnerFunc) cueflow.TaskFunc { - return func(flowVal cue.Value) (cueflow.Runner, error) { - v := compiler.Wrap(flowVal) - if !IsComponent(v) { - // No compute script - return nil, nil - } - return runner, nil - } -} - -func newPipelineRunner(computed *compiler.Value, s solver.Solver, pctx *plancontext.Context) cueflow.RunnerFunc { - return cueflow.RunnerFunc(func(t *cueflow.Task) error { - ctx := t.Context() - lg := log. - Ctx(ctx). - With(). - Str("task", t.Path().String()). - Logger() - ctx = lg.WithContext(ctx) - - ctx, span := otel.Tracer("dagger").Start(ctx, fmt.Sprintf("compute: %s", t.Path().String())) - defer span.End() - - for _, dep := range t.Dependencies() { - lg. - Debug(). - Str("dependency", dep.Path().String()). - Msg("dependency detected") - } - v := compiler.Wrap(t.Value()) - - p := NewPipeline(v, s, pctx) - err := p.Run(ctx) - if err != nil { - // Record the error - span.AddEvent("command", trace.WithAttributes( - attribute.String("error", err.Error()), - )) - - return err - } - - // Mirror the computed values in both `Task` and `Result` - if !p.Computed().IsConcrete() { - return nil - } - - if err := t.Fill(p.Computed().Cue()); err != nil { - lg. - Error(). - Err(err). - Msg("failed to fill task") - return err - } - - // Merge task value into output - if err := computed.FillPath(t.Path(), p.Computed()); err != nil { - lg. - Error(). - Err(err). - Msg("failed to fill task result") - return err - } - - return nil - }) -} - -func (e *Environment) ScanInputs(ctx context.Context, mergeUserInputs bool) ([]*compiler.Value, error) { - src := e.plan - - if mergeUserInputs { - src = e.src - } - - return ScanInputs(ctx, src), nil -} - -func (e *Environment) ScanOutputs(ctx context.Context) ([]*compiler.Value, error) { - src := compiler.NewValue() - if err := src.FillPath(cue.MakePath(), e.plan); err != nil { - return nil, err - } - if err := src.FillPath(cue.MakePath(), e.input); err != nil { - return nil, err - } - - if e.state.Computed != "" { - computed, err := compiler.DecodeJSON("", []byte(e.state.Computed)) - if err != nil { - return nil, err - } - - if err := src.FillPath(cue.MakePath(), computed); err != nil { - return nil, err - } - } - - return ScanOutputs(ctx, src), nil -} diff --git a/environment/inputs_scan.go b/environment/inputs_scan.go deleted file mode 100644 index ddb6d91d..00000000 --- a/environment/inputs_scan.go +++ /dev/null @@ -1,82 +0,0 @@ -package environment - -import ( - "context" - - "cuelang.org/go/cue" - "go.dagger.io/dagger/compiler" -) - -func isReference(val cue.Value) bool { - isRef := func(v cue.Value) bool { - _, ref := v.ReferencePath() - - if ref.String() == "" || v.Path().String() == ref.String() { - // not a reference - return false - } - - for _, s := range ref.Selectors() { - if s.IsDefinition() { - // if we reference to a definition, we skip the check - return false - } - } - - return true - } - - op, vals := val.Expr() - if op == cue.NoOp { - return isRef(val) - } - - for _, v := range vals { - // if the expr has an op (& or |, etc...), check the expr values, recursively - if isReference(v) { - return true - } - } - - return isRef(val) -} - -func ScanInputs(ctx context.Context, value *compiler.Value) []*compiler.Value { - inputs := []*compiler.Value{} - - value.Walk( - func(val *compiler.Value) bool { - if isReference(val.Cue()) { - return false - } - - if !val.HasAttr("input") { - return true - } - - inputs = append(inputs, val) - - return true - }, nil, - ) - - return inputs -} - -func ScanOutputs(ctx context.Context, value *compiler.Value) []*compiler.Value { - inputs := []*compiler.Value{} - - value.Walk( - func(val *compiler.Value) bool { - if !val.HasAttr("output") { - return true - } - - inputs = append(inputs, val) - - return true - }, nil, - ) - - return inputs -} diff --git a/environment/pipeline.go b/environment/pipeline.go deleted file mode 100644 index 6e5f08f2..00000000 --- a/environment/pipeline.go +++ /dev/null @@ -1,1248 +0,0 @@ -package environment - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "io/fs" - "net" - "net/url" - "strings" - "time" - - "cuelang.org/go/cue" - bkplatforms "github.com/containerd/containerd/platforms" - "github.com/docker/distribution/reference" - bk "github.com/moby/buildkit/client" - "github.com/moby/buildkit/client/llb" - "github.com/moby/buildkit/exporter/containerimage/exptypes" - dockerfilebuilder "github.com/moby/buildkit/frontend/dockerfile/builder" - "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb" - bkgw "github.com/moby/buildkit/frontend/gateway/client" - bkpb "github.com/moby/buildkit/solver/pb" - digest "github.com/opencontainers/go-digest" - "github.com/rs/zerolog/log" - "gopkg.in/yaml.v3" - - "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/plancontext" - "go.dagger.io/dagger/solver" -) - -type State string - -const ( - StateComputing = State("computing") - StateCanceled = State("canceled") - StateFailed = State("failed") - StateCompleted = State("completed") -) - -// An execution pipeline -type Pipeline struct { - code *compiler.Value - name string - s solver.Solver - state llb.State - pctx *plancontext.Context - result bkgw.Reference - image dockerfile2llb.Image - computed *compiler.Value -} - -func NewPipeline(code *compiler.Value, s solver.Solver, pctx *plancontext.Context) *Pipeline { - return &Pipeline{ - code: code, - name: code.Path().String(), - pctx: pctx, - s: s, - state: llb.Scratch(), - computed: compiler.NewValue(), - } -} - -func (p *Pipeline) WithCustomName(name string) *Pipeline { - p.name = name - return p -} - -func (p *Pipeline) State() llb.State { - return p.state -} - -func (p *Pipeline) Result() (llb.State, error) { - if p.result == nil { - return llb.Scratch(), nil - } - return p.result.ToState() -} - -func (p *Pipeline) FS() fs.FS { - return solver.NewBuildkitFS(p.result) -} - -func (p *Pipeline) ImageConfig() dockerfile2llb.Image { - return p.image -} - -func (p *Pipeline) Computed() *compiler.Value { - return p.computed -} - -func IsComponent(v *compiler.Value) bool { - return v.Lookup("#up").Exists() -} - -func (p *Pipeline) ops() ([]*compiler.Value, error) { - ops := []*compiler.Value{} - - // dagger.#FS forward compat - // FIXME: remove this - if plancontext.IsFSValue(p.code) { - ops = append(ops, p.code) - } - - // 1. attachment array - if IsComponent(p.code) { - xops, err := p.code.Lookup("#up").List() - if err != nil { - return nil, err - } - // 'from' has an executable attached - ops = append(ops, xops...) - // 2. individual op - } else if _, err := p.code.Lookup("do").String(); err == nil { - ops = append(ops, p.code) - // 3. op array - } else if xops, err := p.code.List(); err == nil { - ops = append(ops, xops...) - } else { - // 4. error - source, err := p.code.Source() - if err != nil { - panic(err) - } - return nil, fmt.Errorf("not executable: %s (%s)", source, p.code.Path().String()) - } - return ops, nil -} - -func (p *Pipeline) Run(ctx context.Context) error { - lg := log. - Ctx(ctx). - With(). - Str("task", p.name). - Logger() - - start := time.Now() - - lg. - Info(). - Str("state", string(StateComputing)). - Msg(string(StateComputing)) - - err := p.run(ctx) - - if err != nil { - // FIXME: this should use errdefs.IsCanceled(err) - if strings.Contains(err.Error(), "context canceled") { - lg. - Error(). - Dur("duration", time.Since(start)). - Str("state", string(StateCanceled)). - Msg(string(StateCanceled)) - } else { - lg. - Error(). - Dur("duration", time.Since(start)). - Err(err). - Str("state", string(StateFailed)). - Msg(string(StateFailed)) - } - return err - } - - lg. - Info(). - Dur("duration", time.Since(start)). - Str("state", string(StateCompleted)). - Msg(string(StateCompleted)) - return nil -} - -func (p *Pipeline) run(ctx context.Context) error { - ops, err := p.ops() - if err != nil { - return err - } - - // Execute each operation in sequence - for idx, op := range ops { - // If op not concrete, interrupt without error. - // This allows gradual resolution: - // compute what you can compute.. leave the rest incomplete. - if err := op.IsConcreteR(); err != nil { - log. - Ctx(ctx). - Warn(). - Str("original_cue_error", err.Error()). - Int("op", idx). - Msg("pipeline was partially executed because of missing inputs") - return nil - } - p.state, err = p.doOp(ctx, op, p.state) - if err != nil { - return err - } - // Force a buildkit solve request at each operation, - // so that errors map to the correct cue path. - // FIXME: might as well change FS to make every operation - // synchronous. - p.result, err = p.s.Solve(ctx, p.state, p.pctx.Platform.Get()) - if err != nil { - return err - } - } - - return nil -} - -func (p *Pipeline) doOp(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - // dagger.#FS forward compat - // FIXME: remove this - if plancontext.IsFSValue(op) { - fs, err := p.pctx.FS.FromValue(op) - if err != nil { - return st, nil - } - return fs.State() - } - - do, err := op.Lookup("do").String() - if err != nil { - return st, err - } - // FIXME: make this more readable then promote to INFO - // we need a readable trace of what operations are executed. - log. - Ctx(ctx). - Debug(). - Str("pipeline", p.name). - Str("do", do). - Msg("executing operation") - switch do { - case "copy": - return p.Copy(ctx, op, st) - case "exec": - return p.Exec(ctx, op, st) - case "export": - return p.Export(ctx, op, st) - case "docker-login": - return p.DockerLogin(ctx, op, st) - case "fetch-container": - return p.FetchContainer(ctx, op, st) - case "push-container": - return p.PushContainer(ctx, op, st) - case "save-image": - return p.SaveImage(ctx, op, st) - case "fetch-git": - return p.FetchGit(ctx, op, st) - case "fetch-http": - return p.FetchHTTP(ctx, op, st) - case "local": - return p.Local(ctx, op, st) - case "load": - return p.Load(ctx, op, st) - case "workdir": - return p.Workdir(ctx, op, st) - case "subdir": - return p.Subdir(ctx, op, st) - case "docker-build": - return p.DockerBuild(ctx, op, st) - case "write-file": - return p.WriteFile(ctx, op, st) - case "mkdir": - return p.Mkdir(ctx, op, st) - default: - return st, fmt.Errorf("invalid operation: %s", op.JSON()) - } -} - -func (p *Pipeline) vertexNamef(format string, a ...interface{}) string { - prefix := fmt.Sprintf("@%s@", p.name) - name := fmt.Sprintf(format, a...) - return prefix + " " + name -} - -func (p *Pipeline) Workdir(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - path, err := op.Lookup("path").String() - if err != nil { - return st, err - } - return st.Dir(path), nil -} - -func (p *Pipeline) Subdir(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - // FIXME: this could be more optimized by carrying subdir path as metadata, - // and using it in copy, load or mount. - - dir, err := op.Lookup("dir").String() - if err != nil { - return st, err - } - return llb.Scratch().File( - llb.Copy( - st, - dir, - "/", - &llb.CopyInfo{ - CopyDirContentsOnly: true, - }, - ), - llb.WithCustomName(p.vertexNamef("Subdir %s", dir)), - ), nil -} - -func (p *Pipeline) Copy(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - // Decode copy options - src, err := op.Lookup("src").String() - if err != nil { - return st, err - } - dest, err := op.Lookup("dest").String() - if err != nil { - return st, err - } - // Execute 'from' in a tmp pipeline, and use the resulting fs - from := NewPipeline(op.Lookup("from"), p.s, p.pctx) - if err := from.Run(ctx); err != nil { - return st, err - } - return st.File( - llb.Copy( - from.State(), - src, - dest, - // FIXME: allow more configurable llb options - // For now we define the following convenience presets: - &llb.CopyInfo{ - CopyDirContentsOnly: true, - CreateDestPath: true, - AllowWildcard: true, - }, - ), - llb.WithCustomName(p.vertexNamef("Copy %s %s", src, dest)), - ), nil -} - -func (p *Pipeline) Local(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - dir, err := op.Lookup("dir").String() - if err != nil { - return st, err - } - - opts := []llb.LocalOption{ - llb.WithCustomName(p.vertexNamef("Local %s", dir)), - // Without hint, multiple `llb.Local` operations on the - // same path get a different digest. - llb.SessionID(p.s.SessionID()), - llb.SharedKeyHint(dir), - } - - includes, err := op.Lookup("include").List() - if err != nil { - return st, err - } - if len(includes) > 0 { - includePatterns := []string{} - for _, i := range includes { - pattern, err := i.String() - if err != nil { - return st, err - } - includePatterns = append(includePatterns, pattern) - } - opts = append(opts, llb.IncludePatterns(includePatterns)) - } - - excludes, err := op.Lookup("exclude").List() - if err != nil { - return st, err - } - // Excludes .dagger directory by default - excludePatterns := []string{"**/.dagger/"} - if len(excludes) > 0 { - for _, i := range excludes { - pattern, err := i.String() - if err != nil { - return st, err - } - excludePatterns = append(excludePatterns, pattern) - } - } - opts = append(opts, llb.ExcludePatterns(excludePatterns)) - - // FIXME: Remove the `Copy` and use `Local` directly. - // - // Copy'ing is a costly operation which should be unnecessary. - // However, using llb.Local directly breaks caching sometimes for unknown reasons. - return st.File( - llb.Copy( - llb.Local( - dir, - opts..., - ), - "/", - "/", - ), - llb.WithCustomName(p.vertexNamef("Local %s [copy]", dir)), - ), nil -} - -func (p *Pipeline) Exec(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - opts := []llb.RunOption{} - var cmd struct { - Args []string - Dir string - Always bool - } - - if err := op.Decode(&cmd); err != nil { - return st, err - } - // args - opts = append(opts, llb.Args(cmd.Args)) - // dir - opts = append(opts, llb.Dir(cmd.Dir)) - - // env - if env := op.Lookup("env"); env.Exists() { - envs, err := op.Lookup("env").Fields() - if err != nil { - return st, err - } - for _, env := range envs { - v, err := env.Value.String() - if err != nil { - return st, err - } - opts = append(opts, llb.AddEnv(env.Label(), v)) - } - } - - // always? - if cmd.Always { - // FIXME: also disables persistent cache directories - // There's an ongoing proposal that would fix this: https://github.com/moby/buildkit/issues/1213 - opts = append(opts, llb.IgnoreCache) - } - - if hosts := op.Lookup("hosts"); hosts.Exists() { - fields, err := hosts.Fields() - if err != nil { - return st, err - } - for _, host := range fields { - s, err := host.Value.String() - if err != nil { - return st, err - } - - if err != nil { - return st, err - } - opts = append(opts, llb.AddExtraHost(host.Label(), net.ParseIP(s))) - } - } - - if user := op.Lookup("user"); user.Exists() { - u, err := user.String() - if err != nil { - return st, err - } - opts = append(opts, llb.User(u)) - } - - // mounts - if mounts := op.Lookup("mount"); mounts.Exists() { - mntOpts, err := p.mountAll(ctx, mounts) - if err != nil { - return st, err - } - opts = append(opts, mntOpts...) - } - - // marker for status events - // FIXME - args := make([]string, 0, len(cmd.Args)) - for _, a := range cmd.Args { - args = append(args, fmt.Sprintf("%q", a)) - } - opts = append(opts, llb.WithCustomName(p.vertexNamef("Exec [%s]", strings.Join(args, ", ")))) - - // --> Execute - return st.Run(opts...).Root(), nil -} - -func (p *Pipeline) mountAll(ctx context.Context, mounts *compiler.Value) ([]llb.RunOption, error) { - opts := []llb.RunOption{} - fields, err := mounts.Fields() - if err != nil { - return nil, err - } - for _, mnt := range fields { - o, err := p.mount(ctx, mnt.Label(), mnt.Value) - if err != nil { - return nil, err - } - opts = append(opts, o) - } - return opts, err -} - -func (p *Pipeline) mount(ctx context.Context, dest string, mnt *compiler.Value) (llb.RunOption, error) { - if s, err := mnt.String(); err == nil { - // eg. mount: "/foo": "cache" - switch s { - case "cache": - return llb.AddMount( - dest, - llb.Scratch().File( - llb.Mkdir("/cache", fs.FileMode(0755)), - llb.WithCustomName(p.vertexNamef("Mkdir /cache (cache mount %s)", dest)), - ), - // FIXME: disabled persistent cache mount (gh issue #495) - // llb.Scratch(), - // llb.AsPersistentCacheDir( - // p.canonicalPath(mnt), - // llb.CacheMountShared, - // ), - ), nil - case "tmpfs": - return llb.AddMount( - dest, - llb.Scratch(), - llb.Tmpfs(), - ), nil - default: - return nil, fmt.Errorf("invalid mount source: %q", s) - } - } - - // eg. mount: "/foo": secret: mysecret - if secret := mnt.Lookup("secret"); secret.Exists() { - s, err := p.pctx.Secrets.FromValue(secret) - if err != nil { - return nil, err - } - - return llb.AddSecret(dest, - llb.SecretID(s.ID()), - llb.SecretFileOpt(0, 0, 0400), // uid, gid, mask) - ), nil - } - - // eg. mount: "/var/run/docker.sock": stream: mystream - if stream := mnt.Lookup("stream"); stream.Exists() { - s, err := p.pctx.Services.FromValue(stream) - if err != nil { - return nil, err - } - - return llb.AddSSHSocket( - llb.SSHID(s.ID()), - llb.SSHSocketTarget(dest), - ), nil - } - - // eg. mount: "/foo": { from: www.source } - if !mnt.Lookup("from").Exists() { - return nil, fmt.Errorf("invalid mount: should have %s structure", - "{from: _, path: string | *\"/\"}") - } - from := NewPipeline(mnt.Lookup("from"), p.s, p.pctx) - if err := from.Run(ctx); err != nil { - return nil, err - } - // possibly construct mount options for LLB from - var mo []llb.MountOption - // handle "path" option - if mp := mnt.Lookup("path"); mp.Exists() { - mps, err := mp.String() - if err != nil { - return nil, err - } - mo = append(mo, llb.SourcePath(mps)) - } - return llb.AddMount(dest, from.State(), mo...), nil -} - -// canonicalPath returns the canonical path of `v` -// If the pipeline is a reference to another pipeline, `canonicalPath()` will -// return the path of the reference of `v`. -// FIXME: this doesn't work with references of references. -func (p *Pipeline) canonicalPath(v *compiler.Value) string { - // value path - vPath := v.Path().Selectors() - - // pipeline path - pipelinePath := p.code.Path().Selectors() - - // check if the pipeline is a reference - _, ref := p.code.ReferencePath() - if len(ref.Selectors()) == 0 { - return v.Path().String() - } - canonicalPipelinePath := ref.Selectors() - - // replace the pipeline path with the canonical pipeline path - // 1. strip the pipeline path from the value path - vPath = vPath[len(pipelinePath):] - // 2. inject the canonical pipeline path - vPath = append(canonicalPipelinePath, vPath...) - - return cue.MakePath(vPath...).String() -} - -func (p *Pipeline) Export(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - source, err := op.Lookup("source").String() - if err != nil { - return st, err - } - format, err := op.Lookup("format").String() - if err != nil { - return st, err - } - contents, err := fs.ReadFile(p.FS(), source) - if err != nil { - return st, fmt.Errorf("export %s: %w", source, err) - } - switch format { - case "string": - log. - Ctx(ctx). - Debug(). - Bytes("contents", contents). - Msg("exporting string") - - if err := p.computed.FillPath(cue.MakePath(), string(contents)); err != nil { - return st, err - } - case "json": - var o interface{} - o, err := unmarshalAnything(contents, json.Unmarshal) - if err != nil { - return st, err - } - - log. - Ctx(ctx). - Debug(). - Interface("contents", o). - Msg("exporting json") - - if err := p.computed.FillPath(cue.MakePath(), o); err != nil { - return st, err - } - case "yaml": - var o interface{} - o, err := unmarshalAnything(contents, yaml.Unmarshal) - if err != nil { - return st, err - } - - log. - Ctx(ctx). - Debug(). - Interface("contents", o). - Msg("exporting yaml") - - if err := p.computed.FillPath(cue.MakePath(), o); err != nil { - return st, err - } - default: - return st, fmt.Errorf("unsupported export format: %q", format) - } - return st, nil -} - -type unmarshaller func([]byte, interface{}) error - -func unmarshalAnything(data []byte, fn unmarshaller) (interface{}, error) { - // unmarshalling a map into interface{} yields an error: - // "unsupported Go type for map key (interface {})" - // we want to attempt to unmarshal to a map[string]interface{} first - var oMap map[string]interface{} - if err := fn(data, &oMap); err == nil { - return oMap, nil - } - - // If the previous attempt didn't work, we might be facing a scalar (e.g. - // bool). - // Try to unmarshal to interface{} directly. - var o interface{} - err := fn(data, &o) - return o, err -} - -// parseStringOrSecret retrieve secret as plain text or retrieve string -func parseStringOrSecret(pctx *plancontext.Context, v *compiler.Value) (string, error) { - // Check if the value is a string, return as is - if value, err := v.String(); err == nil { - return value, nil - } - - // If we get here, it's a secret - secret, err := pctx.Secrets.FromValue(v) - if err != nil { - return "", err - } - return secret.PlainText(), nil -} - -func (p *Pipeline) Load(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - // Execute 'from' in a tmp pipeline, and use the resulting fs - from := NewPipeline(op.Lookup("from"), p.s, p.pctx) - if err := from.Run(ctx); err != nil { - return st, err - } - p.image = from.ImageConfig() - return from.State(), nil -} - -func (p *Pipeline) DockerLogin(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - username, err := op.Lookup("username").String() - if err != nil { - return st, err - } - - // FIXME If we could create secret directly in `cue`, we could avoid using - // that function - // But currently it's not possible because ECR secret's is a string - // so we need to handle both options (string & secret) - secretValue, err := parseStringOrSecret(p.pctx, op.Lookup("secret")) - if err != nil { - return st, err - } - - target, err := op.Lookup("target").String() - if err != nil { - return st, err - } - - p.s.AddCredentials(target, username, secretValue) - log. - Ctx(ctx). - Debug(). - Str("target", target). - Msg("docker login to registry") - - return st, nil -} - -func (p *Pipeline) FetchContainer(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - rawRef, err := op.Lookup("ref").String() - if err != nil { - return st, err - } - - ref, err := reference.ParseNormalizedNamed(rawRef) - if err != nil { - return st, fmt.Errorf("failed to parse ref %s: %w", rawRef, err) - } - // Add the default tag "latest" to a reference if it only has a repo name. - ref = reference.TagNameOnly(ref) - - st = llb.Image( - ref.String(), - llb.WithCustomName(p.vertexNamef("FetchContainer %s", rawRef)), - ) - - // Load image metadata and convert to to LLB. - platform := p.pctx.Platform.Get() - p.image, _, err = p.s.ResolveImageConfig(ctx, ref.String(), llb.ResolveImageConfigOpt{ - LogName: p.vertexNamef("load metadata for %s", ref.String()), - Platform: &platform, - }) - if err != nil { - return st, err - } - - return applyImageToState(p.image, st), nil -} - -// applyImageToState converts an image config into LLB instructions -func applyImageToState(image dockerfile2llb.Image, st llb.State) llb.State { - // FIXME: there are unhandled sections of the image config - for _, env := range image.Config.Env { - k, v := parseKeyValue(env) - st = st.AddEnv(k, v) - } - if image.Config.WorkingDir != "" { - st = st.Dir(image.Config.WorkingDir) - } - if image.Config.User != "" { - st = st.User(image.Config.User) - } - return st -} - -func parseKeyValue(env string) (string, string) { - parts := strings.SplitN(env, "=", 2) - v := "" - if len(parts) > 1 { - v = parts[1] - } - - return parts[0], v -} - -func (p *Pipeline) PushContainer(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - rawRef, err := op.Lookup("ref").String() - if err != nil { - return st, err - } - - ref, err := reference.ParseNormalizedNamed(rawRef) - if err != nil { - return st, fmt.Errorf("failed to parse ref %s: %w", rawRef, err) - } - // Add the default tag "latest" to a reference if it only has a repo name. - ref = reference.TagNameOnly(ref) - - resp, err := p.s.Export(ctx, p.State(), &p.image, bk.ExportEntry{ - Type: bk.ExporterImage, - Attrs: map[string]string{ - "name": ref.String(), - "push": "true", - }, - }, p.pctx.Platform.Get()) - - if err != nil { - return st, err - } - - if dgst, ok := resp.ExporterResponse["containerimage.digest"]; ok { - imageRef := fmt.Sprintf( - "%s@%s", - resp.ExporterResponse["image.name"], - dgst, - ) - - return st.File( - llb.Mkdir("/dagger", fs.FileMode(0755)), - llb.WithCustomName(p.vertexNamef("Mkdir /dagger")), - ).File( - llb.Mkfile("/dagger/image_digest", fs.FileMode(0644), []byte(dgst)), - llb.WithCustomName(p.vertexNamef("Storing image digest to /dagger/image_digest")), - ).File( - llb.Mkfile("/dagger/image_ref", fs.FileMode(0644), []byte(imageRef)), - llb.WithCustomName(p.vertexNamef("Storing image ref to /dagger/image_ref")), - ), nil - } - - return st, err -} - -func (p *Pipeline) SaveImage(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - tag, err := op.Lookup("tag").String() - if err != nil { - return st, err - } - - dest, err := op.Lookup("dest").String() - if err != nil { - return st, err - } - - pipeR, pipeW := io.Pipe() - var ( - errCh = make(chan error) - image []byte - ) - go func() { - var err error - - image, err = io.ReadAll(pipeR) - errCh <- err - }() - - resp, err := p.s.Export(ctx, p.State(), &p.image, bk.ExportEntry{ - Type: bk.ExporterDocker, - Attrs: map[string]string{ - "name": tag, - }, - Output: func(_ map[string]string) (io.WriteCloser, error) { - return pipeW, nil - }, - }, p.pctx.Platform.Get()) - - if err != nil { - return st, err - } - - if err := <-errCh; err != nil { - return st, err - } - - if id, ok := resp.ExporterResponse["containerimage.config.digest"]; ok { - st = st.File( - llb.Mkdir("/dagger", fs.FileMode(0755)), - llb.WithCustomName(p.vertexNamef("Mkdir /dagger")), - ).File( - llb.Mkfile("/dagger/image_id", fs.FileMode(0644), []byte(id)), - llb.WithCustomName(p.vertexNamef("Storing image id to /dagger/image_id")), - ) - } - - return st.File( - llb.Mkfile(dest, 0644, image), - llb.WithCustomName(p.vertexNamef("SaveImage %s", dest)), - ), nil -} - -func (p *Pipeline) FetchGit(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - remote, err := op.Lookup("remote").String() - if err != nil { - return st, err - } - ref, err := op.Lookup("ref").String() - if err != nil { - return st, err - } - - remoteRedacted := remote - if u, err := url.Parse(remote); err == nil { - remoteRedacted = u.Redacted() - } - - gitOpts := []llb.GitOption{} - var opts struct { - KeepGitDir bool - } - - if err := op.Decode(&opts); err != nil { - return st, err - } - - if opts.KeepGitDir { - gitOpts = append(gitOpts, llb.KeepGitDir()) - } - // Secret - if authToken := op.Lookup("authToken"); authToken.Exists() { - authTokenSecret, err := p.pctx.Secrets.FromValue(authToken) - if err != nil { - return st, err - } - gitOpts = append(gitOpts, llb.AuthTokenSecret(authTokenSecret.ID())) - } - if authHeader := op.Lookup("authHeader"); authHeader.Exists() { - authHeaderSecret, err := p.pctx.Secrets.FromValue(authHeader) - if err != nil { - return st, err - } - gitOpts = append(gitOpts, llb.AuthHeaderSecret(authHeaderSecret.ID())) - } - - gitOpts = append(gitOpts, llb.WithCustomName(p.vertexNamef("FetchGit %s@%s", remoteRedacted, ref))) - - return llb.Git( - remote, - ref, - gitOpts..., - ), nil -} - -func (p *Pipeline) FetchHTTP(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - link, err := op.Lookup("url").String() - if err != nil { - return st, err - } - - linkRedacted := link - if u, err := url.Parse(link); err == nil { - linkRedacted = u.Redacted() - } - - httpOpts := []llb.HTTPOption{} - var opts struct { - Checksum string - Filename string - Mode int64 - UID int - GID int - } - - if err := op.Decode(&opts); err != nil { - return st, err - } - - if opts.Checksum != "" { - dgst, err := digest.Parse(opts.Checksum) - if err != nil { - return st, err - } - httpOpts = append(httpOpts, llb.Checksum(dgst)) - } - if opts.Filename != "" { - httpOpts = append(httpOpts, llb.Filename(opts.Filename)) - } - if opts.Mode != 0 { - httpOpts = append(httpOpts, llb.Chmod(fs.FileMode(opts.Mode))) - } - if opts.UID != 0 && opts.GID != 0 { - httpOpts = append(httpOpts, llb.Chown(opts.UID, opts.GID)) - } - - httpOpts = append(httpOpts, llb.WithCustomName(p.vertexNamef("FetchHTTP %s", linkRedacted))) - - return llb.HTTP( - link, - httpOpts..., - ), nil -} - -func (p *Pipeline) DockerBuild(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - var ( - dockerContext = op.Lookup("context") - dockerfile = op.Lookup("dockerfile") - - contextDef *bkpb.Definition - dockerfileDef *bkpb.Definition - - err error - ) - - if !dockerContext.Exists() && !dockerfile.Exists() { - return st, errors.New("context or dockerfile required") - } - - // docker build context. This can come from another component, so we need to - // compute it first. - if dockerContext.Exists() { - from := NewPipeline(op.Lookup("context"), p.s, p.pctx) - if err := from.Run(ctx); err != nil { - return st, err - } - contextDef, err = p.s.Marshal(ctx, from.State()) - if err != nil { - return st, err - } - dockerfileDef = contextDef - } - - // Inlined dockerfile: need to be converted to LLB - if dockerfile.Exists() { - content, err := dockerfile.String() - if err != nil { - return st, err - } - dockerfileDef, err = p.s.Marshal(ctx, - llb.Scratch().File( - llb.Mkfile("/Dockerfile", 0644, []byte(content)), - ), - ) - if err != nil { - return st, err - } - if contextDef == nil { - contextDef = dockerfileDef - } - } - - opts, err := dockerBuildOpts(op, p.pctx) - if err != nil { - return st, err - } - - if p.s.NoCache() { - opts["no-cache"] = "" - } - - // Set platform to configured one if no one is defined - if opts["platform"] == "" { - opts["platform"] = bkplatforms.Format(p.pctx.Platform.Get()) - } - - req := bkgw.SolveRequest{ - Frontend: "dockerfile.v0", - FrontendOpt: opts, - FrontendInputs: map[string]*bkpb.Definition{ - dockerfilebuilder.DefaultLocalNameContext: contextDef, - dockerfilebuilder.DefaultLocalNameDockerfile: dockerfileDef, - }, - } - - res, err := p.s.SolveRequest(ctx, req) - if err != nil { - return st, err - } - if meta, ok := res.Metadata[exptypes.ExporterImageConfigKey]; ok { - if err := json.Unmarshal(meta, &p.image); err != nil { - return st, fmt.Errorf("failed to unmarshal image config: %w", err) - } - } - - ref, err := res.SingleRef() - if err != nil { - return st, err - } - st, err = ref.ToState() - if err != nil { - return st, err - } - return applyImageToState(p.image, st), nil -} - -func dockerBuildOpts(op *compiler.Value, pctx *plancontext.Context) (map[string]string, error) { - opts := map[string]string{} - - if dockerfilePath := op.Lookup("dockerfilePath"); dockerfilePath.Exists() { - filename, err := dockerfilePath.String() - if err != nil { - return nil, err - } - opts["filename"] = filename - } - - if target := op.Lookup("target"); target.Exists() { - tgr, err := target.String() - if err != nil { - return nil, err - } - opts["target"] = tgr - } - - if hosts := op.Lookup("hosts"); hosts.Exists() { - p := []string{} - fields, err := hosts.Fields() - if err != nil { - return nil, err - } - for _, host := range fields { - s, err := host.Value.String() - if err != nil { - return nil, err - } - p = append(p, host.Label()+"="+s) - } - if len(p) > 0 { - opts["add-hosts"] = strings.Join(p, ",") - } - } - - if buildArgs := op.Lookup("buildArg"); buildArgs.Exists() { - fields, err := buildArgs.Fields() - if err != nil { - return nil, err - } - for _, buildArg := range fields { - v, err := parseStringOrSecret(pctx, buildArg.Value) - if err != nil { - return nil, err - } - opts["build-arg:"+buildArg.Label()] = v - } - } - - if labels := op.Lookup("label"); labels.Exists() { - fields, err := labels.Fields() - if err != nil { - return nil, err - } - for _, label := range fields { - s, err := label.Value.String() - if err != nil { - return nil, err - } - opts["label:"+label.Label()] = s - } - } - - if platforms := op.Lookup("platforms"); platforms.Exists() { - p := []string{} - list, err := platforms.List() - if err != nil { - return nil, err - } - - for _, platform := range list { - s, err := platform.String() - if err != nil { - return nil, err - } - p = append(p, s) - } - - if len(p) > 0 { - opts["platform"] = strings.Join(p, ",") - } - if len(p) > 1 { - opts["multi-platform"] = "true" - } - } - - return opts, nil -} - -func (p *Pipeline) WriteFile(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - var content []byte - var err error - - switch kind := op.Lookup("content").Kind(); kind { - case cue.BytesKind: - content, err = op.Lookup("content").Bytes() - case cue.StringKind: - var str string - str, err = op.Lookup("content").String() - if err == nil { - content = []byte(str) - } - case cue.BottomKind: - err = fmt.Errorf("%s: WriteFile content is not set", p.canonicalPath(op)) - default: - err = fmt.Errorf("%s: unhandled data type in WriteFile: %s", p.canonicalPath(op), kind) - } - if err != nil { - return st, err - } - - dest, err := op.Lookup("dest").String() - if err != nil { - return st, err - } - - mode, err := op.Lookup("mode").Int64() - if err != nil { - return st, err - } - - return st.File( - llb.Mkfile(dest, fs.FileMode(mode), content), - llb.WithCustomName(p.vertexNamef("WriteFile %s", dest)), - ), nil -} - -func (p *Pipeline) Mkdir(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) { - pathString, err := op.Lookup("path").String() - if err != nil { - return st, err - } - - dir, err := op.Lookup("dir").String() - if err != nil { - return st, err - } - - mode, err := op.Lookup("mode").Int64() - if err != nil { - return st, err - } - - return st.Dir(dir).File( - llb.Mkdir(pathString, fs.FileMode(mode)), - llb.WithCustomName(p.vertexNamef("Mkdir %s", pathString)), - ), nil -} diff --git a/plan/plan.go b/plan/plan.go index 361fb3cf..0354c0f0 100644 --- a/plan/plan.go +++ b/plan/plan.go @@ -10,7 +10,6 @@ import ( cueflow "cuelang.org/go/tools/flow" "github.com/rs/zerolog/log" "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/environment" "go.dagger.io/dagger/pkg" "go.dagger.io/dagger/plan/task" "go.dagger.io/dagger/plancontext" @@ -207,7 +206,7 @@ func newRunner(pctx *plancontext.Context, s solver.Solver, computed *compiler.Va ctx, span := otel.Tracer("dagger").Start(ctx, fmt.Sprintf("up: %s", t.Path().String())) defer span.End() - lg.Info().Str("state", string(environment.StateComputing)).Msg(string(environment.StateComputing)) + lg.Info().Str("state", string(task.StateComputing)).Msg(string(task.StateComputing)) // Debug: dump dependencies for _, dep := range t.Dependencies() { @@ -219,14 +218,14 @@ func newRunner(pctx *plancontext.Context, s solver.Solver, computed *compiler.Va if err != nil { // FIXME: this should use errdefs.IsCanceled(err) if strings.Contains(err.Error(), "context canceled") { - lg.Error().Dur("duration", time.Since(start)).Str("state", string(environment.StateCanceled)).Msg(string(environment.StateCanceled)) + lg.Error().Dur("duration", time.Since(start)).Str("state", string(task.StateCanceled)).Msg(string(task.StateCanceled)) } else { - lg.Error().Dur("duration", time.Since(start)).Err(err).Str("state", string(environment.StateFailed)).Msg(string(environment.StateFailed)) + lg.Error().Dur("duration", time.Since(start)).Err(err).Str("state", string(task.StateFailed)).Msg(string(task.StateFailed)) } return fmt.Errorf("%s: %w", t.Path().String(), err) } - lg.Info().Dur("duration", time.Since(start)).Str("state", string(environment.StateCompleted)).Msg(string(environment.StateCompleted)) + lg.Info().Dur("duration", time.Since(start)).Str("state", string(task.StateCompleted)).Msg(string(task.StateCompleted)) // If the result is not concrete (e.g. empty value), there's nothing to merge. if !result.IsConcrete() { diff --git a/plan/task/pipeline.go b/plan/task/pipeline.go deleted file mode 100644 index 980990d4..00000000 --- a/plan/task/pipeline.go +++ /dev/null @@ -1,27 +0,0 @@ -package task - -import ( - "context" - - "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/environment" - "go.dagger.io/dagger/plancontext" - "go.dagger.io/dagger/solver" -) - -func init() { - Register("#up", func() Task { return &pipelineTask{} }) -} - -// pipelineTask is an adapter for legacy pipelines (`#up`). -// FIXME: remove once fully migrated to Europa. -type pipelineTask struct { -} - -func (c *pipelineTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) { - p := environment.NewPipeline(v, s, pctx) - if err := p.Run(ctx); err != nil { - return nil, err - } - return p.Computed(), nil -} diff --git a/plan/task/task.go b/plan/task/task.go index dfccd762..2379f597 100644 --- a/plan/task/task.go +++ b/plan/task/task.go @@ -8,7 +8,6 @@ import ( "cuelang.org/go/cue" "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/environment" "go.dagger.io/dagger/pkg" "go.dagger.io/dagger/plancontext" "go.dagger.io/dagger/solver" @@ -23,6 +22,16 @@ var ( cue.Hid("_name", pkg.DaggerPackage)) ) +// State is the state of the task. +type State string + +const ( + StateComputing = State("computing") + StateCanceled = State("canceled") + StateFailed = State("failed") + StateCompleted = State("completed") +) + type NewFunc func() Task type Task interface { @@ -52,9 +61,9 @@ func New(typ string) Task { func Lookup(v *compiler.Value) (Task, error) { // FIXME: legacy pipelines - if environment.IsComponent(v) { - return New("#up"), nil - } + // if environment.IsComponent(v) { + // return New("#up"), nil + // } if v.Kind() != cue.StructKind { return nil, ErrNotTask diff --git a/tests/tasks/pull/cue.mod/pkg/.gitignore b/tests/tasks/pull/cue.mod/pkg/.gitignore index d587a7ab..331f139d 100644 --- a/tests/tasks/pull/cue.mod/pkg/.gitignore +++ b/tests/tasks/pull/cue.mod/pkg/.gitignore @@ -1,5 +1,5 @@ # generated by dagger +dagger.lock alpha.dagger.io dagger.io -universe.dagger.io -dagger.lock +universe.dagger.io \ No newline at end of file From 4e1b6173beaa8abd75a2a76682d952362b07f854 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:15:29 -0700 Subject: [PATCH 12/38] Remove state (State + Project) Signed-off-by: Joel Longtine --- cmd/dagger/cmd/common/common.go | 70 ------- cmd/dagger/cmd/common/track.go | 29 --- cmd/dagger/cmd/init.go | 8 +- cmd/dagger/cmd/mod/get.go | 7 +- pkg/pkg.go | 4 +- state/input.go | 300 --------------------------- state/project.go | 354 -------------------------------- state/project_test.go | 120 ----------- state/state.go | 112 ---------- state/state_test.go | 1 - 10 files changed, 9 insertions(+), 996 deletions(-) delete mode 100644 state/input.go delete mode 100644 state/project.go delete mode 100644 state/project_test.go delete mode 100644 state/state.go delete mode 100644 state/state_test.go diff --git a/cmd/dagger/cmd/common/common.go b/cmd/dagger/cmd/common/common.go index 295b20ae..05114deb 100644 --- a/cmd/dagger/cmd/common/common.go +++ b/cmd/dagger/cmd/common/common.go @@ -12,78 +12,8 @@ import ( "go.dagger.io/dagger/client" "go.dagger.io/dagger/compiler" "go.dagger.io/dagger/plancontext" - "go.dagger.io/dagger/state" ) -func CurrentProject(ctx context.Context) *state.Project { - lg := log.Ctx(ctx) - - if projectPath := viper.GetString("project"); projectPath != "" { - project, err := state.Open(ctx, projectPath) - if err != nil { - lg. - Fatal(). - Err(err). - Str("path", projectPath). - Msg("failed to open project") - } - return project - } - - project, err := state.Current(ctx) - if err != nil { - lg. - Fatal(). - Err(err). - Msg("failed to determine current project") - } - return project -} - -func CurrentEnvironmentState(ctx context.Context, project *state.Project) *state.State { - lg := log.Ctx(ctx) - - environmentName := viper.GetString("environment") - if environmentName != "" { - st, err := project.Get(ctx, environmentName) - if err != nil { - lg. - Fatal(). - Err(err). - Msg("failed to load environment") - } - return st - } - - environments, err := project.List(ctx) - if err != nil { - lg. - Fatal(). - Err(err). - Msg("failed to list environments") - } - - if len(environments) == 0 { - lg. - Fatal(). - Msg("no environments") - } - - if len(environments) > 1 { - envNames := []string{} - for _, e := range environments { - envNames = append(envNames, e.Name) - } - lg. - Fatal(). - Err(err). - Strs("environments", envNames). - Msg("multiple environments available in the project, select one with `--environment`") - } - - return environments[0] -} - // FormatValue returns the String representation of the cue value func FormatValue(val *compiler.Value) string { switch { diff --git a/cmd/dagger/cmd/common/track.go b/cmd/dagger/cmd/common/track.go index f9ab140f..67bfe77a 100644 --- a/cmd/dagger/cmd/common/track.go +++ b/cmd/dagger/cmd/common/track.go @@ -8,7 +8,6 @@ import ( "github.com/go-git/go-git/v5" "github.com/spf13/cobra" - "go.dagger.io/dagger/state" "go.dagger.io/dagger/telemetry" ) @@ -32,34 +31,6 @@ func commandName(cmd *cobra.Command) string { return strings.Join(parts, " ") } -// TrackProjectCommand is like TrackCommand but includes project and -// optionally environment metadata. -func TrackProjectCommand(ctx context.Context, cmd *cobra.Command, w *state.Project, env *state.State, props ...*telemetry.Property) chan struct{} { - props = append([]*telemetry.Property{ - { - // Hash the repository URL for privacy - Name: "git_repository_hash", - Value: hash(gitRepoURL(w.Path)), - }, - { - // The project path might contain the username (e.g. /home/user/project), so we hash it for privacy. - Name: "project_path_hash", - Value: hash(w.Path), - }, - }, props...) - - if env != nil { - props = append([]*telemetry.Property{ - { - Name: "environment_name", - Value: env.Name, - }, - }, props...) - } - - return TrackCommand(ctx, cmd, props...) -} - // hash returns the sha256 digest of the string func hash(s string) string { return fmt.Sprintf("%x", sha256.Sum256([]byte(s))) diff --git a/cmd/dagger/cmd/init.go b/cmd/dagger/cmd/init.go index 26f9eeda..aa575fb4 100644 --- a/cmd/dagger/cmd/init.go +++ b/cmd/dagger/cmd/init.go @@ -5,9 +5,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "go.dagger.io/dagger/cmd/dagger/cmd/common" "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/state" + "go.dagger.io/dagger/pkg" ) var initCmd = &cobra.Command{ @@ -37,12 +36,13 @@ var initCmd = &cobra.Command{ dir = cwd } - project, err := state.Init(ctx, dir) + err := pkg.CueModInit(ctx, dir) if err != nil { lg.Fatal().Err(err).Msg("failed to initialize project") } - <-common.TrackProjectCommand(ctx, cmd, project, nil) + // TODO: Add telemtry for init + // <-common.TrackProjectCommand(ctx, cmd, project, nil) }, } diff --git a/cmd/dagger/cmd/mod/get.go b/cmd/dagger/cmd/mod/get.go index 60ee43c2..16b2d015 100644 --- a/cmd/dagger/cmd/mod/get.go +++ b/cmd/dagger/cmd/mod/get.go @@ -6,7 +6,6 @@ import ( "go.dagger.io/dagger/cmd/dagger/logger" "go.dagger.io/dagger/mod" "go.dagger.io/dagger/pkg" - "go.dagger.io/dagger/state" ) var getCmd = &cobra.Command{ @@ -28,10 +27,10 @@ var getCmd = &cobra.Command{ var err error cueModPath := pkg.GetCueModParent() - // err = pkg.CueModInit(ctx, cueModPath) - _, err = state.Init(ctx, cueModPath) - if err != nil && err != state.ErrAlreadyInit { + err = pkg.CueModInit(ctx, cueModPath) + if err != nil { lg.Fatal().Err(err).Msg("failed to initialize cue.mod") + panic(err) } var update = viper.GetBool("update") diff --git a/pkg/pkg.go b/pkg/pkg.go index 5c6b5f1c..cd11e84d 100644 --- a/pkg/pkg.go +++ b/pkg/pkg.go @@ -59,7 +59,7 @@ func Vendor(ctx context.Context, p string) error { }() // ensure cue module is initialized - if err := cueModInit(ctx, p); err != nil { + if err := CueModInit(ctx, p); err != nil { return err } @@ -167,7 +167,7 @@ func GetCueModParent() string { return parentDir } -func cueModInit(ctx context.Context, parentDir string) error { +func CueModInit(ctx context.Context, parentDir string) error { lg := log.Ctx(ctx) modDir := path.Join(parentDir, "cue.mod") diff --git a/state/input.go b/state/input.go deleted file mode 100644 index 726ec5b7..00000000 --- a/state/input.go +++ /dev/null @@ -1,300 +0,0 @@ -package state - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" - "strings" - - "cuelang.org/go/cue" - - "go.dagger.io/dagger/compiler" -) - -// An input is a value or artifact supplied by the user. -// -// - A value is any structured data which can be encoded as cue. -// -// - An artifact is a piece of data, like a source code checkout, -// binary bundle, docker image, database backup etc. -// -// Artifacts can be passed as inputs, generated dynamically from -// other inputs, and received as outputs. -// Under the hood, an artifact is encoded as a LLB pipeline, and -// attached to the cue configuration as a -// - -type Input struct { - Dir *dirInput `yaml:"dir,omitempty"` - Git *gitInput `yaml:"git,omitempty"` - Secret *secretInput `yaml:"secret,omitempty"` - Text *textInput `yaml:"text,omitempty"` - JSON *jsonInput `yaml:"json,omitempty"` - YAML *yamlInput `yaml:"yaml,omitempty"` - File *fileInput `yaml:"file,omitempty"` - Bool *boolInput `yaml:"bool,omitempty"` - Socket *socketInput `yaml:"socket,omitempty"` -} - -func (i Input) Compile(state *State) (*compiler.Value, error) { - switch { - case i.Dir != nil: - return i.Dir.Compile(state) - case i.Git != nil: - return i.Git.Compile(state) - case i.Text != nil: - return i.Text.Compile(state) - case i.Secret != nil: - return i.Secret.Compile(state) - case i.JSON != nil: - return i.JSON.Compile(state) - case i.YAML != nil: - return i.YAML.Compile(state) - case i.File != nil: - return i.File.Compile(state) - case i.Bool != nil: - return i.Bool.Compile(state) - case i.Socket != nil: - return i.Socket.Compile(state) - default: - return nil, fmt.Errorf("input has not been set") - } -} - -// An input artifact loaded from a local directory -func DirInput(path string, include []string, exclude []string) Input { - return Input{ - Dir: &dirInput{ - Path: path, - Include: include, - Exclude: exclude, - }, - } -} - -type dirInput struct { - Path string `yaml:"path,omitempty"` - Include []string `yaml:"include,omitempty"` - Exclude []string `yaml:"exclude,omitempty"` -} - -func (dir dirInput) Compile(state *State) (*compiler.Value, error) { - // FIXME: serialize an intermediate struct, instead of generating cue source - - // json.Marshal([]string{}) returns []byte("null"), which wreaks havoc - // in Cue because `null` is not a `[...string]` - includeLLB := []byte("[]") - if len(dir.Include) > 0 { - var err error - includeLLB, err = json.Marshal(dir.Include) - if err != nil { - return nil, err - } - } - excludeLLB := []byte("[]") - if len(dir.Exclude) > 0 { - var err error - excludeLLB, err = json.Marshal(dir.Exclude) - if err != nil { - return nil, err - } - } - - p := dir.Path - if !filepath.IsAbs(p) { - p = filepath.Clean(path.Join(state.Project, dir.Path)) - } - if !strings.HasPrefix(p, state.Project) { - return nil, fmt.Errorf("%q is outside the project", dir.Path) - } - // Check that directory exists - if _, err := os.Stat(p); os.IsNotExist(err) { - return nil, fmt.Errorf("%q dir doesn't exist", dir.Path) - } - - dirPath, err := json.Marshal(p) - if err != nil { - return nil, err - } - - state.Context.LocalDirs.Add(p) - - llb := fmt.Sprintf( - `#up: [{do: "local", dir: %s, include: %s, exclude: %s}]`, - dirPath, - includeLLB, - excludeLLB, - ) - return compiler.Compile("", llb) -} - -// An input artifact loaded from a git repository -type gitInput struct { - Remote string `yaml:"remote,omitempty"` - Ref string `yaml:"ref,omitempty"` - Dir string `yaml:"dir,omitempty"` -} - -func GitInput(remote, ref, dir string) Input { - return Input{ - Git: &gitInput{ - Remote: remote, - Ref: ref, - Dir: dir, - }, - } -} - -func (git gitInput) Compile(_ *State) (*compiler.Value, error) { - ref := "HEAD" - if git.Ref != "" { - ref = git.Ref - } - - dir := "" - if git.Dir != "" { - dir = fmt.Sprintf(`,{do:"subdir", dir:"%s"}`, git.Dir) - } - - return compiler.Compile("", fmt.Sprintf( - `#up: [{do:"fetch-git", remote:"%s", ref:"%s"}%s]`, - git.Remote, - ref, - dir, - )) -} - -// An input value encoded as text -func TextInput(data string) Input { - i := textInput(data) - return Input{ - Text: &i, - } -} - -type textInput string - -func (i textInput) Compile(_ *State) (*compiler.Value, error) { - return compiler.Compile("", fmt.Sprintf("%q", i)) -} - -// A secret input value -func SecretInput(data string) Input { - i := secretInput(data) - return Input{ - Secret: &i, - } -} - -type secretInput string - -func (i secretInput) Compile(st *State) (*compiler.Value, error) { - secret := st.Context.Secrets.New(i.PlainText()) - return secret.MarshalCUE(), nil -} - -func (i secretInput) PlainText() string { - return string(i) -} - -// An input value encoded as Bool -func BoolInput(data string) Input { - i := boolInput(data) - return Input{ - Bool: &i, - } -} - -type boolInput string - -func (i boolInput) Compile(_ *State) (*compiler.Value, error) { - s := map[boolInput]struct{}{ - "true": {}, - "false": {}, - } - if _, ok := s[i]; ok { - return compiler.DecodeJSON("", []byte(i)) - } - return nil, fmt.Errorf("%q is not a valid boolean: ", i) -} - -// An input value encoded as JSON -func JSONInput(data string) Input { - i := jsonInput(data) - return Input{ - JSON: &i, - } -} - -type jsonInput string - -func (i jsonInput) Compile(_ *State) (*compiler.Value, error) { - return compiler.DecodeJSON("", []byte(i)) -} - -// An input value encoded as YAML -func YAMLInput(data string) Input { - i := yamlInput(data) - return Input{ - YAML: &i, - } -} - -type yamlInput string - -func (i yamlInput) Compile(_ *State) (*compiler.Value, error) { - return compiler.DecodeYAML("", []byte(i)) -} - -func FileInput(data string) Input { - return Input{ - File: &fileInput{ - Path: data, - }, - } -} - -type fileInput struct { - Path string `yaml:"path,omitempty"` -} - -func (i fileInput) Compile(_ *State) (*compiler.Value, error) { - data, err := ioutil.ReadFile(i.Path) - if err != nil { - return nil, err - } - value := compiler.NewValue() - if err := value.FillPath(cue.MakePath(), data); err != nil { - return nil, err - } - return value, nil -} - -// A socket input value -func SocketInput(data, socketType string) Input { - i := socketInput{} - - switch socketType { - case "npipe": - i.Npipe = data - case "unix": - i.Unix = data - } - - return Input{ - Socket: &i, - } -} - -type socketInput struct { - Unix string `json:"unix,omitempty" yaml:"unix,omitempty"` - Npipe string `json:"npipe,omitempty" yaml:"npipe,omitempty"` -} - -func (i socketInput) Compile(st *State) (*compiler.Value, error) { - service := st.Context.Services.New(i.Unix, i.Npipe) - return service.MarshalCUE(), nil -} diff --git a/state/project.go b/state/project.go deleted file mode 100644 index bc530d9e..00000000 --- a/state/project.go +++ /dev/null @@ -1,354 +0,0 @@ -package state - -import ( - "bytes" - "context" - "errors" - "fmt" - "os" - "path" - "path/filepath" - "strings" - - "github.com/rs/zerolog/log" - "go.dagger.io/dagger/keychain" - "go.dagger.io/dagger/pkg" - "go.dagger.io/dagger/plancontext" - "gopkg.in/yaml.v3" -) - -var ( - ErrNotInit = errors.New("not initialized") - ErrAlreadyInit = errors.New("already initialized") - ErrNotExist = errors.New("environment doesn't exist") - ErrExist = errors.New("environment already exists") -) - -const ( - daggerDir = ".dagger" - envDir = "env" - stateDir = "state" - planDir = "plan" - manifestFile = "values.yaml" - computedFile = "computed.json" -) - -type Project struct { - Path string -} - -func Init(ctx context.Context, dir string) (*Project, error) { - root, err := filepath.Abs(dir) - if err != nil { - return nil, err - } - - daggerRoot := path.Join(root, daggerDir) - if err := os.Mkdir(daggerRoot, 0755); err != nil { - if errors.Is(err, os.ErrExist) { - return nil, ErrAlreadyInit - } - return nil, err - } - - if err := os.Mkdir(path.Join(daggerRoot, envDir), 0755); err != nil { - return nil, err - } - - if err := pkg.Vendor(ctx, root); err != nil { - return nil, err - } - - return &Project{ - Path: root, - }, nil -} - -func Open(ctx context.Context, dir string) (*Project, error) { - _, err := os.Stat(path.Join(dir, daggerDir)) - if err != nil { - if errors.Is(err, os.ErrNotExist) { - return nil, ErrNotInit - } - return nil, err - } - - root, err := filepath.Abs(dir) - if err != nil { - return nil, err - } - - return &Project{ - Path: root, - }, nil -} - -func Current(ctx context.Context) (*Project, error) { - current, err := os.Getwd() - if err != nil { - return nil, err - } - - // Walk every parent directory to find .dagger - for { - _, err := os.Stat(path.Join(current, daggerDir, envDir)) - if err == nil { - return Open(ctx, current) - } - parent := filepath.Dir(current) - if parent == current { - break - } - current = parent - } - - return nil, ErrNotInit -} - -func (w *Project) envPath(name string) string { - return path.Join(w.Path, daggerDir, envDir, name) -} - -func (w *Project) List(ctx context.Context) ([]*State, error) { - var ( - environments = []*State{} - err error - ) - - files, err := os.ReadDir(path.Join(w.Path, daggerDir, envDir)) - if err != nil { - return nil, err - } - for _, f := range files { - if !f.IsDir() { - continue - } - st, err := w.Get(ctx, f.Name()) - if err != nil { - // If the environment doesn't exist (e.g. no values.yaml, skip silently) - if !errors.Is(err, ErrNotExist) { - log. - Ctx(ctx). - Err(err). - Str("name", f.Name()). - Msg("failed to load environment") - } - continue - } - environments = append(environments, st) - } - - return environments, nil -} - -func (w *Project) Get(ctx context.Context, name string) (*State, error) { - envPath, err := filepath.Abs(w.envPath(name)) - if err != nil { - return nil, err - } - if _, err := os.Stat(envPath); err != nil { - if errors.Is(err, os.ErrNotExist) { - return nil, ErrNotExist - } - return nil, err - } - - manifest, err := os.ReadFile(path.Join(envPath, manifestFile)) - if err != nil { - if errors.Is(err, os.ErrNotExist) { - return nil, ErrNotExist - } - return nil, err - } - manifest, err = keychain.Decrypt(ctx, manifest) - if err != nil { - return nil, fmt.Errorf("unable to decrypt state: %w", err) - } - - var st State - if err := yaml.Unmarshal(manifest, &st); err != nil { - return nil, err - } - st.Context = plancontext.New() - if platform := st.Platform; platform != "" { - if err := st.Context.Platform.Set(platform); err != nil { - return nil, err - } - } - st.Path = envPath - // FIXME: Backward compat: Support for old-style `.dagger/env//plan` - if st.Plan.Module == "" { - planPath := path.Join(envPath, planDir) - if _, err := os.Stat(planPath); err == nil { - planRelPath, err := filepath.Rel(w.Path, planPath) - if err != nil { - return nil, err - } - st.Plan.Module = planRelPath - } - } - st.Project = w.Path - - computed, err := os.ReadFile(path.Join(envPath, stateDir, computedFile)) - if err == nil { - st.Computed = string(computed) - } - - return &st, nil -} - -func (w *Project) Save(ctx context.Context, st *State) error { - data, err := yaml.Marshal(st) - if err != nil { - return err - } - - manifestPath := path.Join(st.Path, manifestFile) - - currentEncrypted, err := os.ReadFile(manifestPath) - if err != nil { - return err - } - currentPlain, err := keychain.Decrypt(ctx, currentEncrypted) - if err != nil { - return fmt.Errorf("unable to decrypt state: %w", err) - } - - // Only update the encrypted file if there were changes - if !bytes.Equal(data, currentPlain) { - encrypted, err := keychain.Reencrypt(ctx, manifestPath, data) - if err != nil { - return err - } - if err := os.WriteFile(manifestPath, encrypted, 0600); err != nil { - return err - } - } - - if st.Computed != "" { - state := path.Join(st.Path, stateDir) - if err := os.MkdirAll(state, 0755); err != nil { - return err - } - err := os.WriteFile( - path.Join(state, "computed.json"), - []byte(st.Computed), - 0600) - if err != nil { - return err - } - } - - return nil -} - -func (w *Project) Create(ctx context.Context, name string, plan Plan, platform string) (*State, error) { - if _, err := w.Get(ctx, name); err == nil { - return nil, ErrExist - } - - pkg, err := w.cleanPackageName(ctx, plan.Package) - if err != nil { - return nil, err - } - - envPath, err := filepath.Abs(w.envPath(name)) - if err != nil { - return nil, err - } - - // Environment directory - if err := os.MkdirAll(envPath, 0755); err != nil { - return nil, err - } - - manifestPath := path.Join(envPath, manifestFile) - - st := &State{ - Context: plancontext.New(), - - Path: envPath, - Project: w.Path, - Plan: Plan{ - Package: pkg, - }, - Name: name, - Platform: platform, - } - - data, err := yaml.Marshal(st) - if err != nil { - return nil, err - } - key, err := keychain.Default(ctx) - if err != nil { - return nil, err - } - encrypted, err := keychain.Encrypt(ctx, manifestPath, data, key) - if err != nil { - return nil, err - } - if err := os.WriteFile(manifestPath, encrypted, 0600); err != nil { - return nil, err - } - - err = os.WriteFile( - path.Join(envPath, ".gitignore"), - []byte("# dagger state\nstate/**\n"), - 0600, - ) - if err != nil { - return nil, err - } - - return st, nil -} - -func (w *Project) cleanPackageName(ctx context.Context, pkg string) (string, error) { - lg := log. - Ctx(ctx). - With(). - Str("package", pkg). - Logger() - - if pkg == "" { - return pkg, nil - } - - // If the package is not a path, then it must be a domain (e.g. foo.bar/mypackage) - if _, err := os.Stat(pkg); err != nil { - if !errors.Is(err, os.ErrNotExist) { - return "", err - } - - // Make sure the domain is in the correct form - if !strings.Contains(pkg, ".") || !strings.Contains(pkg, "/") { - return "", fmt.Errorf("invalid package %q", pkg) - } - - return pkg, nil - } - - p, err := filepath.Abs(pkg) - if err != nil { - lg.Error().Err(err).Msg("unable to resolve path") - return "", err - } - - if !strings.HasPrefix(p, w.Path) { - lg.Fatal().Err(err).Msg("package is outside the project") - return "", err - } - - p, err = filepath.Rel(w.Path, p) - if err != nil { - lg.Fatal().Err(err).Msg("unable to resolve path") - return "", err - } - - if !strings.HasPrefix(p, ".") { - p = "./" + p - } - - return p, nil -} diff --git a/state/project_test.go b/state/project_test.go deleted file mode 100644 index 9d3d3223..00000000 --- a/state/project_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package state - -import ( - "context" - "os" - "path" - "strings" - "testing" - - "github.com/stretchr/testify/require" - "go.dagger.io/dagger/keychain" - "gopkg.in/yaml.v3" -) - -func TestProject(t *testing.T) { - ctx := context.TODO() - - keychain.EnsureDefaultKey(ctx) - - root, err := os.MkdirTemp(os.TempDir(), "dagger-*") - require.NoError(t, err) - - // Open should fail since the directory is not initialized - _, err = Open(ctx, root) - require.ErrorIs(t, ErrNotInit, err) - - // Init - project, err := Init(ctx, root) - require.NoError(t, err) - require.Equal(t, root, project.Path) - - // Create - st, err := project.Create(ctx, "test", Plan{ - Module: ".", - }, "linux/amd64") - require.NoError(t, err) - require.Equal(t, "test", st.Name) - require.Equal(t, "linux/amd64", st.Platform) - - // Open - project, err = Open(ctx, root) - require.NoError(t, err) - require.Equal(t, root, project.Path) - - // List - envs, err := project.List(ctx) - require.NoError(t, err) - require.Len(t, envs, 1) - require.Equal(t, "test", envs[0].Name) - - // Get - env, err := project.Get(ctx, "test") - require.NoError(t, err) - require.Equal(t, "test", env.Name) - require.Equal(t, "linux/amd64", env.Platform) - - // Save - require.NoError(t, env.SetInput("foo", TextInput("bar"))) - require.NoError(t, project.Save(ctx, env)) - project, err = Open(ctx, root) - require.NoError(t, err) - env, err = project.Get(ctx, "test") - require.NoError(t, err) - require.Contains(t, env.Inputs, "foo") -} - -func TestEncryption(t *testing.T) { - ctx := context.TODO() - - keychain.EnsureDefaultKey(ctx) - - readManifest := func(st *State) *State { - data, err := os.ReadFile(path.Join(st.Path, manifestFile)) - require.NoError(t, err) - m := State{} - require.NoError(t, yaml.Unmarshal(data, &m)) - return &m - } - - root, err := os.MkdirTemp(os.TempDir(), "dagger-*") - require.NoError(t, err) - project, err := Init(ctx, root) - require.NoError(t, err) - - _, err = project.Create(ctx, "test", Plan{ - Module: ".", - }, "linux/amd64") - require.NoError(t, err) - - // Set a plaintext input, make sure it is not encrypted - st, err := project.Get(ctx, "test") - require.NoError(t, err) - require.NoError(t, st.SetInput("plain", TextInput("plain"))) - require.NoError(t, project.Save(ctx, st)) - o := readManifest(st) - require.Contains(t, o.Inputs, "plain") - require.Equal(t, "plain", string(*o.Inputs["plain"].Text)) - - // Set a secret input, make sure it's encrypted - st, err = project.Get(ctx, "test") - require.NoError(t, err) - require.NoError(t, st.SetInput("secret", SecretInput("secret"))) - require.NoError(t, project.Save(ctx, st)) - o = readManifest(st) - require.Contains(t, o.Inputs, "secret") - secretValue := string(*o.Inputs["secret"].Secret) - require.NotEqual(t, "secret", secretValue) - require.True(t, strings.HasPrefix(secretValue, "ENC[")) - - // Change another input, make sure our secret didn't change - st, err = project.Get(ctx, "test") - require.NoError(t, err) - require.NoError(t, st.SetInput("plain", TextInput("different"))) - require.NoError(t, project.Save(ctx, st)) - o = readManifest(st) - require.Contains(t, o.Inputs, "plain") - require.Equal(t, "different", string(*o.Inputs["plain"].Text)) - require.Contains(t, o.Inputs, "secret") - require.Equal(t, secretValue, string(*o.Inputs["secret"].Secret)) -} diff --git a/state/state.go b/state/state.go deleted file mode 100644 index df68d2bd..00000000 --- a/state/state.go +++ /dev/null @@ -1,112 +0,0 @@ -package state - -import ( - "context" - "path" - - "cuelang.org/go/cue" - "go.dagger.io/dagger/compiler" - "go.dagger.io/dagger/pkg" - "go.dagger.io/dagger/plancontext" -) - -// Contents of an environment serialized to a file -type State struct { - // Plan Context. - // FIXME: this is used as a bridge and is temporary. - Context *plancontext.Context `yaml:"-"` - - // State path - Path string `yaml:"-"` - - // Project path - Project string `yaml:"-"` - - // Plan - Plan Plan `yaml:"plan,omitempty"` - - // Human-friendly environment name. - // A environment may have more than one name. - // FIXME: store multiple names? - Name string `yaml:"name,omitempty"` - - // Platform execution - Platform string `yaml:"platform,omitempty"` - - // User Inputs - Inputs map[string]Input `yaml:"inputs,omitempty"` - - // Computed values - Computed string `yaml:"-"` -} - -// Cue module containing the environment plan -func (s *State) CompilePlan(ctx context.Context) (*compiler.Value, error) { - w := s.Project - // FIXME: backward compatibility - if planModule := s.Plan.Module; planModule != "" { - w = path.Join(w, planModule) - } - - // FIXME: universe vendoring - // This is already done on `dagger init` and shouldn't be done here too. - // However: - // 1) As of right now, there's no way to update universe through the - // CLI, so we are lazily updating on `dagger up` using the embedded `universe` - // 2) For backward compatibility: if the project was `dagger - // init`-ed before we added support for vendoring universe, it might not - // contain a `cue.mod`. - if err := pkg.Vendor(ctx, w); err != nil { - return nil, err - } - - var args []string - if pkg := s.Plan.Package; pkg != "" { - args = append(args, pkg) - } - - return compiler.Build(w, nil, args...) -} - -func (s *State) CompileInputs() (*compiler.Value, error) { - v := compiler.NewValue() - - // Prepare inputs - for key, input := range s.Inputs { - i, err := input.Compile(s) - if err != nil { - return nil, err - } - if key == "" { - err = v.FillPath(cue.MakePath(), i) - } else { - err = v.FillPath(cue.ParsePath(key), i) - } - if err != nil { - return nil, err - } - } - - return v, nil -} - -type Plan struct { - Module string `yaml:"module,omitempty"` - Package string `yaml:"package,omitempty"` -} - -func (s *State) SetInput(key string, value Input) error { - if s.Inputs == nil { - s.Inputs = make(map[string]Input) - } - s.Inputs[key] = value - return nil -} - -// Remove all inputs at the given key, including sub-keys. -// For example RemoveInputs("foo.bar") will remove all inputs -// at foo.bar, foo.bar.baz, etc. -func (s *State) RemoveInputs(key string) error { - delete(s.Inputs, key) - return nil -} diff --git a/state/state_test.go b/state/state_test.go deleted file mode 100644 index 7bf2df5b..00000000 --- a/state/state_test.go +++ /dev/null @@ -1 +0,0 @@ -package state From e9b75194025c48d276a501125e18fff6cb90be98 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:22:31 -0700 Subject: [PATCH 13/38] Remove `environment` flag Signed-off-by: Joel Longtine --- cmd/dagger/cmd/root.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 23820e4f..809a5c80 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -31,7 +31,6 @@ func init() { rootCmd.PersistentFlags().StringArray("cache-from", []string{}, "External cache sources (eg. user/app:cache, type=local,src=path/to/dir)") - rootCmd.PersistentFlags().StringP("environment", "e", "", "Select an environment") rootCmd.PersistentFlags().String("project", "", "Specify a project directory (defaults to current)") rootCmd.PersistentFlags().Bool("europa", false, "Enable experiemental Europa UX") From cdde074d09e988e8ffa832b8941d46241245aafb Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:22:43 -0700 Subject: [PATCH 14/38] Remove `europa` flag Signed-off-by: Joel Longtine --- cmd/dagger/cmd/root.go | 2 -- cmd/dagger/cmd/up.go | 15 +++++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 809a5c80..4d0f4cb1 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -33,8 +33,6 @@ func init() { rootCmd.PersistentFlags().String("project", "", "Specify a project directory (defaults to current)") - rootCmd.PersistentFlags().Bool("europa", false, "Enable experiemental Europa UX") - rootCmd.PersistentPreRun = func(cmd *cobra.Command, _ []string) { lg := logger.New() ctx := lg.WithContext(cmd.Context()) diff --git a/cmd/dagger/cmd/up.go b/cmd/dagger/cmd/up.go index f1123507..d62c1108 100644 --- a/cmd/dagger/cmd/up.go +++ b/cmd/dagger/cmd/up.go @@ -50,19 +50,14 @@ var upCmd = &cobra.Command{ ctx := lg.WithContext(cmd.Context()) cl := common.NewClient(ctx) - if viper.GetBool("europa") { - err = europaUp(ctx, cl, args...) + err = europaUp(ctx, cl, args...) - // TODO: rework telemetry - // <-doneCh + // TODO: rework telemetry + // <-doneCh - if err != nil { - lg.Fatal().Err(err).Msg("failed to up environment") - } - - return + if err != nil { + lg.Fatal().Err(err).Msg("failed to up environment") } - }, } From a839ab124a37c94796a9a162a3b604c3f8d2d546 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:26:51 -0700 Subject: [PATCH 15/38] Comment out unused code Signed-off-by: Joel Longtine --- cmd/dagger/cmd/common/track.go | 43 ++++++++++++++++------------------ cmd/dagger/cmd/up.go | 27 ++++++++++----------- 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/cmd/dagger/cmd/common/track.go b/cmd/dagger/cmd/common/track.go index 67bfe77a..cff3e745 100644 --- a/cmd/dagger/cmd/common/track.go +++ b/cmd/dagger/cmd/common/track.go @@ -2,11 +2,8 @@ package common import ( "context" - "crypto/sha256" - "fmt" "strings" - "github.com/go-git/go-git/v5" "github.com/spf13/cobra" "go.dagger.io/dagger/telemetry" ) @@ -32,27 +29,27 @@ func commandName(cmd *cobra.Command) string { } // hash returns the sha256 digest of the string -func hash(s string) string { - return fmt.Sprintf("%x", sha256.Sum256([]byte(s))) -} +// func hash(s string) string { +// return fmt.Sprintf("%x", sha256.Sum256([]byte(s))) +// } -// gitRepoURL returns the git repository remote, if any. -func gitRepoURL(path string) string { - repo, err := git.PlainOpenWithOptions(path, &git.PlainOpenOptions{ - DetectDotGit: true, - }) - if err != nil { - return "" - } +// // gitRepoURL returns the git repository remote, if any. +// func gitRepoURL(path string) string { +// repo, err := git.PlainOpenWithOptions(path, &git.PlainOpenOptions{ +// DetectDotGit: true, +// }) +// if err != nil { +// return "" +// } - origin, err := repo.Remote("origin") - if err != nil { - return "" - } +// origin, err := repo.Remote("origin") +// if err != nil { +// return "" +// } - if urls := origin.Config().URLs; len(urls) > 0 { - return urls[0] - } +// if urls := origin.Config().URLs; len(urls) > 0 { +// return urls[0] +// } - return "" -} +// return "" +// } diff --git a/cmd/dagger/cmd/up.go b/cmd/dagger/cmd/up.go index d62c1108..8d8187a8 100644 --- a/cmd/dagger/cmd/up.go +++ b/cmd/dagger/cmd/up.go @@ -8,7 +8,6 @@ import ( "go.dagger.io/dagger/client" "go.dagger.io/dagger/cmd/dagger/cmd/common" "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/mod" "go.dagger.io/dagger/plan" "go.dagger.io/dagger/solver" "golang.org/x/term" @@ -61,20 +60,20 @@ var upCmd = &cobra.Command{ }, } -func checkUniverseVersion(ctx context.Context, projectPath string) bool { - lg := log.Ctx(ctx) +// 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 -} +// 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 europaUp(ctx context.Context, cl *client.Client, args ...string) error { lg := log.Ctx(ctx) From b32e2da0a5de881196cb98a3632d84559ae88e91 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:30:58 -0700 Subject: [PATCH 16/38] make docs Signed-off-by: Joel Longtine --- docs/reference/argocd.md | 80 +++----------------------- docs/reference/aws/README.md | 31 ++-------- docs/reference/aws/cloudformation.md | 13 +---- docs/reference/aws/ecr.md | 17 +----- docs/reference/aws/eks.md | 13 +---- docs/reference/aws/elb.md | 12 +--- docs/reference/aws/rds.md | 46 ++------------- docs/reference/aws/s3.md | 16 +----- docs/reference/azure/README.md | 19 +----- docs/reference/azure/resourcegroup.md | 24 +------- docs/reference/azure/staticwebapp.md | 36 +----------- docs/reference/azure/storage.md | 26 +-------- docs/reference/bats.md | 5 +- docs/reference/docker/README.md | 34 +++-------- docs/reference/docker/compose.md | 5 +- docs/reference/gcp/README.md | 14 +---- docs/reference/gcp/cloudrun.md | 11 +--- docs/reference/gcp/gcr.md | 12 +--- docs/reference/gcp/gcs.md | 16 +----- docs/reference/gcp/gke.md | 13 +---- docs/reference/gcp/secretmanager.md | 11 +--- docs/reference/git.md | 38 +++--------- docs/reference/go.md | 33 ++--------- docs/reference/graphql.md | 6 +- docs/reference/http.md | 25 ++------ docs/reference/java/maven.md | 13 +---- docs/reference/js/yarn.md | 15 +---- docs/reference/kubernetes/README.md | 13 +---- docs/reference/kubernetes/helm.md | 15 +---- docs/reference/kubernetes/kustomize.md | 10 +--- docs/reference/netlify.md | 19 +----- docs/reference/random.md | 9 +-- docs/reference/terraform.md | 9 +-- docs/reference/trivy.md | 4 +- 34 files changed, 88 insertions(+), 575 deletions(-) diff --git a/docs/reference/argocd.md b/docs/reference/argocd.md index f46c58fc..9b4e9c5f 100644 --- a/docs/reference/argocd.md +++ b/docs/reference/argocd.md @@ -16,26 +16,7 @@ Create an ArgoCD application ### argocd.#App Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*config.server* | `string` |ArgoCD server | -|*config.project* | `*"default" \| string` |ArgoCD project | -|*config.token* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |ArgoCD authentication token | -|*name* | `string` |App name | -|*repo* | `string` |Repository url (git or helm) | -|*path* | `string` |Folder to deploy | -|*server* | `*"https://kubernetes.default.svc" \| string` |Destination server | -|*image.config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*image.config.server* | `string` |ArgoCD server | -|*image.config.project* | `*"default" \| string` |ArgoCD project | -|*image.config.token* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |ArgoCD authentication token | -|*namespace* | `*"default" \| string` |Destination namespace | -|*env.APP_NAME* | `string` |- | -|*env.APP_REPO* | `string` |- | -|*env.APP_PATH* | `string` |- | -|*env.APP_SERVER* | `*"https://kubernetes.default.svc" \| string` |- | -|*env.APP_NAMESPACE* | `*"default" \| string` |- | +_No input._ ### argocd.#App Outputs @@ -47,12 +28,7 @@ Re-usable CLI component ### argocd.#CLI Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*config.server* | `string` |ArgoCD server | -|*config.project* | `*"default" \| string` |ArgoCD project | -|*config.token* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |ArgoCD authentication token | +_No input._ ### argocd.#CLI Outputs @@ -64,12 +40,7 @@ ArgoCD configuration ### argocd.#Config Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*server* | `string` |ArgoCD server | -|*project* | `*"default" \| string` |ArgoCD project | -|*token* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |ArgoCD authentication token | +_No input._ ### argocd.#Config Outputs @@ -81,24 +52,11 @@ Get application's status ### argocd.#Status Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*config.server* | `string` |ArgoCD server | -|*config.project* | `*"default" \| string` |ArgoCD project | -|*config.token* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |ArgoCD authentication token | -|*name* | `string` |ArgoCD application | +_No input._ ### argocd.#Status Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*outputs.health* | `string` |Application health | -|*outputs.sync* | `string` |Application sync state | -|*outputs.namespace* | `string` |Namespace | -|*outputs.server* | `string` |Server | -|*outputs.urls* | `string` |Comma separated list of application URLs | -|*outputs.state* | `string` |Last operation state message | +_No output._ ## argocd.#Sync @@ -106,32 +64,8 @@ Sync an application to its target state ### argocd.#Sync Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*config.server* | `string` |ArgoCD server | -|*config.project* | `*"default" \| string` |ArgoCD project | -|*config.token* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |ArgoCD authentication token | -|*application* | `string` |ArgoCD application | -|*wait* | `*false \| bool` |Wait the application to sync correctly | -|*ctr.image.config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*ctr.image.config.server* | `string` |ArgoCD server | -|*ctr.image.config.project* | `*"default" \| string` |ArgoCD project | -|*ctr.image.config.token* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |ArgoCD authentication token | -|*ctr.env.APPLICATION* | `string` |- | -|*status.config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*status.config.server* | `string` |ArgoCD server | -|*status.config.project* | `*"default" \| string` |ArgoCD project | -|*status.config.token* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |ArgoCD authentication token | -|*status.name* | `string` |ArgoCD application | +_No input._ ### argocd.#Sync Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*status.outputs.health* | `string` |Application health | -|*status.outputs.sync* | `string` |Application sync state | -|*status.outputs.namespace* | `string` |Namespace | -|*status.outputs.server* | `string` |Server | -|*status.outputs.urls* | `string` |Comma separated list of application URLs | -|*status.outputs.state* | `string` |Last operation state message | +_No output._ diff --git a/docs/reference/aws/README.md b/docs/reference/aws/README.md index 55d60417..02a047d6 100644 --- a/docs/reference/aws/README.md +++ b/docs/reference/aws/README.md @@ -14,13 +14,7 @@ import "alpha.dagger.io/aws" ### aws.#CLI Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*version* | `*"1.19" \| string` |- | +_No input._ ### aws.#CLI Outputs @@ -32,12 +26,7 @@ AWS Config shared by all AWS packages ### aws.#Config Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*region* | `string` |AWS region | -|*accessKey* | `dagger.#Secret` |AWS access key | -|*secretKey* | `dagger.#Secret` |AWS secret key | -|*localMode* | `*false \| bool` |AWS localstack mode | +_No input._ ### aws.#Config Outputs @@ -49,13 +38,7 @@ Configuration specific to CLI v1 ### aws.#V1 Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*version* | `*"1.19" \| string` |- | +_No input._ ### aws.#V1 Outputs @@ -67,13 +50,7 @@ Configuration specific to CLI v2 ### aws.#V2 Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*version* | `*"2.1.29" \| string` |- | +_No input._ ### aws.#V2 Outputs diff --git a/docs/reference/aws/cloudformation.md b/docs/reference/aws/cloudformation.md index b58ee859..c31407eb 100644 --- a/docs/reference/aws/cloudformation.md +++ b/docs/reference/aws/cloudformation.md @@ -16,18 +16,7 @@ AWS CloudFormation Stack ### cloudformation.#Stack Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*source* | `string` |Source is the Cloudformation template (JSON/YAML string) | -|*stackName* | `string` |Stackname is the cloudformation stack | -|*parameters* | `struct` |Stack parameters | -|*onFailure* | `*"DO_NOTHING" \| "ROLLBACK" \| "DELETE"` |Behavior when failure to create/update the Stack | -|*timeout* | `*10 \| \>=0 & int` |Maximum waiting time until stack creation/update (in minutes) | -|*neverUpdate* | `*false \| true` |Never update the stack if already exists | +_No input._ ### cloudformation.#Stack Outputs diff --git a/docs/reference/aws/ecr.md b/docs/reference/aws/ecr.md index 79e54e06..9559898f 100644 --- a/docs/reference/aws/ecr.md +++ b/docs/reference/aws/ecr.md @@ -16,21 +16,8 @@ Convert ECR credentials to Docker Login format ### ecr.#Credentials Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*ctr.image.config.region* | `string` |AWS region | -|*ctr.image.config.accessKey* | `dagger.#Secret` |AWS access key | -|*ctr.image.config.secretKey* | `dagger.#Secret` |AWS secret key | -|*ctr.image.config.localMode* | `*false \| bool` |AWS localstack mode | -|*ctr.image.version* | `*"1.19" \| string` |- | +_No input._ ### ecr.#Credentials Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*username* | `"AWS"` |ECR registry | -|*secret* | `string` |ECR registry secret | +_No output._ diff --git a/docs/reference/aws/eks.md b/docs/reference/aws/eks.md index ef0257a7..78230bb1 100644 --- a/docs/reference/aws/eks.md +++ b/docs/reference/aws/eks.md @@ -16,17 +16,8 @@ KubeConfig config outputs a valid kube-auth-config for kubectl client ### eks.#KubeConfig Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*clusterName* | `string` |EKS cluster name | -|*version* | `*"v1.19.9" \| string` |Kubectl version | +_No input._ ### eks.#KubeConfig Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*kubeconfig* | `string` |kubeconfig is the generated kube configuration file | +_No output._ diff --git a/docs/reference/aws/elb.md b/docs/reference/aws/elb.md index 5e397008..93f4bfc0 100644 --- a/docs/reference/aws/elb.md +++ b/docs/reference/aws/elb.md @@ -16,16 +16,8 @@ Returns an unused rule priority (randomized in available range) ### elb.#RandomRulePriority Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*listenerArn* | `string` |ListenerArn | +_No input._ ### elb.#RandomRulePriority Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*priority* | `string` |exported priority | +_No output._ diff --git a/docs/reference/aws/rds.md b/docs/reference/aws/rds.md index 7a117159..5557d54d 100644 --- a/docs/reference/aws/rds.md +++ b/docs/reference/aws/rds.md @@ -16,22 +16,11 @@ Creates a new Database on an existing RDS Instance ### rds.#Database Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*name* | `string` |DB name | -|*dbArn* | `string` |ARN of the database instance | -|*secretArn* | `string` |ARN of the database secret (for connecting via rds api) | -|*dbType* | `string` |Database type MySQL or PostgreSQL (Aurora Serverless only) | +_No input._ ### rds.#Database Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*out* | `string` |Name of the DB created | +_No output._ ## rds.#Instance @@ -39,21 +28,11 @@ Fetches information on an existing RDS Instance ### rds.#Instance Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*dbArn* | `string` |ARN of the database instance | +_No input._ ### rds.#Instance Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*hostname* | `_\|_` |DB hostname | -|*port* | `_\|_` |DB port | -|*info* | `_\|_` |- | +_No output._ ## rds.#User @@ -61,21 +40,8 @@ Creates a new user credentials on an existing RDS Instance ### rds.#User Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*username* | `string` |Username | -|*password* | `string` |Password | -|*dbArn* | `string` |ARN of the database instance | -|*secretArn* | `string` |ARN of the database secret (for connecting via rds api) | -|*grantDatabase* | `*"" \| string` |Name of the database to grants access to | -|*dbType* | `string` |Database type MySQL or PostgreSQL (Aurora Serverless only) | +_No input._ ### rds.#User Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*out* | `string` |Outputted username | +_No output._ diff --git a/docs/reference/aws/s3.md b/docs/reference/aws/s3.md index c955f2ab..109f8fdc 100644 --- a/docs/reference/aws/s3.md +++ b/docs/reference/aws/s3.md @@ -16,20 +16,8 @@ S3 Bucket object(s) sync ### s3.#Object Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*config.localMode* | `*false \| bool` |AWS localstack mode | -|*source* | `dagger.#Artifact` |Source Artifact to upload to S3 | -|*target* | `string` |Target S3 URL (eg. s3://\/\/\) | -|*delete* | `*false \| true` |Delete files that already exist on remote destination | -|*contentType* | `*"" \| string` |Object content type | -|*always* | `*true \| false` |Always write the object to S3 | +_No input._ ### s3.#Object Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*url* | `string` |URL of the uploaded S3 object | +_No output._ diff --git a/docs/reference/azure/README.md b/docs/reference/azure/README.md index fc887bbb..aafaf58d 100644 --- a/docs/reference/azure/README.md +++ b/docs/reference/azure/README.md @@ -16,17 +16,7 @@ Azure Cli to be used by all Azure packages ### azure.#CLI Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*image.from* | `"mcr.microsoft.com/azure-cli:2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1"` |Remote ref (example: "index.docker.io/alpine:latest") | -|*secret."/run/secrets/appId"* | `dagger.#Secret` |- | -|*secret."/run/secrets/password"* | `dagger.#Secret` |- | -|*secret."/run/secrets/tenantId"* | `dagger.#Secret` |- | -|*secret."/run/secrets/subscriptionId"* | `dagger.#Secret` |- | +_No input._ ### azure.#CLI Outputs @@ -38,12 +28,7 @@ Azure Config shared by all Azure packages ### azure.#Config Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*tenantId* | `dagger.#Secret` |AZURE tenant id | -|*subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*password* | `dagger.#Secret` |AZURE password for the service principal used | +_No input._ ### azure.#Config Outputs diff --git a/docs/reference/azure/resourcegroup.md b/docs/reference/azure/resourcegroup.md index d23a64c5..4b57dbde 100644 --- a/docs/reference/azure/resourcegroup.md +++ b/docs/reference/azure/resourcegroup.md @@ -14,28 +14,8 @@ Create a resource group ### resourcegroup.#ResourceGroup Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*rgName* | `string` |ResourceGroup name | -|*rgLocation* | `string` |ResourceGroup location | -|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*ctr.image.image.from* | `"mcr.microsoft.com/azure-cli:2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1"` |Remote ref (example: "index.docker.io/alpine:latest") | -|*ctr.image.secret."/run/secrets/appId"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/password"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/tenantId"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/subscriptionId"* | `dagger.#Secret` |- | -|*ctr.env.AZURE_DEFAULTS_GROUP* | `string` |- | -|*ctr.env.AZURE_DEFAULTS_LOCATION* | `string` |- | +_No input._ ### resourcegroup.#ResourceGroup Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*id* | `string` |ResourceGroup Id Resource Id | +_No output._ diff --git a/docs/reference/azure/staticwebapp.md b/docs/reference/azure/staticwebapp.md index 074cb5bd..495a7293 100644 --- a/docs/reference/azure/staticwebapp.md +++ b/docs/reference/azure/staticwebapp.md @@ -14,40 +14,8 @@ Create a static web app ### staticwebapp.#StaticWebApp Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*rgName* | `string` |ResourceGroup name in which to create static webapp | -|*stappLocation* | `string` |StaticWebApp location | -|*stappName* | `string` |StaticWebApp name | -|*remote* | `string` |GitHubRepository URL | -|*ref* | `*"main" \| string` |GitHub Branch | -|*appLocation* | `*"/" \| string` |Location of your application code | -|*buildLocation* | `*"build" \| string` |Location of your build artifacts | -|*authToken* | `dagger.#Secret` |GitHub Personal Access Token | -|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*ctr.image.image.from* | `"mcr.microsoft.com/azure-cli:2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1"` |Remote ref (example: "index.docker.io/alpine:latest") | -|*ctr.image.secret."/run/secrets/appId"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/password"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/tenantId"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/subscriptionId"* | `dagger.#Secret` |- | -|*ctr.env.AZURE_DEFAULTS_GROUP* | `string` |- | -|*ctr.env.AZURE_DEFAULTS_LOCATION* | `string` |- | -|*ctr.env.AZURE_STATICWEBAPP_NAME* | `string` |- | -|*ctr.env.GIT_URL* | `string` |- | -|*ctr.env.GIT_BRANCH* | `*"main" \| string` |- | -|*ctr.env.APP_LOCATION* | `*"/" \| string` |- | -|*ctr.env.BUILD_LOCATION* | `*"build" \| string` |- | -|*ctr.secret."/run/secrets/git_pat"* | `dagger.#Secret` |- | +_No input._ ### staticwebapp.#StaticWebApp Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*defaultHostName* | `string` |DefaultHostName generated by Azure | +_No output._ diff --git a/docs/reference/azure/storage.md b/docs/reference/azure/storage.md index 2dde70c0..4dfbb23e 100644 --- a/docs/reference/azure/storage.md +++ b/docs/reference/azure/storage.md @@ -14,30 +14,8 @@ Create a storage account ### storage.#StorageAccount Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*rgName* | `string` |ResourceGroup name | -|*stLocation* | `string` |StorageAccount location | -|*stName* | `string` |StorageAccount name | -|*ctr.image.config.tenantId* | `dagger.#Secret` |AZURE tenant id | -|*ctr.image.config.subscriptionId* | `dagger.#Secret` |AZURE subscription id | -|*ctr.image.config.appId* | `dagger.#Secret` |AZURE app id for the service principal used | -|*ctr.image.config.password* | `dagger.#Secret` |AZURE password for the service principal used | -|*ctr.image.image.from* | `"mcr.microsoft.com/azure-cli:2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1"` |Remote ref (example: "index.docker.io/alpine:latest") | -|*ctr.image.secret."/run/secrets/appId"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/password"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/tenantId"* | `dagger.#Secret` |- | -|*ctr.image.secret."/run/secrets/subscriptionId"* | `dagger.#Secret` |- | -|*ctr.env.AZURE_DEFAULTS_GROUP* | `string` |- | -|*ctr.env.AZURE_DEFAULTS_LOCATION* | `string` |- | -|*ctr.env.AZURE_STORAGE_ACCOUNT* | `string` |- | +_No input._ ### storage.#StorageAccount Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*id* | `string` |StorageAccount Id | +_No output._ diff --git a/docs/reference/bats.md b/docs/reference/bats.md index b05427c7..15f48449 100644 --- a/docs/reference/bats.md +++ b/docs/reference/bats.md @@ -12,10 +12,7 @@ import "alpha.dagger.io/bats" ### bats.#Bats Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*source* | `dagger.#Artifact` |Source containing bats files | -|*ctr.mount."/src".from* | `dagger.#Artifact` |- | +_No input._ ### bats.#Bats Outputs diff --git a/docs/reference/docker/README.md b/docs/reference/docker/README.md index a8babe26..10cbf412 100644 --- a/docs/reference/docker/README.md +++ b/docs/reference/docker/README.md @@ -16,10 +16,7 @@ Build a Docker image from source ### docker.#Build Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*source* | `dagger.#Artifact` |Build context | -|*dockerfile* | `*null \| string` |Dockerfile passed as a string | +_No input._ ### docker.#Build Outputs @@ -43,16 +40,11 @@ Load a docker image into a docker engine ### docker.#Load Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*tag* | `string` |Name and optionally a tag in the 'name:tag' format | -|*source* | `dagger.#Artifact` |Image source | +_No input._ ### docker.#Load Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*id* | `string` |Image ID | +_No output._ ## docker.#Pull @@ -60,9 +52,7 @@ Pull a docker container ### docker.#Pull Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*from* | `string` |Remote ref (example: "index.docker.io/alpine:latest") | +_No input._ ### docker.#Pull Outputs @@ -74,27 +64,17 @@ Push a docker image to a remote registry ### docker.#Push Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*target* | `string` |Remote target (example: "index.docker.io/alpine:latest") | -|*source* | `dagger.#Artifact` |Image source | +_No input._ ### docker.#Push Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*ref* | `string` |Image ref | -|*digest* | `string` |Image digest | +_No output._ ## docker.#Run ### docker.#Run Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*ref* | `string` |Image reference (e.g: nginx:alpine) | -|*recreate* | `*true \| bool` |Recreate container? | -|*run.env.IMAGE_REF* | `string` |- | +_No input._ ### docker.#Run Outputs diff --git a/docs/reference/docker/compose.md b/docs/reference/docker/compose.md index 0947f2bb..2b949a97 100644 --- a/docs/reference/docker/compose.md +++ b/docs/reference/docker/compose.md @@ -14,10 +14,7 @@ import "alpha.dagger.io/docker/compose" ### compose.#App Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*name* | `*"source" \| string` |App name (use as COMPOSE_PROJECT_NAME) | -|*registries* | `[...{\n username: string\n secret: {\n $dagger: {\n secret: {}\n }\n }\n}]` |Image registries | +_No input._ ### compose.#App Outputs diff --git a/docs/reference/gcp/README.md b/docs/reference/gcp/README.md index 24380cc5..6dfaee97 100644 --- a/docs/reference/gcp/README.md +++ b/docs/reference/gcp/README.md @@ -16,12 +16,7 @@ Base Google Cloud Config ### gcp.#Config Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*region* | `*null \| string` |GCP region | -|*zone* | `*null \| string` |GCP zone | -|*project* | `string` |GCP project | -|*serviceKey* | `dagger.#Secret` |GCP service key | +_No input._ ### gcp.#Config Outputs @@ -33,12 +28,7 @@ Re-usable gcloud component ### gcp.#GCloud Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `*null \| string` |GCP region | -|*config.zone* | `*null \| string` |GCP zone | -|*config.project* | `string` |GCP project | -|*config.serviceKey* | `dagger.#Secret` |GCP service key | +_No input._ ### gcp.#GCloud Outputs diff --git a/docs/reference/gcp/cloudrun.md b/docs/reference/gcp/cloudrun.md index 4c271e25..d42022e3 100644 --- a/docs/reference/gcp/cloudrun.md +++ b/docs/reference/gcp/cloudrun.md @@ -14,16 +14,7 @@ Service deploys a Cloud Run service based on provided GCR image ### cloudrun.#Service Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `*null \| string` |GCP region | -|*config.zone* | `*null \| string` |GCP zone | -|*config.project* | `string` |GCP project | -|*config.serviceKey* | `dagger.#Secret` |GCP service key | -|*name* | `string` |Cloud Run service name | -|*image* | `string` |GCR image ref | -|*platform* | `*"managed" \| string` |Cloud Run platform | -|*port* | `*"80" \| string` |Cloud Run service exposed port | +_No input._ ### cloudrun.#Service Outputs diff --git a/docs/reference/gcp/gcr.md b/docs/reference/gcp/gcr.md index 5799e580..181d13ee 100644 --- a/docs/reference/gcp/gcr.md +++ b/docs/reference/gcp/gcr.md @@ -16,16 +16,8 @@ Credentials retriever for GCR ### gcr.#Credentials Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `*null \| string` |GCP region | -|*config.zone* | `*null \| string` |GCP zone | -|*config.project* | `string` |GCP project | -|*config.serviceKey* | `dagger.#Secret` |GCP service key | +_No input._ ### gcr.#Credentials Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*username* | `"oauth2accesstoken"` |GCR registry username | -|*secret* | `string` |GCR registry secret | +_No output._ diff --git a/docs/reference/gcp/gcs.md b/docs/reference/gcp/gcs.md index 8d773bda..324beaf2 100644 --- a/docs/reference/gcp/gcs.md +++ b/docs/reference/gcp/gcs.md @@ -16,20 +16,8 @@ GCS Bucket object(s) sync ### gcs.#Object Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `*null \| string` |GCP region | -|*config.zone* | `*null \| string` |GCP zone | -|*config.project* | `string` |GCP project | -|*config.serviceKey* | `dagger.#Secret` |GCP service key | -|*source* | `dagger.#Artifact` |Source Artifact to upload to GCS | -|*target* | `string` |Target GCS URL (eg. gs://\/\/\) | -|*delete* | `*false \| true` |Delete files that already exist on remote destination | -|*contentType* | `*"" \| string` |Object content type | -|*always* | `*true \| false` |Always write the object to GCS | +_No input._ ### gcs.#Object Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*url* | `string` |URL of the uploaded GCS object | +_No output._ diff --git a/docs/reference/gcp/gke.md b/docs/reference/gcp/gke.md index 2c620ce9..9a486a04 100644 --- a/docs/reference/gcp/gke.md +++ b/docs/reference/gcp/gke.md @@ -16,17 +16,8 @@ KubeConfig config outputs a valid kube-auth-config for kubectl client ### gke.#KubeConfig Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `*null \| string` |GCP region | -|*config.zone* | `*null \| string` |GCP zone | -|*config.project* | `string` |GCP project | -|*config.serviceKey* | `dagger.#Secret` |GCP service key | -|*clusterName* | `string` |GKE cluster name | -|*version* | `*"v1.19.9" \| string` |Kubectl version | +_No input._ ### gke.#KubeConfig Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*kubeconfig* | `string` |kubeconfig is the generated kube configuration file | +_No output._ diff --git a/docs/reference/gcp/secretmanager.md b/docs/reference/gcp/secretmanager.md index a7d12247..83068f0e 100644 --- a/docs/reference/gcp/secretmanager.md +++ b/docs/reference/gcp/secretmanager.md @@ -14,16 +14,7 @@ import "alpha.dagger.io/gcp/secretmanager" ### secretmanager.#Secrets Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `*null \| string` |GCP region | -|*config.zone* | `*null \| string` |GCP zone | -|*config.project* | `string` |GCP project | -|*config.serviceKey* | `dagger.#Secret` |GCP service key | -|*deployment.image.config.region* | `*null \| string` |GCP region | -|*deployment.image.config.zone* | `*null \| string` |GCP zone | -|*deployment.image.config.project* | `string` |GCP project | -|*deployment.image.config.serviceKey* | `dagger.#Secret` |GCP service key | +_No input._ ### secretmanager.#Secrets Outputs diff --git a/docs/reference/git.md b/docs/reference/git.md index 08b4dca6..145e2bdb 100644 --- a/docs/reference/git.md +++ b/docs/reference/git.md @@ -16,21 +16,11 @@ Commit & push to git repository ### git.#Commit Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*repository.remote* | `string` |Repository remote URL | -|*repository.authToken* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |Authentication token (PAT or password) | -|*repository.branch* | `string` |Git branch | -|*name* | `string` |Username | -|*email* | `string` |Email | -|*message* | `string` |Commit message | -|*force* | `*false \| bool` |Force push options | +_No input._ ### git.#Commit Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*hash* | `string` |Commit hash | +_No output._ ## git.#CurrentBranch @@ -38,15 +28,11 @@ Get the name of the current checked out branch or tag ### git.#CurrentBranch Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*repository* | `dagger.#Artifact` |Git repository | +_No input._ ### git.#CurrentBranch Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*name* | `string` |Git branch name | +_No output._ ## git.#Image @@ -64,13 +50,7 @@ A git repository ### git.#Repository Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*remote* | `string` |Git remote link | -|*ref* | `string` |Git ref: can be a commit, tag or branch. Example: "main" | -|*subdir* | `*null \| string` |(optional) Subdirectory | -|*authToken* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |(optional) Add Personal Access Token | -|*authHeader* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |(optional) Add OAuth Token | +_No input._ ### git.#Repository Outputs @@ -82,12 +62,8 @@ List tags of a repository ### git.#Tags Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*repository* | `dagger.#Artifact` |Git repository | +_No input._ ### git.#Tags Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*tags* | `[...string]` |Repository tags | +_No output._ diff --git a/docs/reference/go.md b/docs/reference/go.md index b0bddbc7..5a5edc02 100644 --- a/docs/reference/go.md +++ b/docs/reference/go.md @@ -16,21 +16,11 @@ Go application builder ### go.#Build Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"1.16" \| string` |Go version to use | -|*source* | `dagger.#Artifact` |Source Directory to build | -|*packages* | `*"." \| string` |Packages to build | -|*arch* | `*"amd64" \| string` |Target architecture | -|*os* | `*"linux" \| string` |Target OS | -|*tags* | `*"" \| string` |Build tags to use for building | -|*ldflags* | `*"" \| string` |LDFLAGS to use for linking | +_No input._ ### go.#Build Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*output* | `string` |Specify the targeted binary name | +_No output._ ## go.#Container @@ -38,11 +28,7 @@ A standalone go environment ### go.#Container Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"1.16" \| string` |Go version to use | -|*source* | `dagger.#Artifact` |Source code | -|*image.from* | `"docker.io/golang:1.16-alpine"` |Remote ref (example: "index.docker.io/alpine:latest") | +_No input._ ### go.#Container Outputs @@ -54,11 +40,7 @@ Re-usable component for the Go compiler ### go.#Go Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"1.16" \| string` |Go version to use | -|*args* | `[...string]` |Arguments to the Go binary | -|*source* | `dagger.#Artifact` |Source Directory to build | +_No input._ ### go.#Go Outputs @@ -68,12 +50,7 @@ _No output._ ### go.#Test Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"1.16" \| string` |Go version to use | -|*source* | `dagger.#Artifact` |Source Directory to build | -|*packages* | `*"." \| string` |Packages to test | -|*args* | `["test", "-v", *"." \| string]` |Arguments to the Go binary | +_No input._ ### go.#Test Outputs diff --git a/docs/reference/graphql.md b/docs/reference/graphql.md index 5aebd055..671863d2 100644 --- a/docs/reference/graphql.md +++ b/docs/reference/graphql.md @@ -16,8 +16,4 @@ _No input._ ### graphql.#Query Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*post.statusCode* | `string` |- | -|*post.body* | `string` |- | -|*data* | `_\|_` |- | +_No output._ diff --git a/docs/reference/http.md b/docs/reference/http.md index 41c83cd6..b35d3276 100644 --- a/docs/reference/http.md +++ b/docs/reference/http.md @@ -16,10 +16,7 @@ _No input._ ### http.#Delete Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*statusCode* | `string` |- | -|*body* | `string` |- | +_No output._ ## http.#Do @@ -29,10 +26,7 @@ _No input._ ### http.#Do Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*statusCode* | `string` |- | -|*body* | `string` |- | +_No output._ ## http.#Get @@ -42,10 +36,7 @@ _No input._ ### http.#Get Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*statusCode* | `string` |- | -|*body* | `string` |- | +_No output._ ## http.#Post @@ -55,10 +46,7 @@ _No input._ ### http.#Post Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*statusCode* | `string` |- | -|*body* | `string` |- | +_No output._ ## http.#Put @@ -68,10 +56,7 @@ _No input._ ### http.#Put Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*statusCode* | `string` |- | -|*body* | `string` |- | +_No output._ ## http.#Wait diff --git a/docs/reference/java/maven.md b/docs/reference/java/maven.md index 9ac96614..ffb483c1 100644 --- a/docs/reference/java/maven.md +++ b/docs/reference/java/maven.md @@ -16,17 +16,8 @@ A Maven project ### maven.#Project Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*source* | `dagger.#Artifact` |Application source code | -|*package* | `struct` |Extra alpine packages to install | -|*env* | `struct` |Environment variables | -|*phases* | `*["package"] \| [...string]` |- | -|*goals* | `*[] \| [...string]` |- | -|*args* | `*[] \| [...string]` |Optional arguments for the script | +_No input._ ### maven.#Project Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*build* | `struct` |Build output directory | +_No output._ diff --git a/docs/reference/js/yarn.md b/docs/reference/js/yarn.md index d9c9146a..cffd35cb 100644 --- a/docs/reference/js/yarn.md +++ b/docs/reference/js/yarn.md @@ -16,19 +16,8 @@ A Yarn package ### yarn.#Package Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*source* | `dagger.#Artifact` |Application source code | -|*package* | `struct` |Extra alpine packages to install | -|*cwd* | `*"." \| string` |working directory to use | -|*env* | `struct` |Environment variables | -|*writeEnvFile* | `*"" \| string` |Write the contents of `environment` to this file, in the "envfile" format | -|*buildDir* | `*"build" \| string` |Read build output from this directory (path must be relative to working directory) | -|*script* | `*"build" \| string` |Run this yarn script | -|*args* | `*[] \| [...string]` |Optional arguments for the script | +_No input._ ### yarn.#Package Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*build* | `struct` |Build output directory | +_No output._ diff --git a/docs/reference/kubernetes/README.md b/docs/reference/kubernetes/README.md index e09fbfc6..928562a8 100644 --- a/docs/reference/kubernetes/README.md +++ b/docs/reference/kubernetes/README.md @@ -16,9 +16,7 @@ Kubectl client ### kubernetes.#Kubectl Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"v1.19.9" \| string` |Kubectl version | +_No input._ ### kubernetes.#Kubectl Outputs @@ -30,14 +28,7 @@ Apply Kubernetes resources ### kubernetes.#Resources Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*source* | `dagger.#Artifact` |Kubernetes config to deploy | -|*manifest* | `*null \| string` |Kubernetes manifest to deploy inlined in a string | -|*url* | `*null \| string` |Kubernetes manifest url to deploy remote configuration | -|*namespace* | `*"default" \| string` |Kubernetes Namespace to deploy to | -|*version* | `*"v1.19.9" \| string` |Version of kubectl client | -|*kubeconfig* | `(string\|struct)` |Kube config file | +_No input._ ### kubernetes.#Resources Outputs diff --git a/docs/reference/kubernetes/helm.md b/docs/reference/kubernetes/helm.md index dab0ea92..36437197 100644 --- a/docs/reference/kubernetes/helm.md +++ b/docs/reference/kubernetes/helm.md @@ -16,20 +16,7 @@ Install a Helm chart ### helm.#Chart Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*name* | `string` |Helm deployment name | -|*chart* | `*null \| string` |Helm chart to install from repository | -|*repository* | `*null \| string` |Helm chart repository | -|*values* | `*null \| string` |Helm values (either a YAML string or a Cue structure) | -|*namespace* | `string` |Kubernetes Namespace to deploy to | -|*action* | `*"installOrUpgrade" \| "install" \| "upgrade"` |Helm action to apply | -|*timeout* | `*"5m" \| string` |time to wait for any individual Kubernetes operation (like Jobs for hooks) | -|*wait* | `*true \| bool` |if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. It will wait for as long as timeout | -|*atomic* | `*true \| bool` |if set, installation process purges chart on fail. The wait option will be set automatically if atomic is used | -|*kubeconfig* | `(string\|struct)` |Kube config file | -|*version* | `*"3.5.2" \| string` |Helm version | -|*kubectlVersion* | `*"v1.19.9" \| string` |Kubectl version | +_No input._ ### helm.#Chart Outputs diff --git a/docs/reference/kubernetes/kustomize.md b/docs/reference/kubernetes/kustomize.md index 188b999b..c222d577 100644 --- a/docs/reference/kubernetes/kustomize.md +++ b/docs/reference/kubernetes/kustomize.md @@ -14,9 +14,7 @@ import "alpha.dagger.io/kubernetes/kustomize" ### kustomize.#Kustomization Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"v3.8.7" \| string` |Kustomize binary version | +_No input._ ### kustomize.#Kustomization Outputs @@ -28,11 +26,7 @@ Apply a Kubernetes Kustomize folder ### kustomize.#Kustomize Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*source* | `dagger.#Artifact` |Kubernetes source | -|*kustomization* | `string` |Optional Kustomization file | -|*version* | `*"v3.8.7" \| string` |Kustomize binary version | +_No input._ ### kustomize.#Kustomize Outputs diff --git a/docs/reference/netlify.md b/docs/reference/netlify.md index ccd4a68f..c427da73 100644 --- a/docs/reference/netlify.md +++ b/docs/reference/netlify.md @@ -16,10 +16,7 @@ Netlify account credentials ### netlify.#Account Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*name* | `*"" \| string` |Use this Netlify account name (also referred to as "team" in the Netlify docs) | -|*token* | `dagger.#Secret` |Netlify authentication token | +_No input._ ### netlify.#Account Outputs @@ -31,18 +28,8 @@ Netlify site ### netlify.#Site Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*account.name* | `*"" \| string` |Use this Netlify account name (also referred to as "team" in the Netlify docs) | -|*account.token* | `dagger.#Secret` |Netlify authentication token | -|*contents* | `dagger.#Artifact` |Contents of the application to deploy | -|*name* | `string` |Deploy to this Netlify site | -|*create* | `*true \| bool` |Create the Netlify site if it doesn't exist? | +_No input._ ### netlify.#Site Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*url* | `string` |Website url | -|*deployUrl* | `string` |Unique Deploy URL | -|*logsUrl* | `string` |Logs URL for this deployment | +_No output._ diff --git a/docs/reference/random.md b/docs/reference/random.md index e80e4ed0..c994cea9 100644 --- a/docs/reference/random.md +++ b/docs/reference/random.md @@ -16,13 +16,8 @@ Generate a random string ### random.#String Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*seed* | `string` |Seed of the random string to generate. When using the same `seed`, the same random string will be generated because of caching. | -|*length* | `*12 \| number` |length of the string | +_No input._ ### random.#String Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*out* | `string` |generated random string | +_No output._ diff --git a/docs/reference/terraform.md b/docs/reference/terraform.md index 0318ba15..9c582ffb 100644 --- a/docs/reference/terraform.md +++ b/docs/reference/terraform.md @@ -16,13 +16,8 @@ Terraform configuration ### terraform.#Configuration Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"latest" \| string` |Terraform version | -|*source* | `dagger.#Artifact` |Source configuration | +_No input._ ### terraform.#Configuration Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*output* | `struct` |- | +_No output._ diff --git a/docs/reference/trivy.md b/docs/reference/trivy.md index 446f2b66..0d1158f1 100644 --- a/docs/reference/trivy.md +++ b/docs/reference/trivy.md @@ -42,6 +42,4 @@ _No input._ ### trivy.#Image Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*ref* | `string` |Reference analyzed | +_No output._ From 55bf5ff4ddef314ac92880bce365301b86b71f24 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:39:22 -0700 Subject: [PATCH 17/38] Restore TrackProjectCommand + comment (so we can use it later for telemetry) Signed-off-by: Joel Longtine --- cmd/dagger/cmd/common/track.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cmd/dagger/cmd/common/track.go b/cmd/dagger/cmd/common/track.go index cff3e745..b492ad70 100644 --- a/cmd/dagger/cmd/common/track.go +++ b/cmd/dagger/cmd/common/track.go @@ -28,6 +28,34 @@ func commandName(cmd *cobra.Command) string { return strings.Join(parts, " ") } +// TrackProjectCommand is like TrackCommand but includes project and +// optionally environment metadata. +// func TrackProjectCommand(ctx context.Context, cmd *cobra.Command, w *state.Project, env *state.State, props ...*telemetry.Property) chan struct{} { +// props = append([]*telemetry.Property{ +// { +// // Hash the repository URL for privacy +// Name: "git_repository_hash", +// Value: hash(gitRepoURL(w.Path)), +// }, +// { +// // The project path might contain the username (e.g. /home/user/project), so we hash it for privacy. +// Name: "project_path_hash", +// Value: hash(w.Path), +// }, +// }, props...) + +// if env != nil { +// props = append([]*telemetry.Property{ +// { +// Name: "environment_name", +// Value: env.Name, +// }, +// }, props...) +// } + +// return TrackCommand(ctx, cmd, props...) +// } + // hash returns the sha256 digest of the string // func hash(s string) string { // return fmt.Sprintf("%x", sha256.Sum256([]byte(s))) From 7e86b009629100e2ec570f53d1480b6884d55ede Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:50:48 -0700 Subject: [PATCH 18/38] Remove keychain Signed-off-by: Joel Longtine --- cmd/dagger/cmd/root.go | 9 --- keychain/encrypt.go | 162 ----------------------------------------- keychain/keys.go | 140 ----------------------------------- 3 files changed, 311 deletions(-) delete mode 100644 keychain/encrypt.go delete mode 100644 keychain/keys.go diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 4d0f4cb1..37252ab6 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -9,7 +9,6 @@ import ( "github.com/spf13/viper" "go.dagger.io/dagger/cmd/dagger/cmd/mod" "go.dagger.io/dagger/cmd/dagger/logger" - "go.dagger.io/dagger/keychain" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" @@ -34,15 +33,7 @@ func init() { rootCmd.PersistentFlags().String("project", "", "Specify a project directory (defaults to current)") rootCmd.PersistentPreRun = func(cmd *cobra.Command, _ []string) { - lg := logger.New() - ctx := lg.WithContext(cmd.Context()) - go checkVersion() - - err := keychain.EnsureDefaultKey(ctx) - if err != nil { - lg.Fatal().Err(err).Msg("failed to generate default key") - } } rootCmd.PersistentPostRun = func(*cobra.Command, []string) { warnVersion() diff --git a/keychain/encrypt.go b/keychain/encrypt.go deleted file mode 100644 index 77a7a225..00000000 --- a/keychain/encrypt.go +++ /dev/null @@ -1,162 +0,0 @@ -package keychain - -import ( - "context" - "fmt" - "os" - "time" - - "go.mozilla.org/sops/v3" - sopsaes "go.mozilla.org/sops/v3/aes" - sopsage "go.mozilla.org/sops/v3/age" - "go.mozilla.org/sops/v3/cmd/sops/common" - sopskeys "go.mozilla.org/sops/v3/keys" - sopsyaml "go.mozilla.org/sops/v3/stores/yaml" - "go.mozilla.org/sops/v3/version" -) - -var ( - cipher = sopsaes.NewCipher() -) - -// setupEnv: hack to inject a SOPS env var for age -func setupEnv() error { - p, err := Path() - if err != nil { - return err - } - return os.Setenv("SOPS_AGE_KEY_FILE", p) -} - -// Encrypt data using SOPS with the AGE backend, using the provided public key -func Encrypt(ctx context.Context, path string, plaintext []byte, key string) ([]byte, error) { - if err := setupEnv(); err != nil { - return nil, err - } - - store := &sopsyaml.Store{} - branches, err := store.LoadPlainFile(plaintext) - if err != nil { - return nil, err - } - - ageKeys, err := sopsage.MasterKeysFromRecipients(key) - if err != nil { - return nil, err - } - ageMasterKeys := make([]sopskeys.MasterKey, 0, len(ageKeys)) - for _, k := range ageKeys { - ageMasterKeys = append(ageMasterKeys, k) - } - var group sops.KeyGroup - group = append(group, ageMasterKeys...) - - tree := sops.Tree{ - Branches: branches, - Metadata: sops.Metadata{ - KeyGroups: []sops.KeyGroup{group}, - EncryptedSuffix: "secret", - Version: version.Version, - }, - FilePath: path, - } - - // Generate a data key - dataKey, errs := tree.GenerateDataKey() - if len(errs) > 0 { - return nil, fmt.Errorf("error encrypting the data key with one or more master keys: %v", errs) - } - - err = common.EncryptTree(common.EncryptTreeOpts{ - DataKey: dataKey, Tree: &tree, Cipher: cipher, - }) - if err != nil { - return nil, err - } - return store.EmitEncryptedFile(tree) -} - -// Reencrypt a file with new content using the same keys -func Reencrypt(_ context.Context, path string, plaintext []byte) ([]byte, error) { - if err := setupEnv(); err != nil { - return nil, err - } - - current, err := os.ReadFile(path) - if err != nil { - return nil, err - } - - // Load the encrypted file - store := &sopsyaml.Store{} - tree, err := store.LoadEncryptedFile(current) - if err != nil { - return nil, err - } - - // Update the file with the new data - newBranches, err := store.LoadPlainFile(plaintext) - if err != nil { - return nil, err - } - tree.Branches = newBranches - - // Re-encrypt the file - key, err := tree.Metadata.GetDataKey() - if err != nil { - return nil, err - } - err = common.EncryptTree(common.EncryptTreeOpts{ - DataKey: key, Tree: &tree, Cipher: cipher, - }) - if err != nil { - return nil, err - } - - return store.EmitEncryptedFile(tree) -} - -// Decrypt data using sops -func Decrypt(_ context.Context, encrypted []byte) ([]byte, error) { - if err := setupEnv(); err != nil { - return nil, err - } - - store := &sopsyaml.Store{} - - // Load SOPS file and access the data key - tree, err := store.LoadEncryptedFile(encrypted) - if err != nil { - return nil, err - } - key, err := tree.Metadata.GetDataKey() - if err != nil { - if userErr, ok := err.(sops.UserError); ok { - err = fmt.Errorf(userErr.UserError()) - } - return nil, err - } - - // Decrypt the tree - mac, err := tree.Decrypt(key, cipher) - if err != nil { - return nil, err - } - - // Compute the hash of the cleartext tree and compare it with - // the one that was stored in the document. If they match, - // integrity was preserved - originalMac, err := cipher.Decrypt( - tree.Metadata.MessageAuthenticationCode, - key, - tree.Metadata.LastModified.Format(time.RFC3339), - ) - if err != nil { - return nil, err - } - if originalMac != mac { - return nil, fmt.Errorf("failed to verify data integrity. expected mac %q, got %q", originalMac, mac) - } - - return store.EmitPlainFile(tree.Branches) -} diff --git a/keychain/keys.go b/keychain/keys.go deleted file mode 100644 index 017a563b..00000000 --- a/keychain/keys.go +++ /dev/null @@ -1,140 +0,0 @@ -package keychain - -import ( - "context" - "errors" - "fmt" - "os" - "path/filepath" - "time" - - "filippo.io/age" - "github.com/mitchellh/go-homedir" - "github.com/rs/zerolog/log" -) - -func Path() (string, error) { - return homedir.Expand("~/.config/dagger/keys.txt") -} - -func EnsureDefaultKey(ctx context.Context) error { - keysFile, err := Path() - if err != nil { - return err - } - - // If the keys file already exists, there's nothing to do. - _, err = os.Stat(keysFile) - if err == nil { - return nil - } - - // If we got a different error than not existent, abort - if !errors.Is(err, os.ErrNotExist) { - return err - } - - // Attempt a migration from the old keys file - migrated, err := migrateKeys(ctx, keysFile) - if err != nil { - return err - } - - // If we migrated a previous identity, stop here. - if migrated { - return nil - } - - // Otherwise, generate a new key - log.Ctx(ctx).Debug().Msg("generating default key pair") - _, err = Generate(ctx) - return err -} - -// migrateKeys attempts a migration from `~/.dagger/keys.txt` to `~/.config/dagger/keys.txt` -func migrateKeys(ctx context.Context, keysFile string) (bool, error) { - oldKeysFile, err := homedir.Expand("~/.dagger/keys.txt") - if err != nil { - return false, err - } - - if _, err := os.Stat(oldKeysFile); err != nil { - return false, nil - } - - if err := os.MkdirAll(filepath.Dir(keysFile), 0700); err != nil { - return false, err - } - - log.Ctx(ctx).Info().Msg("migrating keychain") - return true, os.Rename(oldKeysFile, keysFile) -} - -func Default(ctx context.Context) (string, error) { - keys, err := List(ctx) - if err != nil { - return "", err - } - if len(keys) == 0 { - return "", errors.New("no identities found in the keys file") - } - - return keys[0].Recipient().String(), nil -} - -func Generate(ctx context.Context) (string, error) { - keysFile, err := Path() - if err != nil { - return "", err - } - - k, err := age.GenerateX25519Identity() - if err != nil { - return "", fmt.Errorf("internal error: %v", err) - } - - if err := os.MkdirAll(filepath.Dir(keysFile), 0700); err != nil { - return "", err - } - f, err := os.OpenFile(keysFile, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0600) - if err != nil { - return "", fmt.Errorf("failed to open keys file %q: %v", keysFile, err) - } - defer f.Close() - fmt.Fprintf(f, "# created: %s\n", time.Now().Format(time.RFC3339)) - fmt.Fprintf(f, "# public key: %s\n", k.Recipient()) - fmt.Fprintf(f, "%s\n", k) - - pubkey := k.Recipient().String() - - log.Ctx(ctx).Debug().Str("publicKey", pubkey).Msg("keypair generated") - - return pubkey, nil -} - -func List(ctx context.Context) ([]*age.X25519Identity, error) { - keysFile, err := Path() - if err != nil { - return nil, err - } - - f, err := os.Open(keysFile) - if err != nil { - return nil, fmt.Errorf("failed to open keys file %q: %w", keysFile, err) - } - ids, err := age.ParseIdentities(f) - if err != nil { - return nil, fmt.Errorf("failed to parse input: %w", err) - } - - keys := make([]*age.X25519Identity, 0, len(ids)) - for _, id := range ids { - key, ok := id.(*age.X25519Identity) - if !ok { - return nil, fmt.Errorf("internal error: unexpected identity type: %T", id) - } - keys = append(keys, key) - } - - return keys, nil -} From 43a46128e0c323ca2b6f7be7067b63b77b4bd7c0 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Fri, 18 Feb 2022 16:51:22 -0700 Subject: [PATCH 19/38] Remove pre-Europa tests Signed-off-by: Joel Longtine --- cmd/dagger/cmd/doc.go | 41 - mod/mod.go | 4 +- mod/require.go | 6 +- mod/require_test.go | 8 +- .../.dagger/env/alpine/.gitignore | 2 - .../.dagger/env/alpine/values.yaml | 23 - .../.dagger/env/argocd-infra/.gitignore | 2 - .../.dagger/env/argocd-infra/values.yaml | 23 - .../.dagger/env/argocd/.gitignore | 2 - .../.dagger/env/argocd/values.yaml | 26 - .../.dagger/env/aws-ecr-localstack/.gitignore | 2 - .../env/aws-ecr-localstack/values.yaml | 30 - .../.dagger/env/aws-ecr/.gitignore | 2 - .../.dagger/env/aws-ecr/values.yaml | 28 - .../.dagger/env/aws-eks/.gitignore | 2 - .../.dagger/env/aws-eks/values.yaml | 28 - .../.dagger/env/aws-s3-localstack/.gitignore | 2 - .../.dagger/env/aws-s3-localstack/values.yaml | 33 - .../.dagger/env/aws-s3/.gitignore | 2 - .../.dagger/env/aws-s3/values.yaml | 31 - .../env/azure-resourcegroup/.gitignore | 2 - .../env/azure-resourcegroup/values.yaml | 23 - .../.dagger/env/bats/.gitignore | 2 - .../.dagger/env/bats/values.yaml | 27 - .../.dagger/env/docker-build/.gitignore | 2 - .../.dagger/env/docker-build/values.yaml | 30 - .../.gitignore | 2 - .../values.yaml | 32 - .../.gitignore | 2 - .../values.yaml | 32 - .../.dagger/env/docker-command-ssh/.gitignore | 2 - .../env/docker-command-ssh/values.yaml | 32 - .../.dagger/env/docker-compose/.gitignore | 2 - .../.dagger/env/docker-compose/values.yaml | 33 - .../.dagger/env/docker-load/.gitignore | 2 - .../.dagger/env/docker-load/values.yaml | 30 - .../.dagger/env/docker-pull/.gitignore | 2 - .../.dagger/env/docker-pull/values.yaml | 26 - .../env/docker-push-invalid-creds/.gitignore | 2 - .../env/docker-push-invalid-creds/values.yaml | 28 - .../env/docker-push-multi-registry/.gitignore | 2 - .../docker-push-multi-registry/values.yaml | 34 - .../.dagger/env/docker-push/.gitignore | 2 - .../.dagger/env/docker-push/values.yaml | 28 - .../.dagger/env/docker-run-local/.gitignore | 2 - .../.dagger/env/docker-run-local/values.yaml | 27 - .../.dagger/env/docker-run-ports/.gitignore | 2 - .../.dagger/env/docker-run-ports/values.yaml | 27 - .../.dagger/env/docker-run-ssh/.gitignore | 2 - .../.dagger/env/docker-run-ssh/values.yaml | 30 - .../.dagger/env/git-commit/.gitignore | 2 - .../.dagger/env/git-commit/values.yaml | 26 - .../.dagger/env/git-repo/.gitignore | 2 - .../.dagger/env/git-repo/values.yaml | 26 - pkg/alpha.dagger.io/.dagger/env/go/.gitignore | 2 - .../.dagger/env/go/values.yaml | 27 - .../.dagger/env/google-cloudrun/.gitignore | 2 - .../.dagger/env/google-cloudrun/values.yaml | 30 - .../.dagger/env/google-gcr/.gitignore | 2 - .../.dagger/env/google-gcr/values.yaml | 30 - .../.dagger/env/google-gcs/.gitignore | 2 - .../.dagger/env/google-gcs/values.yaml | 35 - .../.dagger/env/google-gke/.gitignore | 2 - .../.dagger/env/google-gke/values.yaml | 30 - .../env/google-secretmanager/.gitignore | 2 - .../env/google-secretmanager/values.yaml | 32 - .../.dagger/env/graphql/.gitignore | 2 - .../.dagger/env/graphql/values.yaml | 27 - .../.dagger/env/http/.gitignore | 2 - .../.dagger/env/http/values.yaml | 27 - .../.dagger/env/java-maven/.gitignore | 2 - .../.dagger/env/java-maven/values.yaml | 27 - .../.dagger/env/js-yarn/.gitignore | 2 - .../.dagger/env/js-yarn/values.yaml | 34 - .../env/kubernetes-deployment/.gitignore | 2 - .../env/kubernetes-deployment/values.yaml | 45 -- .../.dagger/env/kubernetes-helm/.gitignore | 2 - .../.dagger/env/kubernetes-helm/values.yaml | 48 -- .../env/kubernetes-kustomize/.gitignore | 2 - .../env/kubernetes-kustomize/values.yaml | 27 - .../.dagger/env/netlify/.gitignore | 2 - .../.dagger/env/netlify/values.yaml | 28 - .../.dagger/env/os-container/.gitignore | 2 - .../.dagger/env/os-container/values.yaml | 28 - pkg/alpha.dagger.io/.dagger/env/os/.gitignore | 2 - .../.dagger/env/os/values.yaml | 23 - .../.dagger/env/sanity-check/.gitignore | 2 - .../env/sanity-check/plan/cue.mod/module.cue | 1 - .../sanity-check/plan/cue.mod/pkg/.gitignore | 3 - .../.dagger/env/sanity-check/plan/main.cue | 69 -- .../.dagger/env/sanity-check/values.yaml | 27 - .../.dagger/env/terraform/.gitignore | 2 - .../.dagger/env/terraform/values.yaml | 31 - .../.dagger/env/trivy/.gitignore | 2 - .../.dagger/env/trivy/values.yaml | 32 - pkg/alpha.dagger.io/.gitignore | 2 - pkg/alpha.dagger.io/alpine/alpine.cue | 36 - pkg/alpha.dagger.io/alpine/tests/alpine.cue | 43 - pkg/alpha.dagger.io/argocd/app.cue | 48 -- pkg/alpha.dagger.io/argocd/argocd.cue | 99 --- pkg/alpha.dagger.io/argocd/status.cue | 59 -- pkg/alpha.dagger.io/argocd/sync.cue | 41 - pkg/alpha.dagger.io/argocd/tests/argocd.cue | 38 - .../argocd/tests/infra/infra.cue | 14 - pkg/alpha.dagger.io/aws/aws.cue | 151 ---- .../aws/cloudformation/cloudformation.cue | 94 --- .../aws/cloudformation/code.cue | 108 --- pkg/alpha.dagger.io/aws/ecr/ecr.cue | 32 - pkg/alpha.dagger.io/aws/ecr/tests/ecr.cue | 95 --- pkg/alpha.dagger.io/aws/ecs/run-task.cue | 70 -- pkg/alpha.dagger.io/aws/eks/code.cue | 27 - pkg/alpha.dagger.io/aws/eks/eks.cue | 61 -- pkg/alpha.dagger.io/aws/eks/tests/eks.cue | 52 -- pkg/alpha.dagger.io/aws/elb/elb.cue | 85 -- pkg/alpha.dagger.io/aws/rds/rds.cue | 249 ------ pkg/alpha.dagger.io/aws/s3/s3.cue | 98 --- pkg/alpha.dagger.io/aws/s3/tests/s3.cue | 46 -- .../aws/s3/tests/testdata/bar/foo.txt | 1 - .../aws/s3/tests/testdata/dirFile.txt | 1 - pkg/alpha.dagger.io/aws/s3/tests/verify.cue | 89 --- pkg/alpha.dagger.io/azure/azure.cue | 53 -- .../azure/resourcegroup/rg.cue | 48 -- .../azure/resourcegroup/tests/rg.cue | 17 - .../azure/staticwebapp/stapp.cue | 79 -- .../azure/staticwebapp/tests/stapp.cue | 31 - pkg/alpha.dagger.io/azure/storage/st.cue | 52 -- .../azure/storage/tests/st.cue | 28 - pkg/alpha.dagger.io/bats/bats.cue | 56 -- pkg/alpha.dagger.io/bats/tests/bats.cue | 7 - .../testfile/mods/bats-assert/CHANGELOG.md | 39 - .../tests/testfile/mods/bats-assert/LICENSE | 116 --- .../tests/testfile/mods/bats-assert/README.md | 712 ----------------- .../tests/testfile/mods/bats-assert/load.bash | 1 - .../testfile/mods/bats-assert/package.json | 47 -- .../testfile/mods/bats-assert/src/assert.bash | 755 ------------------ .../testfile/mods/bats-support/.travis.yml | 7 - .../testfile/mods/bats-support/CHANGELOG.md | 37 - .../tests/testfile/mods/bats-support/LICENSE | 116 --- .../testfile/mods/bats-support/README.md | 128 --- .../testfile/mods/bats-support/load.bash | 2 - .../testfile/mods/bats-support/package.json | 5 - .../mods/bats-support/script/install-bats.sh | 6 - .../testfile/mods/bats-support/src/error.bash | 41 - .../mods/bats-support/src/output.bash | 279 ------- .../bats/tests/testfile/test.bats | 12 - pkg/alpha.dagger.io/cue.mod/module.cue | 1 - pkg/alpha.dagger.io/cue.mod/pkg/.gitignore | 3 - pkg/alpha.dagger.io/dagger/dagger.cue | 39 - pkg/alpha.dagger.io/dagger/op/op.cue | 147 ---- pkg/alpha.dagger.io/dagger/op/op_fullop.cue | 19 - pkg/alpha.dagger.io/docker/command.cue | 238 ------ pkg/alpha.dagger.io/docker/compose/client.cue | 16 - .../docker/compose/compose.cue | 95 --- .../docker/compose/tests/cleanup.cue | 93 --- .../docker/compose/tests/compose.cue | 88 -- .../docker/compose/tests/testdata/Dockerfile | 15 - .../tests/testdata/docker-compose.yaml | 7 - .../docker/compose/tests/testdata/index.ts | 13 - .../compose/tests/testdata/package.json | 22 - .../compose/tests/testdata/tsconfig.json | 12 - pkg/alpha.dagger.io/docker/docker.cue | 296 ------- .../docker/tests/build/dockerfile.cue | 84 -- .../tests/build/testdata/build/Dockerfile | 2 - .../tests/build/testdata/dockerfile/test.txt | 1 - .../docker/tests/command-host/command.cue | 13 - .../command-ssh-key-passphrase/command.cue | 25 - .../command.cue | 24 - .../docker/tests/command-ssh/command.cue | 26 - .../docker/tests/load/load.cue | 32 - .../docker/tests/load/testdata/Dockerfile | 2 - .../docker/tests/pull/pull.cue | 25 - .../docker/tests/push-invalid-creds/push.cue | 36 - .../docker/tests/push-multi-registry/push.cue | 65 -- .../docker/tests/push/push.cue | 36 - .../docker/tests/run-host/simple.cue | 21 - .../docker/tests/run-local/local.cue | 18 - .../docker/tests/run-ports/ports.cue | 19 - .../docker/tests/run-ssh/simple.cue | 29 - pkg/alpha.dagger.io/gcp/cloudrun/cloudrun.cue | 66 -- .../gcp/cloudrun/tests/cloudrun.cue | 18 - pkg/alpha.dagger.io/gcp/gcloud.cue | 56 -- pkg/alpha.dagger.io/gcp/gcp.cue | 18 - pkg/alpha.dagger.io/gcp/gcr/gcr.cue | 47 -- pkg/alpha.dagger.io/gcp/gcr/tests/gcr.cue | 86 -- pkg/alpha.dagger.io/gcp/gcs/gcs.cue | 82 -- pkg/alpha.dagger.io/gcp/gcs/tests/gcs.cue | 43 - .../gcp/gcs/tests/testdata/bar/foo.txt | 1 - .../gcp/gcs/tests/testdata/dirFile.txt | 1 - pkg/alpha.dagger.io/gcp/gcs/tests/verify.cue | 89 --- pkg/alpha.dagger.io/gcp/gke/gke.cue | 85 -- pkg/alpha.dagger.io/gcp/gke/tests/gke.cue | 32 - .../gcp/secretmanager/secrets.cue | 76 -- .../gcp/secretmanager/tests/secrets.cue | 33 - pkg/alpha.dagger.io/git/commit.cue | 89 --- pkg/alpha.dagger.io/git/git.cue | 163 ---- pkg/alpha.dagger.io/git/image.cue | 9 - .../git/tests/commit/commit.cue | 79 -- pkg/alpha.dagger.io/git/tests/git/git.cue | 111 --- pkg/alpha.dagger.io/go/go.cue | 135 ---- pkg/alpha.dagger.io/go/tests/go.cue | 33 - pkg/alpha.dagger.io/go/tests/testdata/go.mod | 3 - pkg/alpha.dagger.io/go/tests/testdata/main.go | 7 - pkg/alpha.dagger.io/graphql/graphql.cue | 39 - pkg/alpha.dagger.io/graphql/tests/graphql.cue | 55 -- pkg/alpha.dagger.io/helpers.bash | 109 --- pkg/alpha.dagger.io/http/http.cue | 159 ---- pkg/alpha.dagger.io/http/tests/http.cue | 62 -- pkg/alpha.dagger.io/io/io.cue | 40 - pkg/alpha.dagger.io/java/maven/maven.cue | 69 -- .../java/maven/tests/maven.cue | 43 - .../java/maven/tests/testdata/.gitignore | 33 - .../java/maven/tests/testdata/pom.xml | 41 - .../SpringBootTestApplication.java | 13 - .../src/main/resources/application.properties | 1 - .../SpringBootTestApplicationTests.java | 13 - .../js/yarn/tests/testdata/package.json | 11 - .../js/yarn/tests/testdata2/package.json | 12 - pkg/alpha.dagger.io/js/yarn/tests/yarn.cue | 57 -- pkg/alpha.dagger.io/js/yarn/yarn.cue | 100 --- pkg/alpha.dagger.io/kubernetes/helm/code.cue | 43 - pkg/alpha.dagger.io/kubernetes/helm/helm.cue | 143 ---- .../kubernetes/helm/tests/helm.cue | 57 -- .../helm/tests/testdata/mychart/.helmignore | 23 - .../helm/tests/testdata/mychart/Chart.yaml | 21 - .../testdata/mychart/templates/NOTES.txt | 21 - .../testdata/mychart/templates/_helpers.tpl | 63 -- .../mychart/templates/deployment.yaml | 55 -- .../testdata/mychart/templates/ingress.yaml | 41 - .../testdata/mychart/templates/service.yaml | 15 - .../mychart/templates/serviceaccount.yaml | 12 - .../templates/tests/test-connection.yaml | 15 - .../helm/tests/testdata/mychart/values.yaml | 68 -- .../kubernetes/helm/tests/verify.cue | 51 -- pkg/alpha.dagger.io/kubernetes/kubernetes.cue | 132 --- .../kubernetes/kustomize/kustomization.cue | 99 --- .../kubernetes/kustomize/tests/kustomize.cue | 31 - .../kustomize/tests/testdata/deployment.yaml | 22 - .../kustomize/tests/testdata/pod.yaml | 12 - .../kubernetes/kustomize/tests/verify.cue | 72 -- .../kubernetes/tests/kubernetes.cue | 61 -- .../kubernetes/tests/verify.cue | 78 -- pkg/alpha.dagger.io/netlify/netlify.cue | 91 --- pkg/alpha.dagger.io/netlify/netlify.sh.cue | 56 -- pkg/alpha.dagger.io/netlify/tests/netlify.cue | 50 -- pkg/alpha.dagger.io/os/container.cue | 133 --- pkg/alpha.dagger.io/os/dir.cue | 44 - pkg/alpha.dagger.io/os/file.cue | 43 - .../os/tests/container/container.cue | 26 - pkg/alpha.dagger.io/os/tests/os/os.cue | 25 - pkg/alpha.dagger.io/package.json | 11 - pkg/alpha.dagger.io/random/string.cue | 61 -- pkg/alpha.dagger.io/terraform/terraform.cue | 75 -- .../terraform/tests/terraform.cue | 73 -- .../terraform/tests/testdata/test.tf | 34 - pkg/alpha.dagger.io/trivy/image.cue | 64 -- pkg/alpha.dagger.io/trivy/tests/trivy.cue | 127 --- pkg/alpha.dagger.io/trivy/trivy.cue | 128 --- pkg/alpha.dagger.io/universe.bats | 292 ------- pkg/alpha.dagger.io/yarn.lock | 15 - pkg/pkg.go | 4 +- tests/cli.bats | 477 ----------- tests/cli/input/artifact/main.cue | 25 - tests/cli/input/artifact/testdata/testfile | 1 - tests/cli/input/bool/main.cue | 11 - tests/cli/input/git/main.cue | 18 - tests/cli/input/ignore/main.cue | 20 - tests/cli/input/ignore/testdata/.dagger/foo | 0 tests/cli/input/ignore/testdata/testfile | 1 - tests/cli/input/list/main.cue | 44 - tests/cli/input/simple/main.cue | 10 - tests/cli/input/simple/testdata/input.json | 4 - tests/cli/input/simple/testdata/input.txt | 1 - tests/cli/input/simple/testdata/input.yaml | 2 - tests/cli/output/list/main.cue | 26 - tests/cli/packages/a/main.cue | 19 - tests/cli/packages/b/main.cue | 19 - tests/cli/packages/cue.mod/module.cue | 1 - tests/cli/simple/main.cue | 21 - tests/core.bats | 151 ---- .../compute/invalid/bool/cue.mod/module.cue | 1 - .../invalid/bool/cue.mod/pkg/.gitignore | 2 - tests/core/compute/invalid/bool/main.cue | 3 - .../compute/invalid/int/cue.mod/module.cue | 1 - .../invalid/int/cue.mod/pkg/.gitignore | 2 - tests/core/compute/invalid/int/main.cue | 3 - .../compute/invalid/string/cue.mod/module.cue | 1 - .../invalid/string/cue.mod/pkg/.gitignore | 2 - tests/core/compute/invalid/string/main.cue | 3 - .../compute/invalid/struct/cue.mod/module.cue | 1 - .../invalid/struct/cue.mod/pkg/.gitignore | 2 - tests/core/compute/invalid/struct/main.cue | 3 - .../success/exec-nocache/cue.mod/module.cue | 1 - .../exec-nocache/cue.mod/pkg/.gitignore | 2 - .../compute/success/exec-nocache/main.cue | 25 - .../compute/success/noop/cue.mod/module.cue | 1 - .../success/noop/cue.mod/pkg/.gitignore | 2 - tests/core/compute/success/noop/main.cue | 6 - .../success/overload/flat/cue.mod/module.cue | 1 - .../overload/flat/cue.mod/pkg/.gitignore | 2 - .../compute/success/overload/flat/main.cue | 19 - .../overload/wrapped/cue.mod/module.cue | 1 - .../overload/wrapped/cue.mod/pkg/.gitignore | 2 - .../compute/success/overload/wrapped/main.cue | 21 - .../compute/success/simple/cue.mod/module.cue | 1 - .../success/simple/cue.mod/pkg/.gitignore | 2 - tests/core/compute/success/simple/main.cue | 13 - .../interpolation/cue.mod/module.cue | 1 - .../interpolation/cue.mod/pkg/.gitignore | 2 - .../core/dependencies/interpolation/main.cue | 47 -- .../dependencies/simple/cue.mod/module.cue | 1 - .../simple/cue.mod/pkg/.gitignore | 2 - tests/core/dependencies/simple/main.cue | 47 -- .../dependencies/unmarshal/cue.mod/module.cue | 1 - .../unmarshal/cue.mod/pkg/.gitignore | 2 - tests/core/dependencies/unmarshal/main.cue | 52 -- .../exclude/.dagger/env/default/.gitignore | 2 - .../env/default/plan/cue.mod/module.cue | 1 - .../env/default/plan/cue.mod/pkg/.gitignore | 2 - .../exclude/.dagger/env/default/plan/main.cue | 41 - .../exclude/.dagger/env/default/values.yaml | 30 - tests/core/exclude/testdata/a.txt | 0 tests/core/exclude/testdata/b.txt | 0 tests/core/exclude/testdata/foo/bar.txt | 0 tests/core/exclude/testdata/foo/cow.json | 0 tests/core/inputs-outputs/test-core.cue | 15 - .../core/platform-config/platform-config.cue | 58 -- .../secrets/invalid/env/cue.mod/module.cue | 1 - .../invalid/env/cue.mod/pkg/.gitignore | 4 - tests/core/secrets/invalid/env/env.cue | 21 - .../secrets/invalid/string/cue.mod/module.cue | 1 - .../invalid/string/cue.mod/pkg/.gitignore | 4 - tests/core/secrets/invalid/string/string.cue | 21 - tests/core/secrets/simple/cue.mod/module.cue | 1 - .../secrets/simple/cue.mod/pkg/.gitignore | 4 - tests/core/secrets/simple/simple.cue | 32 - tests/core/stream/main.cue | 23 - tests/ops.bats | 243 ------ .../ops/copy/invalid/cache/cue.mod/module.cue | 1 - .../copy/invalid/cache/cue.mod/pkg/.gitignore | 2 - tests/ops/copy/invalid/cache/main.cue | 49 -- .../copy/valid/component/cue.mod/module.cue | 1 - .../valid/component/cue.mod/pkg/.gitignore | 2 - tests/ops/copy/valid/component/main.cue | 61 -- .../ops/copy/valid/script/cue.mod/module.cue | 1 - .../copy/valid/script/cue.mod/pkg/.gitignore | 2 - tests/ops/copy/valid/script/main.cue | 26 - tests/ops/dockerbuild/cue.mod/module.cue | 1 - tests/ops/dockerbuild/cue.mod/pkg/.gitignore | 2 - tests/ops/dockerbuild/main.cue | 122 --- tests/ops/dockerbuild/testdata/Dockerfile | 3 - .../testdata/dockerfilepath/Dockerfile.custom | 2 - tests/ops/dockerbuild/testdata/foo | 1 - tests/ops/exec/always/cue.mod/module.cue | 1 - tests/ops/exec/always/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/always/main.cue | 13 - .../exec/dir/doesnotexist/cue.mod/module.cue | 1 - .../dir/doesnotexist/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/dir/doesnotexist/main.cue | 16 - tests/ops/exec/dir/exist/cue.mod/module.cue | 1 - .../ops/exec/dir/exist/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/dir/exist/main.cue | 16 - tests/ops/exec/env/invalid/cue.mod/module.cue | 1 - .../exec/env/invalid/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/env/invalid/main.cue | 15 - tests/ops/exec/env/overlay/cue.mod/module.cue | 1 - .../exec/env/overlay/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/env/overlay/main.cue | 18 - tests/ops/exec/env/valid/cue.mod/module.cue | 1 - .../ops/exec/env/valid/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/env/valid/main.cue | 16 - tests/ops/exec/error/cue.mod/module.cue | 1 - tests/ops/exec/error/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/error/main.cue | 12 - tests/ops/exec/exit_code/main.cue | 12 - tests/ops/exec/invalid/cue.mod/module.cue | 1 - tests/ops/exec/invalid/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/invalid/main.cue | 11 - tests/ops/exec/simple/cue.mod/module.cue | 1 - tests/ops/exec/simple/cue.mod/pkg/.gitignore | 2 - tests/ops/exec/simple/main.cue | 12 - .../cue.mod/module.cue | 1 - .../cue.mod/pkg/.gitignore | 2 - .../non_concrete_not_referenced/main.cue | 20 - .../cue.mod/module.cue | 1 - .../cue.mod/pkg/.gitignore | 2 - .../non_concrete_referenced/main.cue | 20 - .../undefined/with_pkg_def/cue.mod/module.cue | 1 - .../with_pkg_def/cue.mod/pkg/.gitignore | 2 - .../cue.mod/pkg/test.dagger.io/def/main.cue | 16 - .../ops/exec/undefined/with_pkg_def/main.cue | 12 - .../with_pkg_mandatory/cue.mod/module.cue | 1 - .../with_pkg_mandatory/cue.mod/pkg/.gitignore | 2 - .../pkg/test.dagger.io/nonoptional/main.cue | 17 - .../undefined/with_pkg_mandatory/main.cue | 12 - .../with_pkg_optional/cue.mod/module.cue | 1 - .../with_pkg_optional/cue.mod/pkg/.gitignore | 2 - .../pkg/test.dagger.io/optional/main.cue | 16 - .../exec/undefined/with_pkg_optional/main.cue | 12 - tests/ops/export/bool/cue.mod/module.cue | 1 - tests/ops/export/bool/cue.mod/pkg/.gitignore | 2 - tests/ops/export/bool/main.cue | 25 - .../ops/export/concurrency/cue.mod/module.cue | 1 - .../export/concurrency/cue.mod/pkg/.gitignore | 2 - tests/ops/export/concurrency/main.cue | 210 ----- tests/ops/export/float/cue.mod/module.cue | 1 - tests/ops/export/float/cue.mod/pkg/.gitignore | 2 - tests/ops/export/float/main.cue | 24 - .../export/invalid/format/cue.mod/module.cue | 1 - .../invalid/format/cue.mod/pkg/.gitignore | 2 - tests/ops/export/invalid/format/main.cue | 24 - .../export/invalid/path/cue.mod/module.cue | 1 - .../invalid/path/cue.mod/pkg/.gitignore | 2 - tests/ops/export/invalid/path/main.cue | 16 - .../invalid/validation/cue.mod/module.cue | 1 - .../invalid/validation/cue.mod/pkg/.gitignore | 2 - tests/ops/export/invalid/validation/main.cue | 25 - tests/ops/export/json/cue.mod/module.cue | 1 - tests/ops/export/json/cue.mod/pkg/.gitignore | 2 - tests/ops/export/json/main.cue | 62 -- tests/ops/export/number/cue.mod/module.cue | 1 - .../ops/export/number/cue.mod/pkg/.gitignore | 2 - tests/ops/export/number/main.cue | 24 - tests/ops/export/string/cue.mod/module.cue | 1 - .../ops/export/string/cue.mod/pkg/.gitignore | 2 - tests/ops/export/string/main.cue | 24 - .../export/withvalidation/cue.mod/module.cue | 1 - .../withvalidation/cue.mod/pkg/.gitignore | 2 - tests/ops/export/withvalidation/main.cue | 25 - tests/ops/export/yaml/cue.mod/module.cue | 1 - tests/ops/export/yaml/cue.mod/pkg/.gitignore | 2 - tests/ops/export/yaml/main.cue | 63 -- .../fetch-container/exist/cue.mod/module.cue | 1 - .../exist/cue.mod/pkg/.gitignore | 2 - tests/ops/fetch-container/exist/main.cue | 33 - tests/ops/fetch-container/invalid/main.cue | 8 - .../nonexistent/digest/cue.mod/module.cue | 1 - .../nonexistent/digest/cue.mod/pkg/.gitignore | 2 - .../nonexistent/digest/main.cue | 9 - .../image-with-valid-digest/main.cue | 11 - .../nonexistent/image/cue.mod/module.cue | 1 - .../nonexistent/image/cue.mod/pkg/.gitignore | 2 - .../nonexistent/image/main.cue | 9 - .../nonexistent/tag/cue.mod/module.cue | 1 - .../nonexistent/tag/cue.mod/pkg/.gitignore | 2 - .../fetch-container/nonexistent/tag/main.cue | 9 - tests/ops/fetch-git/exist/cue.mod/module.cue | 1 - .../fetch-git/exist/cue.mod/pkg/.gitignore | 2 - tests/ops/fetch-git/exist/main.cue | 10 - tests/ops/fetch-git/gitdir/cue.mod/module.cue | 1 - .../fetch-git/gitdir/cue.mod/pkg/.gitignore | 2 - tests/ops/fetch-git/gitdir/main.cue | 35 - tests/ops/fetch-git/invalid/main.cue | 8 - .../nonexistent/bork/cue.mod/module.cue | 1 - .../nonexistent/bork/cue.mod/pkg/.gitignore | 2 - tests/ops/fetch-git/nonexistent/bork/main.cue | 10 - .../nonexistent/ref/cue.mod/module.cue | 1 - .../nonexistent/ref/cue.mod/pkg/.gitignore | 2 - tests/ops/fetch-git/nonexistent/ref/main.cue | 10 - .../nonexistent/remote/cue.mod/module.cue | 1 - .../nonexistent/remote/cue.mod/pkg/.gitignore | 2 - .../ops/fetch-git/nonexistent/remote/main.cue | 10 - .../.dagger/env/op-fetch-git/.gitignore | 2 - .../.dagger/env/op-fetch-git/values.yaml | 26 - .../fetch-git/private-repo/cue.mod/module.cue | 1 - .../private-repo/cue.mod/pkg/.gitignore | 2 - .../ops/fetch-git/private-repo/fetch-git.cue | 22 - tests/ops/fetch-http/exist/cue.mod/module.cue | 1 - .../fetch-http/exist/cue.mod/pkg/.gitignore | 2 - tests/ops/fetch-http/exist/main.cue | 9 - .../fetch-http/nonexistent/cue.mod/module.cue | 1 - .../nonexistent/cue.mod/pkg/.gitignore | 2 - tests/ops/fetch-http/nonexistent/main.cue | 9 - .../ops/load/invalid/cache/cue.mod/module.cue | 1 - .../load/invalid/cache/cue.mod/pkg/.gitignore | 2 - tests/ops/load/invalid/cache/main.cue | 39 - .../load/valid/component/cue.mod/module.cue | 1 - .../valid/component/cue.mod/pkg/.gitignore | 2 - tests/ops/load/valid/component/main.cue | 51 -- .../ops/load/valid/script/cue.mod/module.cue | 1 - .../load/valid/script/cue.mod/pkg/.gitignore | 2 - tests/ops/load/valid/script/main.cue | 21 - .../ops/mounts/valid/cache/cue.mod/module.cue | 1 - .../mounts/valid/cache/cue.mod/pkg/.gitignore | 2 - tests/ops/mounts/valid/cache/main.cue | 29 - .../mounts/valid/component/cue.mod/module.cue | 1 - .../valid/component/cue.mod/pkg/.gitignore | 2 - tests/ops/mounts/valid/component/main.cue | 36 - .../mounts/valid/script/cue.mod/module.cue | 1 - .../valid/script/cue.mod/pkg/.gitignore | 2 - tests/ops/mounts/valid/script/main.cue | 33 - .../ops/mounts/valid/tmpfs/cue.mod/module.cue | 1 - .../mounts/valid/tmpfs/cue.mod/pkg/.gitignore | 2 - tests/ops/mounts/valid/tmpfs/main.cue | 35 - .../.dagger/env/push-container/.gitignore | 2 - .../.dagger/env/push-container/values.yaml | 28 - tests/ops/push-container/cue.mod/module.cue | 1 - .../ops/push-container/cue.mod/pkg/.gitignore | 2 - tests/ops/push-container/main.cue | 123 --- .../subdir/invalid/exec/cue.mod/module.cue | 1 - .../invalid/exec/cue.mod/pkg/.gitignore | 2 - tests/ops/subdir/invalid/exec/main.cue | 31 - .../subdir/invalid/path/cue.mod/module.cue | 1 - .../invalid/path/cue.mod/pkg/.gitignore | 2 - tests/ops/subdir/invalid/path/main.cue | 26 - .../subdir/valid/container/cue.mod/module.cue | 1 - .../valid/container/cue.mod/pkg/.gitignore | 2 - tests/ops/subdir/valid/container/main.cue | 44 - .../subdir/valid/simple/cue.mod/module.cue | 1 - .../valid/simple/cue.mod/pkg/.gitignore | 2 - tests/ops/subdir/valid/simple/main.cue | 26 - universe | 1 - 511 files changed, 10 insertions(+), 15691 deletions(-) delete mode 100644 pkg/alpha.dagger.io/.dagger/env/alpine/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/alpine/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/argocd-infra/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/argocd-infra/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/argocd/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/argocd/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-ecr-localstack/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-ecr-localstack/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-ecr/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-ecr/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-eks/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-eks/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-s3-localstack/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-s3-localstack/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-s3/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/aws-s3/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/azure-resourcegroup/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/azure-resourcegroup/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/bats/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/bats/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-build/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-build/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-key-passphrase/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-key-passphrase/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-wrong-key-passphrase/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-wrong-key-passphrase/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-command-ssh/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-command-ssh/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-compose/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-compose/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-load/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-load/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-pull/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-pull/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-push-invalid-creds/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-push-invalid-creds/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-push-multi-registry/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-push-multi-registry/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-push/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-push/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-run-local/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-run-local/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-run-ports/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-run-ports/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-run-ssh/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/docker-run-ssh/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/git-commit/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/git-commit/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/git-repo/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/git-repo/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/go/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/go/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-cloudrun/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-cloudrun/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-gcr/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-gcr/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-gcs/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-gcs/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-gke/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-gke/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-secretmanager/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/google-secretmanager/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/graphql/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/graphql/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/http/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/http/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/java-maven/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/java-maven/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/js-yarn/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/js-yarn/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/kubernetes-deployment/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/kubernetes-deployment/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/kubernetes-helm/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/kubernetes-helm/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/kubernetes-kustomize/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/kubernetes-kustomize/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/netlify/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/netlify/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/os-container/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/os-container/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/os/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/os/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/sanity-check/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/cue.mod/module.cue delete mode 100644 pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/cue.mod/pkg/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/main.cue delete mode 100644 pkg/alpha.dagger.io/.dagger/env/sanity-check/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/terraform/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/terraform/values.yaml delete mode 100644 pkg/alpha.dagger.io/.dagger/env/trivy/.gitignore delete mode 100644 pkg/alpha.dagger.io/.dagger/env/trivy/values.yaml delete mode 100644 pkg/alpha.dagger.io/.gitignore delete mode 100644 pkg/alpha.dagger.io/alpine/alpine.cue delete mode 100644 pkg/alpha.dagger.io/alpine/tests/alpine.cue delete mode 100644 pkg/alpha.dagger.io/argocd/app.cue delete mode 100644 pkg/alpha.dagger.io/argocd/argocd.cue delete mode 100644 pkg/alpha.dagger.io/argocd/status.cue delete mode 100644 pkg/alpha.dagger.io/argocd/sync.cue delete mode 100644 pkg/alpha.dagger.io/argocd/tests/argocd.cue delete mode 100644 pkg/alpha.dagger.io/argocd/tests/infra/infra.cue delete mode 100644 pkg/alpha.dagger.io/aws/aws.cue delete mode 100644 pkg/alpha.dagger.io/aws/cloudformation/cloudformation.cue delete mode 100644 pkg/alpha.dagger.io/aws/cloudformation/code.cue delete mode 100644 pkg/alpha.dagger.io/aws/ecr/ecr.cue delete mode 100644 pkg/alpha.dagger.io/aws/ecr/tests/ecr.cue delete mode 100644 pkg/alpha.dagger.io/aws/ecs/run-task.cue delete mode 100644 pkg/alpha.dagger.io/aws/eks/code.cue delete mode 100644 pkg/alpha.dagger.io/aws/eks/eks.cue delete mode 100644 pkg/alpha.dagger.io/aws/eks/tests/eks.cue delete mode 100644 pkg/alpha.dagger.io/aws/elb/elb.cue delete mode 100644 pkg/alpha.dagger.io/aws/rds/rds.cue delete mode 100644 pkg/alpha.dagger.io/aws/s3/s3.cue delete mode 100644 pkg/alpha.dagger.io/aws/s3/tests/s3.cue delete mode 100644 pkg/alpha.dagger.io/aws/s3/tests/testdata/bar/foo.txt delete mode 100644 pkg/alpha.dagger.io/aws/s3/tests/testdata/dirFile.txt delete mode 100644 pkg/alpha.dagger.io/aws/s3/tests/verify.cue delete mode 100644 pkg/alpha.dagger.io/azure/azure.cue delete mode 100644 pkg/alpha.dagger.io/azure/resourcegroup/rg.cue delete mode 100644 pkg/alpha.dagger.io/azure/resourcegroup/tests/rg.cue delete mode 100644 pkg/alpha.dagger.io/azure/staticwebapp/stapp.cue delete mode 100644 pkg/alpha.dagger.io/azure/staticwebapp/tests/stapp.cue delete mode 100644 pkg/alpha.dagger.io/azure/storage/st.cue delete mode 100644 pkg/alpha.dagger.io/azure/storage/tests/st.cue delete mode 100644 pkg/alpha.dagger.io/bats/bats.cue delete mode 100644 pkg/alpha.dagger.io/bats/tests/bats.cue delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/CHANGELOG.md delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/LICENSE delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/README.md delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/load.bash delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/package.json delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/src/assert.bash delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/.travis.yml delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/CHANGELOG.md delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/LICENSE delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/README.md delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/load.bash delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/package.json delete mode 100755 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/script/install-bats.sh delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/src/error.bash delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/src/output.bash delete mode 100644 pkg/alpha.dagger.io/bats/tests/testfile/test.bats delete mode 100644 pkg/alpha.dagger.io/cue.mod/module.cue delete mode 100644 pkg/alpha.dagger.io/cue.mod/pkg/.gitignore delete mode 100644 pkg/alpha.dagger.io/dagger/dagger.cue delete mode 100644 pkg/alpha.dagger.io/dagger/op/op.cue delete mode 100644 pkg/alpha.dagger.io/dagger/op/op_fullop.cue delete mode 100644 pkg/alpha.dagger.io/docker/command.cue delete mode 100644 pkg/alpha.dagger.io/docker/compose/client.cue delete mode 100644 pkg/alpha.dagger.io/docker/compose/compose.cue delete mode 100644 pkg/alpha.dagger.io/docker/compose/tests/cleanup.cue delete mode 100644 pkg/alpha.dagger.io/docker/compose/tests/compose.cue delete mode 100644 pkg/alpha.dagger.io/docker/compose/tests/testdata/Dockerfile delete mode 100644 pkg/alpha.dagger.io/docker/compose/tests/testdata/docker-compose.yaml delete mode 100644 pkg/alpha.dagger.io/docker/compose/tests/testdata/index.ts delete mode 100644 pkg/alpha.dagger.io/docker/compose/tests/testdata/package.json delete mode 100644 pkg/alpha.dagger.io/docker/compose/tests/testdata/tsconfig.json delete mode 100644 pkg/alpha.dagger.io/docker/docker.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/build/dockerfile.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/build/testdata/build/Dockerfile delete mode 100644 pkg/alpha.dagger.io/docker/tests/build/testdata/dockerfile/test.txt delete mode 100644 pkg/alpha.dagger.io/docker/tests/command-host/command.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/command-ssh-key-passphrase/command.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/command-ssh-wrong-key-passphrase/command.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/command-ssh/command.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/load/load.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/load/testdata/Dockerfile delete mode 100644 pkg/alpha.dagger.io/docker/tests/pull/pull.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/push-invalid-creds/push.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/push-multi-registry/push.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/push/push.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/run-host/simple.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/run-local/local.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/run-ports/ports.cue delete mode 100644 pkg/alpha.dagger.io/docker/tests/run-ssh/simple.cue delete mode 100644 pkg/alpha.dagger.io/gcp/cloudrun/cloudrun.cue delete mode 100644 pkg/alpha.dagger.io/gcp/cloudrun/tests/cloudrun.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gcloud.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gcp.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gcr/gcr.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gcr/tests/gcr.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gcs/gcs.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gcs/tests/gcs.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gcs/tests/testdata/bar/foo.txt delete mode 100644 pkg/alpha.dagger.io/gcp/gcs/tests/testdata/dirFile.txt delete mode 100644 pkg/alpha.dagger.io/gcp/gcs/tests/verify.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gke/gke.cue delete mode 100644 pkg/alpha.dagger.io/gcp/gke/tests/gke.cue delete mode 100644 pkg/alpha.dagger.io/gcp/secretmanager/secrets.cue delete mode 100644 pkg/alpha.dagger.io/gcp/secretmanager/tests/secrets.cue delete mode 100644 pkg/alpha.dagger.io/git/commit.cue delete mode 100644 pkg/alpha.dagger.io/git/git.cue delete mode 100644 pkg/alpha.dagger.io/git/image.cue delete mode 100644 pkg/alpha.dagger.io/git/tests/commit/commit.cue delete mode 100644 pkg/alpha.dagger.io/git/tests/git/git.cue delete mode 100644 pkg/alpha.dagger.io/go/go.cue delete mode 100644 pkg/alpha.dagger.io/go/tests/go.cue delete mode 100644 pkg/alpha.dagger.io/go/tests/testdata/go.mod delete mode 100644 pkg/alpha.dagger.io/go/tests/testdata/main.go delete mode 100644 pkg/alpha.dagger.io/graphql/graphql.cue delete mode 100644 pkg/alpha.dagger.io/graphql/tests/graphql.cue delete mode 100644 pkg/alpha.dagger.io/helpers.bash delete mode 100644 pkg/alpha.dagger.io/http/http.cue delete mode 100644 pkg/alpha.dagger.io/http/tests/http.cue delete mode 100644 pkg/alpha.dagger.io/io/io.cue delete mode 100644 pkg/alpha.dagger.io/java/maven/maven.cue delete mode 100644 pkg/alpha.dagger.io/java/maven/tests/maven.cue delete mode 100644 pkg/alpha.dagger.io/java/maven/tests/testdata/.gitignore delete mode 100644 pkg/alpha.dagger.io/java/maven/tests/testdata/pom.xml delete mode 100644 pkg/alpha.dagger.io/java/maven/tests/testdata/src/main/java/io/dagger/maven/springboottest/SpringBootTestApplication.java delete mode 100644 pkg/alpha.dagger.io/java/maven/tests/testdata/src/main/resources/application.properties delete mode 100644 pkg/alpha.dagger.io/java/maven/tests/testdata/src/test/java/io/dagger/maven/springboottest/SpringBootTestApplicationTests.java delete mode 100644 pkg/alpha.dagger.io/js/yarn/tests/testdata/package.json delete mode 100644 pkg/alpha.dagger.io/js/yarn/tests/testdata2/package.json delete mode 100644 pkg/alpha.dagger.io/js/yarn/tests/yarn.cue delete mode 100644 pkg/alpha.dagger.io/js/yarn/yarn.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/code.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/helm.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/helm.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/.helmignore delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/Chart.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/NOTES.txt delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/_helpers.tpl delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/deployment.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/ingress.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/service.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/serviceaccount.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/tests/test-connection.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/values.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/helm/tests/verify.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/kubernetes.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/kustomize/kustomization.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/kustomize/tests/kustomize.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/kustomize/tests/testdata/deployment.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/kustomize/tests/testdata/pod.yaml delete mode 100644 pkg/alpha.dagger.io/kubernetes/kustomize/tests/verify.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/tests/kubernetes.cue delete mode 100644 pkg/alpha.dagger.io/kubernetes/tests/verify.cue delete mode 100644 pkg/alpha.dagger.io/netlify/netlify.cue delete mode 100644 pkg/alpha.dagger.io/netlify/netlify.sh.cue delete mode 100644 pkg/alpha.dagger.io/netlify/tests/netlify.cue delete mode 100644 pkg/alpha.dagger.io/os/container.cue delete mode 100644 pkg/alpha.dagger.io/os/dir.cue delete mode 100644 pkg/alpha.dagger.io/os/file.cue delete mode 100644 pkg/alpha.dagger.io/os/tests/container/container.cue delete mode 100644 pkg/alpha.dagger.io/os/tests/os/os.cue delete mode 100644 pkg/alpha.dagger.io/package.json delete mode 100644 pkg/alpha.dagger.io/random/string.cue delete mode 100644 pkg/alpha.dagger.io/terraform/terraform.cue delete mode 100644 pkg/alpha.dagger.io/terraform/tests/terraform.cue delete mode 100644 pkg/alpha.dagger.io/terraform/tests/testdata/test.tf delete mode 100644 pkg/alpha.dagger.io/trivy/image.cue delete mode 100644 pkg/alpha.dagger.io/trivy/tests/trivy.cue delete mode 100644 pkg/alpha.dagger.io/trivy/trivy.cue delete mode 100644 pkg/alpha.dagger.io/universe.bats delete mode 100644 pkg/alpha.dagger.io/yarn.lock delete mode 100644 tests/cli.bats delete mode 100644 tests/cli/input/artifact/main.cue delete mode 100644 tests/cli/input/artifact/testdata/testfile delete mode 100644 tests/cli/input/bool/main.cue delete mode 100644 tests/cli/input/git/main.cue delete mode 100644 tests/cli/input/ignore/main.cue delete mode 100644 tests/cli/input/ignore/testdata/.dagger/foo delete mode 100644 tests/cli/input/ignore/testdata/testfile delete mode 100644 tests/cli/input/list/main.cue delete mode 100644 tests/cli/input/simple/main.cue delete mode 100644 tests/cli/input/simple/testdata/input.json delete mode 100644 tests/cli/input/simple/testdata/input.txt delete mode 100644 tests/cli/input/simple/testdata/input.yaml delete mode 100644 tests/cli/output/list/main.cue delete mode 100644 tests/cli/packages/a/main.cue delete mode 100644 tests/cli/packages/b/main.cue delete mode 100644 tests/cli/packages/cue.mod/module.cue delete mode 100644 tests/cli/simple/main.cue delete mode 100644 tests/core.bats delete mode 100644 tests/core/compute/invalid/bool/cue.mod/module.cue delete mode 100644 tests/core/compute/invalid/bool/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/invalid/bool/main.cue delete mode 100644 tests/core/compute/invalid/int/cue.mod/module.cue delete mode 100644 tests/core/compute/invalid/int/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/invalid/int/main.cue delete mode 100644 tests/core/compute/invalid/string/cue.mod/module.cue delete mode 100644 tests/core/compute/invalid/string/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/invalid/string/main.cue delete mode 100644 tests/core/compute/invalid/struct/cue.mod/module.cue delete mode 100644 tests/core/compute/invalid/struct/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/invalid/struct/main.cue delete mode 100644 tests/core/compute/success/exec-nocache/cue.mod/module.cue delete mode 100644 tests/core/compute/success/exec-nocache/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/success/exec-nocache/main.cue delete mode 100644 tests/core/compute/success/noop/cue.mod/module.cue delete mode 100644 tests/core/compute/success/noop/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/success/noop/main.cue delete mode 100644 tests/core/compute/success/overload/flat/cue.mod/module.cue delete mode 100644 tests/core/compute/success/overload/flat/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/success/overload/flat/main.cue delete mode 100644 tests/core/compute/success/overload/wrapped/cue.mod/module.cue delete mode 100644 tests/core/compute/success/overload/wrapped/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/success/overload/wrapped/main.cue delete mode 100644 tests/core/compute/success/simple/cue.mod/module.cue delete mode 100644 tests/core/compute/success/simple/cue.mod/pkg/.gitignore delete mode 100644 tests/core/compute/success/simple/main.cue delete mode 100644 tests/core/dependencies/interpolation/cue.mod/module.cue delete mode 100644 tests/core/dependencies/interpolation/cue.mod/pkg/.gitignore delete mode 100644 tests/core/dependencies/interpolation/main.cue delete mode 100644 tests/core/dependencies/simple/cue.mod/module.cue delete mode 100644 tests/core/dependencies/simple/cue.mod/pkg/.gitignore delete mode 100644 tests/core/dependencies/simple/main.cue delete mode 100644 tests/core/dependencies/unmarshal/cue.mod/module.cue delete mode 100644 tests/core/dependencies/unmarshal/cue.mod/pkg/.gitignore delete mode 100644 tests/core/dependencies/unmarshal/main.cue delete mode 100644 tests/core/exclude/.dagger/env/default/.gitignore delete mode 100644 tests/core/exclude/.dagger/env/default/plan/cue.mod/module.cue delete mode 100644 tests/core/exclude/.dagger/env/default/plan/cue.mod/pkg/.gitignore delete mode 100644 tests/core/exclude/.dagger/env/default/plan/main.cue delete mode 100644 tests/core/exclude/.dagger/env/default/values.yaml delete mode 100644 tests/core/exclude/testdata/a.txt delete mode 100644 tests/core/exclude/testdata/b.txt delete mode 100644 tests/core/exclude/testdata/foo/bar.txt delete mode 100644 tests/core/exclude/testdata/foo/cow.json delete mode 100644 tests/core/inputs-outputs/test-core.cue delete mode 100644 tests/core/platform-config/platform-config.cue delete mode 100644 tests/core/secrets/invalid/env/cue.mod/module.cue delete mode 100644 tests/core/secrets/invalid/env/cue.mod/pkg/.gitignore delete mode 100644 tests/core/secrets/invalid/env/env.cue delete mode 100644 tests/core/secrets/invalid/string/cue.mod/module.cue delete mode 100644 tests/core/secrets/invalid/string/cue.mod/pkg/.gitignore delete mode 100644 tests/core/secrets/invalid/string/string.cue delete mode 100644 tests/core/secrets/simple/cue.mod/module.cue delete mode 100644 tests/core/secrets/simple/cue.mod/pkg/.gitignore delete mode 100644 tests/core/secrets/simple/simple.cue delete mode 100644 tests/core/stream/main.cue delete mode 100644 tests/ops.bats delete mode 100644 tests/ops/copy/invalid/cache/cue.mod/module.cue delete mode 100644 tests/ops/copy/invalid/cache/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/copy/invalid/cache/main.cue delete mode 100644 tests/ops/copy/valid/component/cue.mod/module.cue delete mode 100644 tests/ops/copy/valid/component/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/copy/valid/component/main.cue delete mode 100644 tests/ops/copy/valid/script/cue.mod/module.cue delete mode 100644 tests/ops/copy/valid/script/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/copy/valid/script/main.cue delete mode 100644 tests/ops/dockerbuild/cue.mod/module.cue delete mode 100644 tests/ops/dockerbuild/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/dockerbuild/main.cue delete mode 100644 tests/ops/dockerbuild/testdata/Dockerfile delete mode 100644 tests/ops/dockerbuild/testdata/dockerfilepath/Dockerfile.custom delete mode 100644 tests/ops/dockerbuild/testdata/foo delete mode 100644 tests/ops/exec/always/cue.mod/module.cue delete mode 100644 tests/ops/exec/always/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/always/main.cue delete mode 100644 tests/ops/exec/dir/doesnotexist/cue.mod/module.cue delete mode 100644 tests/ops/exec/dir/doesnotexist/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/dir/doesnotexist/main.cue delete mode 100644 tests/ops/exec/dir/exist/cue.mod/module.cue delete mode 100644 tests/ops/exec/dir/exist/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/dir/exist/main.cue delete mode 100644 tests/ops/exec/env/invalid/cue.mod/module.cue delete mode 100644 tests/ops/exec/env/invalid/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/env/invalid/main.cue delete mode 100644 tests/ops/exec/env/overlay/cue.mod/module.cue delete mode 100644 tests/ops/exec/env/overlay/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/env/overlay/main.cue delete mode 100644 tests/ops/exec/env/valid/cue.mod/module.cue delete mode 100644 tests/ops/exec/env/valid/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/env/valid/main.cue delete mode 100644 tests/ops/exec/error/cue.mod/module.cue delete mode 100644 tests/ops/exec/error/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/error/main.cue delete mode 100644 tests/ops/exec/exit_code/main.cue delete mode 100644 tests/ops/exec/invalid/cue.mod/module.cue delete mode 100644 tests/ops/exec/invalid/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/invalid/main.cue delete mode 100644 tests/ops/exec/simple/cue.mod/module.cue delete mode 100644 tests/ops/exec/simple/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/simple/main.cue delete mode 100644 tests/ops/exec/undefined/non_concrete_not_referenced/cue.mod/module.cue delete mode 100644 tests/ops/exec/undefined/non_concrete_not_referenced/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/undefined/non_concrete_not_referenced/main.cue delete mode 100644 tests/ops/exec/undefined/non_concrete_referenced/cue.mod/module.cue delete mode 100644 tests/ops/exec/undefined/non_concrete_referenced/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/undefined/non_concrete_referenced/main.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_def/cue.mod/module.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/test.dagger.io/def/main.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_def/main.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/module.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/test.dagger.io/nonoptional/main.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_mandatory/main.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_optional/cue.mod/module.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/test.dagger.io/optional/main.cue delete mode 100644 tests/ops/exec/undefined/with_pkg_optional/main.cue delete mode 100644 tests/ops/export/bool/cue.mod/module.cue delete mode 100644 tests/ops/export/bool/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/bool/main.cue delete mode 100644 tests/ops/export/concurrency/cue.mod/module.cue delete mode 100644 tests/ops/export/concurrency/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/concurrency/main.cue delete mode 100644 tests/ops/export/float/cue.mod/module.cue delete mode 100644 tests/ops/export/float/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/float/main.cue delete mode 100644 tests/ops/export/invalid/format/cue.mod/module.cue delete mode 100644 tests/ops/export/invalid/format/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/invalid/format/main.cue delete mode 100644 tests/ops/export/invalid/path/cue.mod/module.cue delete mode 100644 tests/ops/export/invalid/path/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/invalid/path/main.cue delete mode 100644 tests/ops/export/invalid/validation/cue.mod/module.cue delete mode 100644 tests/ops/export/invalid/validation/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/invalid/validation/main.cue delete mode 100644 tests/ops/export/json/cue.mod/module.cue delete mode 100644 tests/ops/export/json/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/json/main.cue delete mode 100644 tests/ops/export/number/cue.mod/module.cue delete mode 100644 tests/ops/export/number/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/number/main.cue delete mode 100644 tests/ops/export/string/cue.mod/module.cue delete mode 100644 tests/ops/export/string/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/string/main.cue delete mode 100644 tests/ops/export/withvalidation/cue.mod/module.cue delete mode 100644 tests/ops/export/withvalidation/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/withvalidation/main.cue delete mode 100644 tests/ops/export/yaml/cue.mod/module.cue delete mode 100644 tests/ops/export/yaml/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/export/yaml/main.cue delete mode 100644 tests/ops/fetch-container/exist/cue.mod/module.cue delete mode 100644 tests/ops/fetch-container/exist/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-container/exist/main.cue delete mode 100644 tests/ops/fetch-container/invalid/main.cue delete mode 100644 tests/ops/fetch-container/nonexistent/digest/cue.mod/module.cue delete mode 100644 tests/ops/fetch-container/nonexistent/digest/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-container/nonexistent/digest/main.cue delete mode 100644 tests/ops/fetch-container/nonexistent/image-with-valid-digest/main.cue delete mode 100644 tests/ops/fetch-container/nonexistent/image/cue.mod/module.cue delete mode 100644 tests/ops/fetch-container/nonexistent/image/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-container/nonexistent/image/main.cue delete mode 100644 tests/ops/fetch-container/nonexistent/tag/cue.mod/module.cue delete mode 100644 tests/ops/fetch-container/nonexistent/tag/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-container/nonexistent/tag/main.cue delete mode 100644 tests/ops/fetch-git/exist/cue.mod/module.cue delete mode 100644 tests/ops/fetch-git/exist/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-git/exist/main.cue delete mode 100644 tests/ops/fetch-git/gitdir/cue.mod/module.cue delete mode 100644 tests/ops/fetch-git/gitdir/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-git/gitdir/main.cue delete mode 100644 tests/ops/fetch-git/invalid/main.cue delete mode 100644 tests/ops/fetch-git/nonexistent/bork/cue.mod/module.cue delete mode 100644 tests/ops/fetch-git/nonexistent/bork/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-git/nonexistent/bork/main.cue delete mode 100644 tests/ops/fetch-git/nonexistent/ref/cue.mod/module.cue delete mode 100644 tests/ops/fetch-git/nonexistent/ref/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-git/nonexistent/ref/main.cue delete mode 100644 tests/ops/fetch-git/nonexistent/remote/cue.mod/module.cue delete mode 100644 tests/ops/fetch-git/nonexistent/remote/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-git/nonexistent/remote/main.cue delete mode 100644 tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/.gitignore delete mode 100644 tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/values.yaml delete mode 100644 tests/ops/fetch-git/private-repo/cue.mod/module.cue delete mode 100644 tests/ops/fetch-git/private-repo/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-git/private-repo/fetch-git.cue delete mode 100644 tests/ops/fetch-http/exist/cue.mod/module.cue delete mode 100644 tests/ops/fetch-http/exist/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-http/exist/main.cue delete mode 100644 tests/ops/fetch-http/nonexistent/cue.mod/module.cue delete mode 100644 tests/ops/fetch-http/nonexistent/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/fetch-http/nonexistent/main.cue delete mode 100644 tests/ops/load/invalid/cache/cue.mod/module.cue delete mode 100644 tests/ops/load/invalid/cache/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/load/invalid/cache/main.cue delete mode 100644 tests/ops/load/valid/component/cue.mod/module.cue delete mode 100644 tests/ops/load/valid/component/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/load/valid/component/main.cue delete mode 100644 tests/ops/load/valid/script/cue.mod/module.cue delete mode 100644 tests/ops/load/valid/script/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/load/valid/script/main.cue delete mode 100644 tests/ops/mounts/valid/cache/cue.mod/module.cue delete mode 100644 tests/ops/mounts/valid/cache/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/mounts/valid/cache/main.cue delete mode 100644 tests/ops/mounts/valid/component/cue.mod/module.cue delete mode 100644 tests/ops/mounts/valid/component/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/mounts/valid/component/main.cue delete mode 100644 tests/ops/mounts/valid/script/cue.mod/module.cue delete mode 100644 tests/ops/mounts/valid/script/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/mounts/valid/script/main.cue delete mode 100644 tests/ops/mounts/valid/tmpfs/cue.mod/module.cue delete mode 100644 tests/ops/mounts/valid/tmpfs/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/mounts/valid/tmpfs/main.cue delete mode 100644 tests/ops/push-container/.dagger/env/push-container/.gitignore delete mode 100644 tests/ops/push-container/.dagger/env/push-container/values.yaml delete mode 100644 tests/ops/push-container/cue.mod/module.cue delete mode 100644 tests/ops/push-container/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/push-container/main.cue delete mode 100644 tests/ops/subdir/invalid/exec/cue.mod/module.cue delete mode 100644 tests/ops/subdir/invalid/exec/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/subdir/invalid/exec/main.cue delete mode 100644 tests/ops/subdir/invalid/path/cue.mod/module.cue delete mode 100644 tests/ops/subdir/invalid/path/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/subdir/invalid/path/main.cue delete mode 100644 tests/ops/subdir/valid/container/cue.mod/module.cue delete mode 100644 tests/ops/subdir/valid/container/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/subdir/valid/container/main.cue delete mode 100644 tests/ops/subdir/valid/simple/cue.mod/module.cue delete mode 100644 tests/ops/subdir/valid/simple/cue.mod/pkg/.gitignore delete mode 100644 tests/ops/subdir/valid/simple/main.cue delete mode 120000 universe diff --git a/cmd/dagger/cmd/doc.go b/cmd/dagger/cmd/doc.go index 38ae93bb..18cbf5eb 100644 --- a/cmd/dagger/cmd/doc.go +++ b/cmd/dagger/cmd/doc.go @@ -307,47 +307,6 @@ func walkStdlib(ctx context.Context, output, format string) { lg.Info().Str("output", output).Msg("generating stdlib") packages := map[string]*Package{} - err := fs.WalkDir(pkg.FS, pkg.AlphaModule, func(p string, d fs.DirEntry, err error) error { - if err != nil { - return err - } - - // Ignore useless embedded files - if p == "." || d.Name() == pkg.AlphaModule || !d.IsDir() || d.Name() == "cue.mod" || - strings.Contains(p, "cue.mod") || strings.Contains(p, "tests") { - return nil - } - - p = strings.TrimPrefix(p, pkg.AlphaModule+"/") - - // Ignore tests directories - if d.Name() == "tests" { - return nil - } - - pkgName := fmt.Sprintf("%s/%s", pkg.AlphaModule, p) - lg.Info().Str("package", pkgName).Str("format", format).Msg("generating doc") - val, err := loadCode(pkgName) - if err != nil { - if strings.Contains(err.Error(), "no CUE files") { - lg.Warn().Str("package", p).Err(err).Msg("ignoring") - return nil - } - if strings.Contains(err.Error(), "cannot find package") { - lg.Warn().Str("package", p).Err(err).Msg("ignoring") - return nil - } - return err - } - - pkg := Parse(ctx, pkgName, val) - packages[p] = pkg - return nil - }) - - if err != nil { - lg.Fatal().Err(err).Msg("cannot generate stdlib doc") - } hasSubPackages := func(name string) bool { for p := range packages { diff --git a/mod/mod.go b/mod/mod.go index 49fabc22..52cc439c 100644 --- a/mod/mod.go +++ b/mod/mod.go @@ -17,7 +17,7 @@ const ( ) func isUniverse(repoName string) bool { - return strings.HasPrefix(strings.ToLower(repoName), pkg.AlphaModule) + return strings.HasPrefix(strings.ToLower(repoName), pkg.UniverseModule) } // IsUniverseLatest check that current universe is up-to-date or no @@ -32,7 +32,7 @@ func IsUniverseLatest(ctx context.Context, workspace string) (bool, error) { return false, err } - req, err := newRequire(pkg.AlphaModule, UniverseVersionConstraint) + req, err := newRequire(pkg.UniverseModule, UniverseVersionConstraint) if err != nil { return false, err } diff --git a/mod/require.go b/mod/require.go index 80c3605d..65d65563 100644 --- a/mod/require.go +++ b/mod/require.go @@ -25,7 +25,7 @@ type Require struct { func newRequire(repoName, versionConstraint string) (*Require, error) { switch { - case strings.HasPrefix(repoName, pkg.AlphaModule): + case strings.HasPrefix(repoName, pkg.UniverseModule): return parseDaggerRepoName(repoName, versionConstraint) default: return parseGitRepoName(repoName, versionConstraint) @@ -52,7 +52,7 @@ func parseGitRepoName(repoName, versionConstraint string) (*Require, error) { }, nil } -var daggerRepoNameRegex = regexp.MustCompile(pkg.AlphaModule + `([a-zA-Z0-9/_.-]*)@?([0-9a-zA-Z.-]*)`) +var daggerRepoNameRegex = regexp.MustCompile(pkg.UniverseModule + `([a-zA-Z0-9/_.-]*)@?([0-9a-zA-Z.-]*)`) func parseDaggerRepoName(repoName, versionConstraint string) (*Require, error) { repoMatches := daggerRepoNameRegex.FindStringSubmatch(repoName) @@ -62,7 +62,7 @@ func parseDaggerRepoName(repoName, versionConstraint string) (*Require, error) { } return &Require{ - repo: pkg.AlphaModule, + repo: pkg.UniverseModule, path: repoMatches[1], version: repoMatches[2], versionConstraint: versionConstraint, diff --git a/mod/require_test.go b/mod/require_test.go index 1a1977d0..394e60ad 100644 --- a/mod/require_test.go +++ b/mod/require_test.go @@ -63,9 +63,9 @@ func TestParseArgument(t *testing.T) { }, { name: "Alpha Dagger repo with path", - in: "alpha.dagger.io/gcp/gke@v0.1.0-alpha.20", + in: "universe.dagger.io/gcp/gke@v0.1.0-alpha.20", want: &Require{ - repo: "alpha.dagger.io", + repo: "universe.dagger.io", path: "/gcp/gke", version: "v0.1.0-alpha.20", @@ -75,9 +75,9 @@ func TestParseArgument(t *testing.T) { }, { name: "Alpha Dagger repo", - in: "alpha.dagger.io@v0.1.0-alpha.23", + in: "universe.dagger.io@v0.1.0-alpha.23", want: &Require{ - repo: "alpha.dagger.io", + repo: "universe.dagger.io", path: "", version: "v0.1.0-alpha.23", diff --git a/pkg/alpha.dagger.io/.dagger/env/alpine/.gitignore b/pkg/alpha.dagger.io/.dagger/env/alpine/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/alpine/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/alpine/values.yaml b/pkg/alpha.dagger.io/.dagger/env/alpine/values.yaml deleted file mode 100644 index 75a383d5..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/alpine/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ -plan: - package: ./alpine/tests -name: alpine -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB0Ky9vQU16Vms0OUpOaVBk - K3J5R1RqREwvTEdYenVJaEl0VDB2aXJ0QTBrCnM2QnhUa0hXS0tGUjRvMnlveUZT - UitUU2lwUHBGUXVmbms1R2srdW1iSGMKLS0tIFExMzh6WlowVUNzRDR2Rkx0MXh0 - N0JOK1FwdzkrcGR5V0xhUDdNOFNvYk0KetOvulxA0Hilyhv+eWBqYO3GXNvm38Y1 - 9Pa7HYazNyi0qMcZpecWlp4QsOoL876dj1rE62cYHT2hkt2J2ijAUw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:51:43Z" - mac: ENC[AES256_GCM,data:5ApIUpcKaDi3UXL9jyeDBSJJw//BZE2eFZxsuCHVRNyR48FBGj7Wn0Ned2shZ6wNsKcZt5TpxdVILc8SEWwJ9NXeAFuTUZqCZypmDBxGdpo1M5eW0xRAEXQ6UpkG2+2uM0hHCEh8rECcvj0zGHMKgrbXOZt+iyeDuMBMME/V58w=,iv:qWCxgIuVD1RMDrWYgzUSK/KNxS85cJONsV0CzsHf/UU=,tag:NEJM7oZmHXn3ujS2zoN1EA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/argocd-infra/.gitignore b/pkg/alpha.dagger.io/.dagger/env/argocd-infra/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/argocd-infra/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/argocd-infra/values.yaml b/pkg/alpha.dagger.io/.dagger/env/argocd-infra/values.yaml deleted file mode 100644 index c9d4ef55..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/argocd-infra/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ -plan: - package: ./argocd/tests/infra -name: argocd-infra -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBmVmEzZ3RDdjlBRXBleURr - cmx6YW40ZHFLMHpqa2RYWUlIdTFIZlYyZ3pnCmVieTB2MXdid1l5ZitUMkprVGFz - RHl4elJzdWRTYS9MaXZkU29UMG1SSmcKLS0tIHFjNHhBVVVwcGwrVWZHOXoxdGps - RWlubERCTjFkSStyQXdpbSttbXB1RmcKQeRMIc8QGKI8HkoBXCQzR/gaBoiYTYxy - vLjf1kMlX4BvmwTpmDO9Wer8a/NXEwA3zpK/kHaoXGBZln8Lf4J87A== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-09-09T10:52:18Z" - mac: ENC[AES256_GCM,data:B5CZFBYviKy/l8YYzg3luUdeFpRTGx5q+Q5b56SvIVvdp33TQwvU6bftiNOwUHjI3a3B2p70QNKxam+Yk7Pf9jC1nN6dR1jWh0RcicTjQOI6URN6NgS667/iCG7e94fKiVKlbgRq/P7eudnJrkhPsiqqHopmWg41g+izH+YOX2I=,iv:X6nxvaEdtnyUSEPODJLrPfuju906b9EYsye4MstBGRc=,tag:olbgC+EtQ8U8FJejQv5u/Q==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/argocd/.gitignore b/pkg/alpha.dagger.io/.dagger/env/argocd/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/argocd/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/argocd/values.yaml b/pkg/alpha.dagger.io/.dagger/env/argocd/values.yaml deleted file mode 100644 index 484b4e88..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/argocd/values.yaml +++ /dev/null @@ -1,26 +0,0 @@ -plan: - package: ./argocd/tests -name: argocd -inputs: - TestConfig.argocdConfig.server: - text: localhost:8080 -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhZEhvaGFiVGVUcWZhcjVj - WmthWWRMMmFXSmRIbzNKUm9IMms0TUltcjBvClE4UHlwcHVGcjVJTHRhNUx1Lyt4 - UHZlTlBRRnhtMmMzcmFPUGlBTXlVMncKLS0tIFpkSXU1SDUvZTR4MVgxNWxKV3V3 - LzM4MENHSVZFNVJza3FhVGkyd0R4d3cKPI6V2o1BR8WVrsAdsuuKOW9Lw32c+KUh - WBHXbYucWjPeogNVIZK+/iJs4Pz92fQ1awdj0H47ro3d7I3QfZoeJQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-09-10T09:08:35Z" - mac: ENC[AES256_GCM,data:RhRtuEL1xqfJ8pvofq91JMKElZY4Pqvb3SY3IhVevotGBAR6UvmKBA6Nfi3VsvbjfAlbA8/Ip+ifHNhuv6iS1kcj+u5Y7E+6esMdXoXlPmry1Jpt8fWu+zeO2t2XiVGsSEw8nLhPyZfMsp0KBoec1I43NUIKQXoPMbUFMMy1rLQ=,iv:Q817XyIlU/0BgUc6tNVZ8f9cz83I/3FbF8wvqaWNtso=,tag:/Ui9/AAT4RnnwfrOw83xew==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-ecr-localstack/.gitignore b/pkg/alpha.dagger.io/.dagger/env/aws-ecr-localstack/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-ecr-localstack/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-ecr-localstack/values.yaml b/pkg/alpha.dagger.io/.dagger/env/aws-ecr-localstack/values.yaml deleted file mode 100644 index 2ddb85a7..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-ecr-localstack/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ -plan: - package: ./aws/ecr/tests -name: aws-ecr-localstack -inputs: - TestConfig.awsConfig.accessKey: - secret: ENC[AES256_GCM,data:t/iOlA==,iv:oLhubqSKZqn5lVPFn8On//LPj1deAFPXKVTyBKdVODQ=,tag:PORmrxDIf/MHbFDrdxnlTQ==,type:str] - TestConfig.awsConfig.localMode: - bool: "true" - TestConfig.awsConfig.secretKey: - secret: ENC[AES256_GCM,data:2HYF9w==,iv:f/a9dy4HLJOtKdn8G+zKTboXU1YhzXBEKT1WSvrsCvk=,tag:RKQO+Pg3wg23LIMAnyXhMA==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKeEk5MS9nVmFoOVNNOHdE - WnZCTXBWbW9LL1NJYndCYjhIM2JsNXNEUmxJCkUya0dlZjZ0dGRIM1pVdzg5eWFH - MVpiaE9PclNudGdUZm5FcytuVDZGTDAKLS0tIEQxWDdteHgzS3JkdmtNTVpxMUh1 - aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y - Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-08-31T15:04:51Z" - mac: ENC[AES256_GCM,data:o/B2ZTd1ldSVkIbluXnHJ5clZ0oYVYVvmltxLw9k7OyFl9WBVBOslwrxYyrvgkKpLQIpFArh3VtMbizoTrzFWzoXMqdkLYza0IhaZekRn50NyaqOks/qAUJh0Cas6qA87nOyVw3J9Ldc1HR0lgjFLpIsPZYgVGs5BgQZ5Pg/X40=,iv:w6XNLkF2h/6JjCLFioyWImvRHiN6ILDimrxcboMRh94=,tag:k3BbcVeI9qj0NoEdQiLstg==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-ecr/.gitignore b/pkg/alpha.dagger.io/.dagger/env/aws-ecr/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-ecr/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-ecr/values.yaml b/pkg/alpha.dagger.io/.dagger/env/aws-ecr/values.yaml deleted file mode 100644 index 35c1a2f9..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-ecr/values.yaml +++ /dev/null @@ -1,28 +0,0 @@ -plan: - package: ./aws/ecr/tests -name: aws-ecr -inputs: - TestConfig.awsConfig.accessKey: - secret: ENC[AES256_GCM,data:iu6LfQNgGZUVnHVeMRYPrcBtlZk=,iv:U5PLxDKXwJnUDdk1ayFGvvJfWdVqh1PK5ujb20YYPP0=,tag:QyqIJRiR6nE16ZDV0CP7Pw==,type:str] - TestConfig.awsConfig.secretKey: - secret: ENC[AES256_GCM,data:Q/W+KH3NEouGt6C5S+KiC43837soYi2Mjb/z5K8rD9gtaNaBjjkJHg==,iv:8nGEzLXd91rF5YBZ/EdQoMN27yrpc0sgm26DEvIuSHM=,tag:/oyKl/vj5MJAm+jZMOOAuQ==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKeEk5MS9nVmFoOVNNOHdE - WnZCTXBWbW9LL1NJYndCYjhIM2JsNXNEUmxJCkUya0dlZjZ0dGRIM1pVdzg5eWFH - MVpiaE9PclNudGdUZm5FcytuVDZGTDAKLS0tIEQxWDdteHgzS3JkdmtNTVpxMUh1 - aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y - Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:52:26Z" - mac: ENC[AES256_GCM,data:8huUFIaTMhJVBzVH2SNmKQE60f9ZMIWXD5eJ7iA86GkKDsn4m57QKiyg7u2PvVeXCdnNYaMu7nK/mZ2ABoTj9wXHV/eul4P2m2Bgw7aM4fcWhcSyBCqBmVCGWEM5GyN/A5oIbLFRu/4/rC6pjo7wcMDXU6MiAinThb1oZ9/jVRI=,iv:yA7UvU8fH52WNhKy5WjzqE/9HHLlfTby5yLA4a1whBU=,tag:zckHlnQcYpwrJ6D6G55jAg==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-eks/.gitignore b/pkg/alpha.dagger.io/.dagger/env/aws-eks/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-eks/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-eks/values.yaml b/pkg/alpha.dagger.io/.dagger/env/aws-eks/values.yaml deleted file mode 100644 index 6eb4946d..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-eks/values.yaml +++ /dev/null @@ -1,28 +0,0 @@ -plan: - package: ./aws/eks/tests -name: aws-eks -inputs: - TestConfig.awsConfig.accessKey: - secret: ENC[AES256_GCM,data:ZiNdgkTZlOyWht2CDpmYKN+ViTE=,iv:wdRiBw65BgSia9z//tUDirkkhw9O29ZoerX6eZnYx9k=,tag:S/0i/fRtQJg4Qp7tmUK4ag==,type:str] - TestConfig.awsConfig.secretKey: - secret: ENC[AES256_GCM,data:ywvQiDE4gmM6KasYWOvX1FY/Lerg5TghgoYTq1AlXDRHNGzZtY3ClQ==,iv:HCXweaSKHLwEA8Mq4up/TUaV7YDtsRpBpwYD19Jh4iw=,tag:l2hmI9BsGiRyulh4yDn/hw==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBVdWE4VlRMWGJ3WDExWkNl - S1dqU21uVXFjaXU5eWdKRmRCUXFCd2ZaTjNrCjlkNXI3WUdnRGVibmZkbXJYaEV4 - SXIveGNDNnZ6dDM4SjdrMmZIZVhyVzAKLS0tIGkzK0tMTTdHU2lacmtvakUwbGFE - M3U4UFV5REQzYko3QjlXVE02Z0J4WUkK8uHC67Mutls4drXbCi8AwuFqbRXeb69P - ZnOFZEB4NoayoOojr1mY9ssDTywHF4KwR4E9ZmJ3V3hlEAgMkqfvSA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T15:38:09Z" - mac: ENC[AES256_GCM,data:S+MOmnBEpnWMQZPp6IFjPOMLWB6+OtgZOmUCwqivx0/I1IvVMiutHX+WI49ykGaZu0u8nKab8z/qnAwvw2lnUGMC5cE+UlB9ELZ4RcOO/KKOyEr6DTCchYEoEceuzQ+7aK+vVS5bx/IGIKCIVahTwz9anT/wiZDR2KgVRt/K0j0=,iv:T9msYqGXLoQmDUzVk0TUVjxxfr8+9Lp17cO7UkTSfkI=,tag:CWeu+7P7KRZ4kki3RLIZag==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-s3-localstack/.gitignore b/pkg/alpha.dagger.io/.dagger/env/aws-s3-localstack/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-s3-localstack/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-s3-localstack/values.yaml b/pkg/alpha.dagger.io/.dagger/env/aws-s3-localstack/values.yaml deleted file mode 100644 index 7a583be5..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-s3-localstack/values.yaml +++ /dev/null @@ -1,33 +0,0 @@ -plan: - package: ./aws/s3/tests -name: aws-s3-localstack -inputs: - TestConfig.awsConfig.accessKey: - secret: ENC[AES256_GCM,data:RJY8Cw==,iv:yZW4m74SdRl5qeDfyQVJPOvAktu2qt8jJB45hWUd5p8=,tag:7DCf5ys4Cblb1V1XHMCWAQ==,type:str] - TestConfig.awsConfig.localMode: - bool: "true" - TestConfig.awsConfig.secretKey: - secret: ENC[AES256_GCM,data:iYxBnA==,iv:7mdUXVnmMJm2pz9Kt1MwrwFeAxwqZaH9o1D2FbUD860=,tag:fj8+JJbNS3Z/L2ft+BtJ1Q==,type:str] - TestDirectory: - dir: - path: ./aws/s3/tests/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKeEk5MS9nVmFoOVNNOHdE - WnZCTXBWbW9LL1NJYndCYjhIM2JsNXNEUmxJCkUya0dlZjZ0dGRIM1pVdzg5eWFH - MVpiaE9PclNudGdUZm5FcytuVDZGTDAKLS0tIEQxWDdteHgzS3JkdmtNTVpxMUh1 - aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y - Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-08-31T15:06:01Z" - mac: ENC[AES256_GCM,data:XrEbjWRGEn/XZMy7PntxLQETx8mpEabgR7GQlYbyCEgHPZNHe9RKEoMs+T/MyVpq/Kv+juC4iirj1TnVtTtUbgIB02nrSiSj4GVnUJ7+k/sEDa2QWPa+bp8B2nN35nAzT0BORw5Y+LK3BQSMa2qJpnIoDaLswBYNDcjFnYA38QQ=,iv:2uCU/prx0kdiUg7gijr38/JGYtlMLySyxP5preagmiY=,tag:70LPxKrdtKURzlaISlqPjw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-s3/.gitignore b/pkg/alpha.dagger.io/.dagger/env/aws-s3/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-s3/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/aws-s3/values.yaml b/pkg/alpha.dagger.io/.dagger/env/aws-s3/values.yaml deleted file mode 100644 index 837a5def..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/aws-s3/values.yaml +++ /dev/null @@ -1,31 +0,0 @@ -plan: - package: ./aws/s3/tests -name: aws-s3 -inputs: - TestConfig.awsConfig.accessKey: - secret: ENC[AES256_GCM,data:iu6LfQNgGZUVnHVeMRYPrcBtlZk=,iv:U5PLxDKXwJnUDdk1ayFGvvJfWdVqh1PK5ujb20YYPP0=,tag:QyqIJRiR6nE16ZDV0CP7Pw==,type:str] - TestConfig.awsConfig.secretKey: - secret: ENC[AES256_GCM,data:Q/W+KH3NEouGt6C5S+KiC43837soYi2Mjb/z5K8rD9gtaNaBjjkJHg==,iv:8nGEzLXd91rF5YBZ/EdQoMN27yrpc0sgm26DEvIuSHM=,tag:/oyKl/vj5MJAm+jZMOOAuQ==,type:str] - TestDirectory: - dir: - path: ./aws/s3/tests/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKeEk5MS9nVmFoOVNNOHdE - WnZCTXBWbW9LL1NJYndCYjhIM2JsNXNEUmxJCkUya0dlZjZ0dGRIM1pVdzg5eWFH - MVpiaE9PclNudGdUZm5FcytuVDZGTDAKLS0tIEQxWDdteHgzS3JkdmtNTVpxMUh1 - aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y - Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:52:36Z" - mac: ENC[AES256_GCM,data:mG8lpyCdgS5b5+VkKv1gWiT9m7k3ZxR36F8TMSkuxHAsrcPiQn+aeHyytEcioYMRQ/M18Fw60mElrTMFgVxncYY40HAPD+EcD6e3CPHXuHaX+fLFUl7rBxuJD2ugRSWgsf5TXP1z3zzuWjrGg6AnIe88PSRiR7NQH3uQ59K7duQ=,iv:QfTF89KCeaFMQbUQcQRZvf6QVmQ63Q14x8LeBqfzGOw=,tag:2KUepl7xXlIvdYlxzhtv2Q==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/azure-resourcegroup/.gitignore b/pkg/alpha.dagger.io/.dagger/env/azure-resourcegroup/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/azure-resourcegroup/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/azure-resourcegroup/values.yaml b/pkg/alpha.dagger.io/.dagger/env/azure-resourcegroup/values.yaml deleted file mode 100644 index 8edd915a..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/azure-resourcegroup/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ -plan: - package: ./azure/resourcegroup/tests -name: azure-resourcegroup -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwcVNxbzdlRHczM3hoSlFB - OCtid2ZyNDZsMmRYeXRJM0hmY09rUWFjanpFClNjUnFXT09yb3BJMmJKNXN1MUIw - eTNIcmZKTG5YR0h6a0UxL0lIeFRBQkEKLS0tIHk4TFRYZkdmVGFWM3lWQ0pwcmx1 - TWlwSE9KTFlod21qbm5jQUdsZXVTT3cK7HMCg+rmRPy3d+uihLMPg7SvxVI7Xyr5 - Jv6BZJovEyX8PaB/dozzCwGMsGB4fALG2TRNbgskjR0LTGUgzv+yhQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-08-11T13:13:45Z" - mac: ENC[AES256_GCM,data:lldSGzZoJV4V56chs0Iue+gCBqvwViRY4ZeY4MajyeNBTH6i/k3YXGEZ1lI4suXLyf4BABILMQz0Y34G9oPk8cBWgPx4ZP0iCpvVa/H06xVkBVfntym7p/GWkNsOGiU3KpdGwD/0LLdjDOmL3vKbxNrpS7RvvTgQQtI4+jXtKEc=,iv:vB6P7SPT77ZOEAjTyOO6oSWRWUUWTrC4ekgT5kXvofQ=,tag:ucfzyP9V6HIfIlI8pMDROg==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/bats/.gitignore b/pkg/alpha.dagger.io/.dagger/env/bats/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/bats/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/bats/values.yaml b/pkg/alpha.dagger.io/.dagger/env/bats/values.yaml deleted file mode 100644 index 8672dfbb..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/bats/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - package: ./bats/tests -name: bats -inputs: - TestBats.source: - dir: - path: ./bats/tests/testfile -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlcFZKTkhBdy95aW1uTDdq - OFdiMEtFcUt2UWY4bGR1R2RMOVhGaTc2L3drCjNyTEdjK3hDNEk5U1B6MVZqU3hn - V1BnUHRKMktEVEFlWkJvS3YyeUpSY1kKLS0tIGIxQTdRUkZmR0lPRDN1RTgxN2RE - b05uK3JiMU5Edmg2WXMvWklKWW1rYzQKXMFWBurdM3edyKq1uifIF6RXLsUaFuwP - hYwgmcFroCYdNILt0sPgzOCQntWQevZIqITqs1vhvnxNgzDOONY7tg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-12-14T00:03:36Z" - mac: ENC[AES256_GCM,data:4fAHWs24hyuGNjM3XryPXUPd2lPsQP4dvsjbEStrbZtlbEY7wP31W9ZfBXTeU92t1ocpEmcsqsR9ihQnBndvhyY5bXhdFglWV54K83R6xDAZjGknIPilvwtt/VkEZg2uSGvu6VO7MlX4hZlO6YJ7dN1EAQxmQW6yG6POuSchPfE=,iv:fPim6bWX7KqE0DS7bLBHanl4DX+EBBijvltKQl7fo8s=,tag:GWKAre5MzXtRjlCEH4yFIA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-build/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-build/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-build/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-build/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-build/values.yaml deleted file mode 100644 index 8881930b..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-build/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ -plan: - package: ./docker/tests/build -name: docker-build -inputs: - TestSourceBuild: - dir: - path: ./docker/tests/build/testdata/build - TestSourceImageFromDockerfile: - dir: - path: ./docker/tests/build/testdata/dockerfile -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0TXlFYWNvUldMdlRtWkEz - SlBEYUY1Q0thbFdSZGpaT00xQ2Jkc1J2WkdJClBXUGVTamdmZU1KNUdjam9HN0Zl - RjRQbVRHVjR6S3RCWlJLaElaM2ZWVG8KLS0tIDJJejFkQkxYeDdHcWdPS0p0QmJ0 - Mm5vT1dHbFViK2ZIakNnVkZTd2lhUHMK63jJsJVLJMbQE2NkAB8qv8JnPHpvcNes - z17EJgl0lCLqeNHtfrTfSiIP4wq8gNLK4avCKK+WGDOIMsXPzK6RNw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:52:50Z" - mac: ENC[AES256_GCM,data:IwGlcycPdVfgjRJpaAjo2dcof4N+7/RwiAwrFPp28+KK2+TwsOlecvYvbeNvDkPODhRsxzLPDf9LnLsz/w05JmpuLKSo4IxxIbaM5J7kg8GeO/naQBO9NIiLo2WqYG8KFLix3dafy9ZYQu/+WTz9gU1savZTQD81zkepWfieTTg=,iv:SOaFO4hQjNrybAtw6fSIuh62TaU0qSUQRmUITcVcGTI=,tag:CwFdENpGB/fccXTA7v5tbQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-key-passphrase/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-key-passphrase/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-key-passphrase/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-key-passphrase/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-key-passphrase/values.yaml deleted file mode 100644 index 396c56e1..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-key-passphrase/values.yaml +++ /dev/null @@ -1,32 +0,0 @@ -plan: - package: ./docker/tests/command-ssh-key-passphrase -name: docker-command-ssh-key-passphrase -inputs: - TestConfig.host: - text: 137.184.58.110 - TestConfig.key: - secret: ENC[AES256_GCM,data:HqbZ1OQCVoWL596lSbmhO7bRXqDbLdXlx3GJFb33W1C7cTqDWQEvUNOsrvbmJ4BYqTGU5yXnljxWn+6XjtfZE4514obTfmck1hsxThCWulRWweqlnP2bEE2hr9Sl5ao4ng4q1fJpJ9L/gcOwv49P8G47jSG3VHUnf9/b6se464irP8iV/Fd8xF/QqWlDh1q5OnTFyfn4huq369BqQcr2WjCD/uPfSZQ9WyWd7lUtgytG5rXcc9eKZB3+ybRL6LLdBpPEQmPT95do2EBL0JzBHQ6YLju/GDV+ippNVDQMSvQRQeHIv4RIMU8CFSi0j73OoykgJ1BPnvYxwh5RYaEsA4gTVCplllXk/wGjRGbFE7AGBEADylksowAWk4q0d6Q0Rw8QJceWgTxRMXWNGg6+qLmKrGPSMli73fMpDwe2YI6vhTB6UiaCHiedZYqB6nVaDW0QrhmhzCudac23QmZ7gpS2WOdI/uz7C/VwmBw1xWKJOwlHzTk5Edesve+0iiHqYPe48ayMKSsutiadEGcwm5VtlHlEgYrfQwM7dmWLZW/ESERdUPju2ExZG/SCG8SZ4wmlxvqBxBDg2PfgNY9ll+hcG7CHKWSQ3JS1o8faeHo=,iv:wuc6I9GsQ7n91d5o+hiZpQ1QJ0PI0G+TM41sUiPsQg0=,tag:DQAkrYKhIgoathJvIJgivw==,type:str] - TestConfig.keyPassphrase: - secret: ENC[AES256_GCM,data:+WK0MDRLbEx0xoEk6MQekfNnNF8=,iv:IGd2nsfNEOq0xj+ilFLC3c5AQqANaIod75SW4Y8i4Vc=,tag:HK3bmelnlXc1P2Pe0mX77g==,type:str] - TestConfig.user: - text: root -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnYUJSamRXak9ob2p4OGll - NW9FczZBeVZRR25tQkUxWExrSVFTOUgrN25rCi9PWVY1dk4rSUN2Y3FIMmVkM01Q - cWdhQWxDY2JwOGUyOWpFYzR3aWM5NUUKLS0tIE0wUmt0b3hSQkVGM1RDOUxxUDJF - cW1kbGZveVlkQkJDL2xYbmFRNjZEK0UKrSrOB/RL5lki54j4GUCE2G3CCO/8jpMU - jfYkl7Yowb7kK3kKSNWORhB4ne3MEeGRZpJC8cvH7zjGvt/YYeU14A== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2022-01-26T22:45:52Z" - mac: ENC[AES256_GCM,data:o3am5VpObi632xW3wgw45ykcDZmjFofbbNkSj5mlqHD+F5llLMsVFStKzBJ/8v5XqKsUekRYyTN7wPTbKD4f6WQT4hsupwDxVEIMTFmjThOZQSAj5ia45SRNGyzuaO1ccclBEZzDdEQf3vnLJbOtIFaomVov5hvtijr5cfwUNN4=,iv:RxGI8NY41Xn9ZI7p0u9WcE0suVd/v5ODsTnLsV+ukVY=,tag:lqry0R5RWlvOXvjFiwAMPQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-wrong-key-passphrase/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-wrong-key-passphrase/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-wrong-key-passphrase/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-wrong-key-passphrase/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-wrong-key-passphrase/values.yaml deleted file mode 100644 index e54d6f52..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh-wrong-key-passphrase/values.yaml +++ /dev/null @@ -1,32 +0,0 @@ -plan: - package: ./docker/tests/command-ssh-wrong-key-passphrase -name: docker-command-ssh-wrong-key-passphrase -inputs: - TestConfig.host: - text: 137.184.58.110 - TestConfig.key: - secret: ENC[AES256_GCM,data:9H5WgztxyzMQPtXFvCOdjTDx9XXoGmF2C+Ml9GD51EDCMMSgmMSGnHn1R4iB3fF8phkKqI8izvPf1yJxuAJVy7RuY0SvysSGSUKncwNM7tZ0Ca/ItZx9rcQfViE44sN0Bhy5PtiEP/CfyCYzQfytjZL1AvnXLktKwuwtXOFPR9CgUtBCU3pgXlAfu23Yiko4L0RjzTVqai+T7BC5tjQXLVG3CzQexj7eo/QsrQoM3PZMWlANg8xSnjQabkfjmREN6TcCM1YsLNLEnBOZwbh3qpBuoDBmoc8WLQlNWALh4kRZgyMwvNlXRMK4I+BZ/GSo4gRvAHXEtDNbCPNINcOb3/j3yPnxNvBdLR4fSfHInvrgM4fcPmgMaJOMhFhR6i+f+La/JnNmwTSPnISh7p8gDsBRbRxZoTlCjGf9v30Bg9KQqSsFu5vsmnAB8+dbnqiyaPyz4TuoRPA0rnx0JQDIDbX1cntFV2o/HVQlPLpcNx2mSoFiAKpapjowOkcCghTFWP+unRdubCr9wVEzmkRkQHgvIsOwzQjPBGX+bQF9vCf+8HZ/qBWxFaQMHTpIWAMXUTf2QNawvZQkj2RWoh7zG5cD3y8JTEUCD+2eUXedx3k=,iv:9nBZTTbL/mvR/Sy9W+ozDWeoEfrGYxtm1wxIbx53HqY=,tag:KbOHlBNJlMZgpUi9AEbKSA==,type:str] - TestConfig.keyPassphrase: - secret: ENC[AES256_GCM,data:1VJ0/g==,iv:4zm6VTnb29Sb/a+FXQ0vqF79vjbjVTdmHMNdgftjV7M=,tag:E5D/qDpFY5cTRhWKvp3YCQ==,type:str] - TestConfig.user: - text: root -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2U0w2S2luTlJNbGhnd3FY - dmp4K2t6ZWR1Q1dYNCsvRWhZRkl4UWFoVEhRCmZHUHNBVW5LZEl1ckpGQmJlZEVP - LzEweFZrbWZoMDhBbGQ3eXdrbGtoNzAKLS0tIEhoWXZidi9yejFjaTlCOGo4Q1Bl - R2tNU2JJWHFQTmhnUDd6eE13UUhQazgK+OQ50Q3+S5Fn2Y132ZeDrgUKWPcAk+et - q8ppfZiPOtH4p6MwboSuh/vaTAAsxks7ctnqnU1pY+EHfnp8bHYHgQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2022-01-26T22:46:36Z" - mac: ENC[AES256_GCM,data:Bc7LmOx1lEb4K+BszbT35YClp+C4euJaZzzHkEYqxXRT/+CErRYH7vChk+6ewfMP/NZzg4lfuCK2mGfl4c3yB251sjEv0hvMqkLn4lCDBSnAkIO4EnpbGPvHNctB/GY3XrXFNM/AQ4Ez2mNUDchuJAQkw3FmOkMsP2jE7ZIDf0Y=,iv:x7J0gtt1WwWzMFgaTuMYQuOlNM9MgzUjMIQ+P9ibbIM=,tag:fKOf/x9XsIFixWg1RaN00w==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh/values.yaml deleted file mode 100644 index 87489651..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-command-ssh/values.yaml +++ /dev/null @@ -1,32 +0,0 @@ -plan: - package: ./docker/tests/command-ssh -name: docker-command-ssh -inputs: - TestConfig.host: - text: 137.184.58.110 - TestConfig.key: - secret: ENC[AES256_GCM,data:y+EideEd0sTJ4FF0L8neepRT79T8GtE95dGNywkkG9EV6G81ewwyfkAQsF0Lgdtf/Lziqa/v/8xBQJwnfjTAqFi+qHPYvKjXAqgUyfeHSPTvHWudL4ELHcIu/4YvvUYOu5oaOSxeeb8qElZ2id9GyFBV2cJVywfHBagAdGuejnVKfHSMyZLc6Dxdpa+QZt8srPv4ZPnJUN6s7tOC0IgDESsRBFSgSE5ld4smb84QbP1bfNzSPW1Jq+vo1EmoTJgMjsOkjSDfXC0+rLdpHf958ZPLZuM5L86hx8BHauQZ1v3qNXChPNFbEbhEO7yrFAWlXc2GqvDrhAJlTYo+Xl6NPpE3cixcwgFtwEc3EHln4AaRxs9UZnx8s8qZ7Ys4iGU9nWdnWYIdPTxtcFjU7hdTcSYxCfDZMLYozT/9cyKaOUtI3TW3+bEgXUu6Zn6ABpcIZjf6ZjjfPXtS0cpKd7wCWMXGgPozO+PayFgJndJJteEDQb55r5oSaLbajpmrlrRNOXxJsGNhTBke9PSdJ3DGCS6iYigDsQ7S3mYW,iv:jKm2y1zzH2kvPkuDnJRNa8l05Nwbc9bf3IPKhMwRdVM=,tag:xDevSihBxMI4eOTb2iGREA==,type:str] - TestConfig.user: - text: root - TestPassword: - secret: ENC[AES256_GCM,data:8G7Cgw==,iv:+hlWzOxy4H9OYwP0x+7LIMFhQoebmP3yUGRuhPSGGgI=,tag:i+dHE+W2zud5xGvWL5PxVg==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJSU5uMDBNdDEzQXFsb2ZS - VDRDai9yOHFPSnI4dXhDY0FUcXVkRXdMMXdBCnhSTER5bEJRRDNZbStVTTk5d2FN - MUxkM1JpQ3NHa3B4MHlnZ1dDU1RoS2cKLS0tIE9Xa1ovQkRSZlBZMjZlZi9OUGhG - UEpoZy9HZUlHOVV3M05OSkZQS1l6aXcK3NfBITvd6la6nkcIzqH69xfv9RR0Jm7x - vU5FvGROK3Z0ZR8NNXAtNH6VQQ21TDD2MOXWOVvjnIAAOVNEyc1amA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2022-01-26T21:13:07Z" - mac: ENC[AES256_GCM,data:QHSy5Vryhe3G4OS6GRs0t24VuG2HKbka+WuC03CKTOaHlpE9K1l0kuXtFpEzGGxmYs8FKUW2Gb+K3HSP6L/w3T0D0jY9fvSMrX7anQUCzIqRlzxQiQ+ZYueeV9Nr8hF78QfN8Ix+vY03u7KaAWzc0+yHtxRsDAPGjArvrG4+vBs=,iv:ni2u3M1EUsz3wndefGxdhX4Q/KwcZ+FZaFgKhRep22w=,tag:LC3KBS+ijbn01HzSyySQDw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-compose/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-compose/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-compose/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-compose/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-compose/values.yaml deleted file mode 100644 index 9e3527ce..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-compose/values.yaml +++ /dev/null @@ -1,33 +0,0 @@ -plan: - package: ./docker/compose/tests -name: docker-compose -inputs: - TestSSH.host: - text: 137.184.58.110 - TestSSH.key: - secret: ENC[AES256_GCM,data:Q3rJqH6p2t315up5R0XjPFy8fastZ3nEes4ZGFCIZhI/ULo+4PCMeVubJJ30mJcseMMRj8EA89PrKmQeualQNWYEB3ytNi/OZwvXmCGKmnmAwAg9jGBskWGvyh7s5tztWF9DVTFqhK3lQV5wF9PNrTVBbHRrDWWO5AQVIFakDsMCbSB5Tmvjo0QYqq2DBBEK8k3aH34srn1f2no1ih8DidP3o9VqvSl7t0US+okT7B3V+v0N0B0/kRQrtgfv5WXx10TUWAxySRmLofIsWPH2EXjzdFEo5S4tk8I2nxGMPladNzuMe4LX+er2uqf7iE578K+XoVePq2Bdn6yBeqK3votaFT+D6qC0e112IW8a1nHxX2taKCCY11EKr18ZWvj0YYwjvca/tdqjzSq+SqSEaLiNtrrPINriER76SNzxZcTBTBY1lYA3IYhNzF67DQBh9di+beh5Lyb6nOV77zLXm7K8l7dlYSm6piAHyJZt/LZwgQFDAVv/F6x8zqLPclXJodR+z5yrHhtHFlqCCTNpp1trL6wXaOl3MNxo,iv:GXOAMgvBnyedRMG2izQBPDxjdsjkJ9FUi1BQJeRFoBw=,tag:FJtPBv+q5hGfcR3gTmEIPg==,type:str] - TestSSH.user: - text: root - repo: - dir: - path: ./docker/compose/tests/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBMSmROdEtUblF3REhwS3hC - bU9ObTE0aWQzdGJzRlB5WjA0UG5nZFFJTEJjClljQWFYYWNQaFozZGRMcWxyT3p3 - Y0ZVUlZISUNlVkxVSVBqY0RRaGxPN3cKLS0tIGhsUTFCK2ljaWZFekVQMlRSRmtD - bEY3N3ZLTFpUNzZVWVBOK3VNRk9hWlUKd9db3j7FqFW4t7TxFyzudKDPTVqr66v2 - KqedhRYCjF4ZozN0H++xQPH24RBRnwc6Uq0Vm38UYv1ozDN2L/l5DA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2022-01-26T16:47:21Z" - mac: ENC[AES256_GCM,data:tpXsVPpzLBMF5ytMumpl3D/lbxMCy9CLhFkJ8xFYwUmoCKIxWHAyXBcUO4Yn3B4NVrShnAXm5U6ctQYBNLQh7sMAuakeOzlDU9E3sK+drFlwW5iuddCH5ksjCPKNIdOKt7+i6O+984iJs1xHLNdsOsyB0bH814RFBLACSv+gHls=,iv:KL9W6YS5T864wGOS4ONdHTOASmDBZerL6TaaBf7zrQI=,tag:x5/Lr7OovvbaWQoMWx7z5Q==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-load/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-load/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-load/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-load/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-load/values.yaml deleted file mode 100644 index 9cc52e3a..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-load/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ -plan: - package: ./docker/tests/load -name: docker-load -inputs: - dockersocket: - socket: - unix: /var/run/docker.sock - source: - dir: - path: ./docker/tests/load/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAzZCt6S3VGQkM4ZU9TamhQ - c2J0RDZpdzNQZUJ6V1BBdHh3M1NhTmJLeXpFCldaOVNUYVhWQW5ma3JGUk9XZWZ2 - YjZIM0tMUGRoSk1QYTFkalA4S2N3UzAKLS0tIFhMeXMvaGM4UFllYWFCNWVUZFd5 - U09jNHNlK094NGoyZnRlSk56T1N6K1EKJs5D3S2zPWNrGCyLWDDjq7Iif0m2JoL6 - gqEjofnPSD7SjgfNKIpeOWcQ1sI7wmI4GGgaTpdhd431XxOn/fU44w== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-10-12T22:18:14Z" - mac: ENC[AES256_GCM,data:HjlY0FzB5hsg/VfyBbVTNWDCYV41lhPeyHOVrMdRWiOKJnV1aKGV1826fMXKcmgJK39kovcEXaXmVYOv3qtpDTlIMcOdoEflbDY/fhZmaDxxNq6QSkYfmadO84YWvS1FyouCPVZzRDe9tBdNyIT5cCx8CrgZ5bebh9aNem3lqRs=,iv:juMn1S06I5mZP8fWytn2eUkOvjNQepn6MAzDWvLxrWM=,tag:0BxrbK6EaoB44RgUHD+dpQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-pull/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-pull/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-pull/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-pull/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-pull/values.yaml deleted file mode 100644 index 1ddc3303..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-pull/values.yaml +++ /dev/null @@ -1,26 +0,0 @@ -plan: - package: ./docker/tests/pull -name: docker-pull -inputs: - ref: - text: docker.io/daggerio/ci-test:tyrgcrtlasex@sha256:3b308dec2f3d4c563b9c71ce4ddc660e476b899d06fa37f3b9fef350c1062a1f -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0WFI2ZGFUOWgvNkdlZ3Na - dEE5dTlVQi8vUVJqcHUxWE9GSmdnNmZLMHhRCm1sbFlJbEw1ZVFSVXU4MCtkT09l - dVR1WE5XUkVpSXA3aXN5TzZLaWJRNnMKLS0tIDZINGpzODdXVUdKVVpFMjFUbUFO - SG1raUVNTzZIWDltV1pOS3hySHlJeWcKg3blmstOGcxtPww513+mAEA0MWOXwNAT - 5ngRvG6MraW3g9dhIuUYOwjuJyz1Z07/DBEocSxnjSyw45ZCkM1/9Q== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-11-23T18:15:32Z" - mac: ENC[AES256_GCM,data:+HpG1ZDND1Japu1hLgTVKF6CfEUbYp+sEBpv0WtsCHcHGYeYVkZT8ZJKajWlz8uFfikpKv76FkBw8XqKVXyPZYTQWuo9VvmPTF5HajiVE6kP5Ax3/5Sh7ecwfGdbqE3mQoj+jaQE8NBnGbCBljij/xFYW63fIaurqsyPWTQl2YI=,iv:fBPseUNueHO4ZUnlwDljfAwUvi4UyjGysXMTCmoAgYw=,tag:Pg4dGX4/05SahATlE6zrsA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-push-invalid-creds/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-push-invalid-creds/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-push-invalid-creds/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-push-invalid-creds/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-push-invalid-creds/values.yaml deleted file mode 100644 index d8df2319..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-push-invalid-creds/values.yaml +++ /dev/null @@ -1,28 +0,0 @@ -plan: - package: ./docker/tests/push-invalid-creds -name: docker-push-invalid-creds -inputs: - TestRegistry.secret: - secret: ENC[AES256_GCM,data:+gCg3g==,iv:TVQBLFvC1T+xNSJdmhEz+0cciIpCbo6D+twwghUU0ik=,tag:R7SoByjnyj6Aupw1/6c+8w==,type:str] - TestRegistry.username: - text: invalid -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4czBwNGtSdGZqdEZ5WDlM - SHVYOU5zdFl4L2ptZk5rSHgwek1aaDNicENFCkJ4OUIweU5OZTVKalpTSkhYaGxB - RUpHZmVvU3g3Y2tBZnRUcHh0TE52M1EKLS0tIHI1VUt1aUR0a0tDNHJVTHY4eEt1 - VC8wSTZvUE5UaDg2WE1CaGMzR3M1TEkK9v83AVI4lvFgjKCg8UmQrcxarlESWTfV - 2cDdWgoH7ZqgXo5jFv2tn8qQWHKl8eTTeYUWn8GoNVPKrCroax2fiQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-08-31T10:07:27Z" - mac: ENC[AES256_GCM,data:sdycrW51n0tHL76DroLAUR33Fis5Hixn6dQ7LofNoIcdAj334MTWIf0jxnbzrv4Dkm/MsU90asiGwQyHI56t8mBUqrLJmd8PBE/t6S4RghCAIlM3mcHB4iHsC8Sib2URn3wKztcIuobfU8e9IvZoW4X8R/QWc1jWNmIt8VGdwfw=,iv:g7ri14SRxhsd1SSibYzDig6mZRG7LJ+R6CPDNmNOAfI=,tag:wM1DVa3LL9zFcHKAJJjugg==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-push-multi-registry/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-push-multi-registry/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-push-multi-registry/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-push-multi-registry/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-push-multi-registry/values.yaml deleted file mode 100644 index b6c8f94c..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-push-multi-registry/values.yaml +++ /dev/null @@ -1,34 +0,0 @@ -plan: - package: ./docker/tests/push-multi-registry -name: docker-push-multi-registry -inputs: - TestRemoteAWS.awsConfig.accessKey: - secret: ENC[AES256_GCM,data:Vg+RRHYV5p0twlKtq0zGzokTsXY=,iv:XXEjaZBmS7A+KBZQ/0ZJ4WLH3M5dthg0lq86BhHOt2U=,tag:q6QSQkH9Jz/e4FGlBNllug==,type:str] - TestRemoteAWS.awsConfig.region: - text: us-east-2 - TestRemoteAWS.awsConfig.secretKey: - secret: ENC[AES256_GCM,data:uk5BBJhmc8RadT1FSIsnW+/Rvs8c+kIhshBia+DX+UEWiuPV+RwXfw==,iv:DzXcvUcy3amU7wCA6XFgPvGUAU+dxPZQMHKM94d9PlY=,tag:QDDs4kg6cFPLLGRM6sHzfg==,type:str] - TestRemoteDocker.dockerConfig.secret: - secret: ENC[AES256_GCM,data:bxlKdGBSd2Rxf0Kmw8+QO1h0308rGYPqzUO17Eg4RUh2WQjd,iv:vNZww3t8yBrcmmddJghtJWfkz3G9j2CPGyx9B3e/WK8=,tag:qlUl2dkREcGZxdKeAzPjzQ==,type:str] - TestRemoteDocker.dockerConfig.username: - text: daggertest -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnc1JZMUpTUnFZNVI3RHh3 - a0RtTDNIQ2xjaHJlM0tNbndta1NlMjc2a2dFCkQzV0FpMFBHZUdZb0RMYW1DUGN2 - TlZVQ2dhdWt3OEN5LzZEYXR4QkFSTTAKLS0tIFdaS0Z0dG85QXNNTnpXZ0dFUGpY - Yy81dlJ5cDhCL1VCc0szSE9Dbjh0TUEK+xcj1bHhJr0MR+2QLL0Y+at0/SFXcutx - VpUkCykV3eBV6P9I51+3NeJ/ZMmJ43N2geFFJNeacmn8uQKNxpgGGw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:54:01Z" - mac: ENC[AES256_GCM,data:xgxY211azbFSosH2c+ogQgAh7gH/fNZdzkQ8S8JdC1a5nSHsI3KL/GI+KDRkpg4ZW7oycEgQVUKv0Cr9c6n+aRPqfWncCKN3R6DtyptBowDeHnYeXqvtao/OpkOncpiNk3VUVUiXpPRpzE3alS9jYwk/UYk8bMVCnp9XnxpXKhQ=,iv:ZFoAL4nbdIOBaBsM959T5jyaL+5ZKMxA14swIkU6b+4=,tag:veXaxVF1ChoPhEj3Tfj9cA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-push/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-push/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-push/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-push/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-push/values.yaml deleted file mode 100644 index 5cb19414..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-push/values.yaml +++ /dev/null @@ -1,28 +0,0 @@ -plan: - package: ./docker/tests/push -name: docker-push -inputs: - TestRegistry.secret: - secret: ENC[AES256_GCM,data:ooc+0IjYtX9tkM7q1i4Ws6CorZsWtGQzHbjGx+j892iTZC7Q,iv:asdJzuRAHBRhD/FlkEd1VvX1tIz/qupBL7sMQWxZL5E=,tag:yuTyDx7hZeC+cmHx6tspmQ==,type:str] - TestRegistry.username: - text: daggertest -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrcnpRZ203QzhtKzc3bzF4 - Y002V0JUUnNZMks2VS83SjBOdVZid1dxbTJjCmc5VGtvM3lOejEvQ3VMZ1ZyZElZ - Skd3ZWxRMHdQRHdtZFBYUFMweDFlL28KLS0tIHhHeUh4a2gvb2w3UTEyNFZaK0dS - UjFJYTc1UUUzSFVkZjQ2blRsSGpVdVEKOanMR3+WlAgoDfqTUW7WPW1ytT3NdkTX - 4Rqo49QmnuKFJ9tKoBFQOqgIo8E/lpcOkeIUiy5e/35FvsZ/KFk/pg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:53:44Z" - mac: ENC[AES256_GCM,data:WGLgBuMtbCVeUGmj8ImZw5IG4H7d33rAcZdaN42jTI+O6Mb9F1qpaF4jFT52KFFTeImMjWP7QKDWhyn6aAWnZfHukMooV7QCxo91PTAQPuA26T/H32bDy04rorax2bUAdw4dJa/5Gl2H2A/TP/cWSwimD5O56k70NKZ+2A7/DxM=,iv:g/BcUDplaxiglPAF9s+5/Z5Eq97OyizpN4ulkqPtJ44=,tag:+5YH6P84dw3ApQd4vQEEWw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-run-local/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-run-local/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-run-local/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-run-local/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-run-local/values.yaml deleted file mode 100644 index ff2cc435..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-run-local/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - package: ./docker/tests/run-local -name: docker-run-local -inputs: - dockersocket: - socket: - unix: /var/run/docker.sock -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpamtuNHB6NjY5L3VNT3hl - TGlmVFFoZURJR1RmZEFvSGUyVFRaSWNnSUMwClJiaDVGZWJoeDBMY21jZTVlREdS - aWg0SjNWN3BrTXRneXJyZy80K1JRSFUKLS0tIFEwKzdkVkNPT2VHTmtiOEdDQlZa - cnh2eHU5TzFjVkNvTzUyczFBL0pwTDQK60+wrLmTaD3Ws5ZAXdqBkMjaVP7Iz69k - UrkqkMbaUlvvSKK7dB5MuTGEEN6A1viAGal9ZjDHlSobkNPuE24QEA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-09-21T23:13:41Z" - mac: ENC[AES256_GCM,data:jF/Uu0y+uXym4UeXfRmzuZvEkqbk12vzByoiMOk2X/lQ+26x5LzWWwso7/2KjAnDonrKaPLChpaBJE89SIyuLKcU43/ttQ3xZK8TBfj7RWU5hT0Bj1kW2w258LLqcvYSrmHsvzh7aigG561LowJYysoHt4Bt6m66mwZq7wjelqA=,iv:toaSdz6F1oNf5ELSP3/aHLEAzyEAXKLZfxJBoR/aBOY=,tag:2xnNbmSsGTsMD0YT1+valA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-run-ports/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-run-ports/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-run-ports/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-run-ports/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-run-ports/values.yaml deleted file mode 100644 index 500ee238..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-run-ports/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - package: ./docker/tests/run-ports -name: docker-run-ports -inputs: - dockersocket: - socket: - unix: /var/run/docker.sock -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpbHY3ZzZjWWdRcVd5UUdT - eFI4UmhTUkd6a0lscDZ3SzVFT2NiSzFRUHhFCnRsRXorSFhjano1WTcrYjlGZElm - S2o1V005SlpSbHBmbjJNZ1I3VTRXVGMKLS0tIEdlMThjcmNGK3VJdXV4anNud21x - TS80V3BnN3BaeDFTRjNBRTAwbWRKcWcK1rH2zWxTQsbSgOs9Ys89ZCP7kVOm1wFe - Kv849q+QOvIy9JPYkGgV16Yr3ijFF7z/h0PCicZRI76WYV/3JnbYmg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-11-18T00:19:27Z" - mac: ENC[AES256_GCM,data:TtV35YtlXlZLvE8H+EoPvjJmCowmFftsS2DIifDeIeuRxkyMfk9tq39BemWFjoLKJx3FgFvC8bXGbWi3UMWi8wpzgjqmFVJCDWUdQ6NpdzPCXCVdOdkGUV+F/yjLX0dnsUZHnwSOZco0+uk/sNCWxecBE590brHoJw91j075DXQ=,iv:P8dEwdFnDvvMSJvNK4GXPMbTXbvLEsqoEhoP4K1IPVQ=,tag:LTT6gXDfSMWYttLOXQjidg==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-run-ssh/.gitignore b/pkg/alpha.dagger.io/.dagger/env/docker-run-ssh/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-run-ssh/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/docker-run-ssh/values.yaml b/pkg/alpha.dagger.io/.dagger/env/docker-run-ssh/values.yaml deleted file mode 100644 index 3d492daa..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/docker-run-ssh/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ -plan: - package: ./docker/tests/run-ssh -name: docker-run-ssh -inputs: - TestConfig.host: - text: 137.184.58.110 - TestConfig.key: - secret: ENC[AES256_GCM,data:wC1a/5dJY1wwfIakJS0o1NYquljhdC+TnG31JGCh8o5SXn7oHflD6bbsgb4iKp7Mr5/4rmVeeucSmK+KifdMwXOjsd73EgEUUIRFDfd1D1atO/OivNsvIFYNA+E68nVM8m4FLVnwxaEQBJ/ZbhUzyU18KwU19dQsvI5PvbNS8Q4Psv3684kZvUXJCu+lHyKu+xe4/r91ljbz+G8N+XCHR7Cw//VEWM2MGp20dMEgPWUEJnjcBleqXug3SQamz2R6wKw89AP36k+IEq+uf9KwFhOHGvqCHShdFmJa0HXfPT9Yy7cGGOqPFYH+oWcUefiq6RlenJlryJGwt/MqCHKuMRi1vUnqpQCpBv+rTsAEHLJERl9ReMHuWAxikAptORnVoNf2cmxqqhwt+2P+yjz74PtpSzL5Clp45AuCABlYJmeHchi5cLQU23Sc48BTfAQLU89WdjCxnQnlY7wgdYpFRZ8oxvl6UjLNwBUUDfsQj9cQdalxeQ5cIP1lXL3Mq1OcDL5qc0mS4Ni0lB2j4r08zdb7LIkjBtQGTUs2,iv:M0SpPKJJ04Mysr0ljT/1KCjlNsDTXqcfbFEqK/AuyOk=,tag:BgLREx5+12R/UlJ0KJTvkw==,type:str] - TestConfig.user: - text: root -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpamtuNHB6NjY5L3VNT3hl - TGlmVFFoZURJR1RmZEFvSGUyVFRaSWNnSUMwClJiaDVGZWJoeDBMY21jZTVlREdS - aWg0SjNWN3BrTXRneXJyZy80K1JRSFUKLS0tIFEwKzdkVkNPT2VHTmtiOEdDQlZa - cnh2eHU5TzFjVkNvTzUyczFBL0pwTDQK60+wrLmTaD3Ws5ZAXdqBkMjaVP7Iz69k - UrkqkMbaUlvvSKK7dB5MuTGEEN6A1viAGal9ZjDHlSobkNPuE24QEA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2022-01-26T21:17:03Z" - mac: ENC[AES256_GCM,data:/rE7qmq3UW9UdZta+Um6i5kErbmosTAVkt9+nKZSESX4WiV9eRYqcjJYfI45JymFX7B74n8TOLDW5v1jk5EejR94L7R0TB6gAs0kDdN2JNlaxcmfRkT+vzs9eq9DU7Ts+5XGLlZ26R1NDCHFBiJSb2BhGmUWelNhaHqZ6Z0WvIg=,iv:uXL6WNAd2O2sgKoraBXaxh8z71+z8I5WKYcuRXDiY8I=,tag:qJtcCesIgBPVxzwqFxg8ZQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/git-commit/.gitignore b/pkg/alpha.dagger.io/.dagger/env/git-commit/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/git-commit/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/git-commit/values.yaml b/pkg/alpha.dagger.io/.dagger/env/git-commit/values.yaml deleted file mode 100644 index 2b504b71..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/git-commit/values.yaml +++ /dev/null @@ -1,26 +0,0 @@ -plan: - package: ./git/tests/commit -name: git-commit -inputs: - TestAuthToken: - secret: ENC[AES256_GCM,data:1F5Km+lgtvwkMIOoNRvnjbxUkeFp7xgNrk20Rbd0vlJGFurHpwSO6g==,iv:DgwDFxbMs80U8ICOdAWIWfPy9BLIzM6sSPHXe5gE+y8=,tag:sQ0al8wERZdvtgUZYe4pTA==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnWkIxUExFTnQ2VS9pSHVv - Ykd6eUl4dlRQeU9YRGtLQWhPNExZakZORG5VCkVLN3NnNlNxZ0hmQW9TRGU5WXpN - UmYzZE1BUWZ1WDlPWjA2dURIbDA1bGcKLS0tIHBkR3c2U3IxY2w5Z0YxOWxLRkVv - M3RnUDF5QlhhZUV4NHF5ZWhkcHVrNmcKUJIummOk3FX1Bert7gaMtbMpbosIf/d3 - HBATJRng4VNmcSimSh14pDRxyW0NdIPA+oL4tidwLVbQQv/74+IGKg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2022-01-03T17:48:06Z" - mac: ENC[AES256_GCM,data:EamKomihsz84e/FyyVRAOAxzI1CsWstMfTa4DDIouO/7Z3+70KLm82IfS/FAiv8dYhj8d7z13JFXCJIpaBwalt7KhagCGza8xcaEMteDvO17SPwhD82mZNqmxmiv6504UXhjRoG5nF/uRRC6WDmt6IAFtEHWfdw44Hu1PMAlhaM=,iv:Pr+RgNvQTRjEHop1BKbAJ4ASZRj8wox7pmlpUeUGk9Y=,tag:FXrUTLYQLSxPajQ+MoKmLw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/git-repo/.gitignore b/pkg/alpha.dagger.io/.dagger/env/git-repo/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/git-repo/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/git-repo/values.yaml b/pkg/alpha.dagger.io/.dagger/env/git-repo/values.yaml deleted file mode 100644 index 4dbbcc9b..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/git-repo/values.yaml +++ /dev/null @@ -1,26 +0,0 @@ -plan: - package: ./git/tests/git -name: git-repo -inputs: - TestPAT: - secret: ENC[AES256_GCM,data:SvsXkYYhHr89mL1Szg5vDJVemUXVkZvz8g697jTmt2ug61rrDD2ipA==,iv:a7pRsZvawsxqWXPvqCMilOoLdHwdG85m48FkD6ACSh4=,tag:8xkQ/ESO0oqtv99eAPfjdw==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRVm9VbnZLQzl0LzBjYUkw - cXBwTlJWeXpCellCenJFcEFBejVGREpIaVdZCkV1U3BMK1BUOStvUThUd09DVUNK - OXJ4Yjl4WEtSMHlpeG5TVUNwQU5iMXcKLS0tIE1HS0U0YWxYS3V5UXFmUUxTVGlk - TmhJNisyamw3d244aGVJSEVFVUVLZGsKvd+nowA0CLXQbdvyI4J0lBjs9vdISWlo - gGvR49uul3Z8raVWXFUzsyQ8xTvYNg0ovynFG2KdagSKr1DlhKMBEQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2022-01-03T17:42:22Z" - mac: ENC[AES256_GCM,data:sbdzqKrYToYjG44St3I/TeYGVowCTFmzMGvf0EASAtRApo5Zj04Ezv7yoNwMq+hzTky9PUxLhpjhXTUzKCDP70NE3XzJlYm0f4GK4H75/oZ28++kg8O9I0lUPES/Vrmeg5qwYEqoS5J5B5bYWLDBXMnBZxDTkOzSXUCgcrg60vU=,iv:s9c5tRvaROW30Zwc5U+W7qBtFH7C/OBa3ZF9c9yioYI=,tag:ZYI2Xbg2PMBsonrFo6OhMA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/go/.gitignore b/pkg/alpha.dagger.io/.dagger/env/go/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/go/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/go/values.yaml b/pkg/alpha.dagger.io/.dagger/env/go/values.yaml deleted file mode 100644 index 97ae0401..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/go/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - package: ./go/tests -name: go -inputs: - TestData: - dir: - path: ./go/tests/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpQ2o5dkg3S2tVZkhJZXoz - VWlmMjdvZ1B6VTB2SlhsNEdBUG5sT2xTZ2d3CnlUL1JHMW8yK0FkQTFra0tSMjJH - eTcrZUs3Y2lrUG9xUDgxNkhMa2VNbVUKLS0tIHowR2ZneG5nOUppQlY4N2hEZU9n - R0o3dlptazJPTmp3OFo5RDcxOVg1VVkK1lLu/wrPvgzXa8Ym3qdvcuYCj8csbtOG - T4HjRvA0EEF8jmFEuqS8Y/N0vQiezoZR7JU9PbjOoD1B5bLHtJcryQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:54:38Z" - mac: ENC[AES256_GCM,data:hxLn6KQKeN0l1UlVVmOGA6IRsNA97xyeUBvbNjquqmF6+ess7l/oORRjZMNEgk7OnIC3Cjh6AlSph3iL4Jf9AWRBmsoyoQxb1njJNIotMyjveu3DcgV264U5HLGIUn0F3xncOxsGIAobLUjS4gTtP7wV2C9BV/X18cYfc9Ak4L8=,iv:H7hYoekofXOcyWzcnEWnYSlB3MvO3N+RqO3PrNIGGFE=,tag:Z4BNSUSLOUpmrZDyuTeV1Q==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/google-cloudrun/.gitignore b/pkg/alpha.dagger.io/.dagger/env/google-cloudrun/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-cloudrun/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/google-cloudrun/values.yaml b/pkg/alpha.dagger.io/.dagger/env/google-cloudrun/values.yaml deleted file mode 100644 index f64ef56a..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-cloudrun/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ -plan: - package: ./gcp/cloudrun/tests -name: google-cloudrun -inputs: - TestConfig.gcpConfig.project: - text: dagger-ci - TestConfig.gcpConfig.region: - text: us-west2 - TestConfig.gcpConfig.serviceKey: - secret: ENC[AES256_GCM,data:ienSBYZujZDgs6U72/FY+DvfDr8802y+YruTcbwJc3JCOir6mavED8/cimWFffxCJyxyfP2Wm91gE4tfT5hqdA3+MwZWcdYPBfT7Ojoj80ywdHa3uJVrdS9K4k457fc2Kfo4LeQglv1mBqOF9hw1qXGwE8zCCbxqWJsWLDptv/PEugi1CbOvcGmMPWDkRTYnSXjfAPmHTSl+tl6wJIW/1AsRVEBo+oCFJNo18J+RKFrLQVYIJxy5+BLzeJb8tx7ffD+Mkkx4raHFPP8yli5wMdlTqGq4HqXwa25q0g+AOZBXSppwLQyG2WWlDYYWdp2oHdZnlgVXp4rJXrKSuiKW2+I5DnokEQLo9hkLAw7J8yL7+ZM0lpHk8X1N6JeB8r/MO2BwLAbsGFaL3MEGzD0a1s4qaVMKVdWmpgntXlKSuQJZ87SXtkyl3DENKHKdLl6UL/mOqA3Ga38BBScnbheMra1zroK6SeAq8ggGOIz/PrrpmhRSIiNfhN74P3EN2Yvq+IXFpk8/wyhu405Nt9rOPp6QJc2IetO5tz0sXRJMLsSdSsX4tjDJtVaE+M8odzYODLSQ+tM4wYF8rW37Ju7TCyUYpAN80UQuyeEocvdP9Wln0SYFGtpbJlfZxzWoXr1BvCWMkMbIfpYbq1FeKx/j7XLp5dHXa99PsL/po5oXOjqagZoTfDly52pS2F8CjnqZdQf+OLd2eGauIdiSecDI4tC9J/FzcpGZDl9VJENqNOJLtbv+4WODFBW55mJsJvh31Pt5Egyt9VwblKoGEjJJ1gUvN8vq3YXR8f04IVFaWG3/coyLGy6hKLLvmnQcIDZMFqgYhPEvnkCLOJxIXqBFBxYvCH3hYTSjc5+8n6l2x7oeP8Q8+R3w1zeRFK4JgwwyM1MB4tgHb8NgBZZ14g+LXYh1MWXxG/s29PWlhsMNX56rDLZwC3M6FRZNmLuGP7hbIpHLhmtwybHVBDO7ZZtufei/cPbKhbE+/TgsCzoJ7vFWoZKTnMZ6tn9BacTMjkREKz1oFUW0d5/5nWuHEHduYt2jgWDk4hShWG7kukiPY38GYYbj7InPAw+tuPkGooppd0EZayhlVrc3s5a3wdU6MJFd2vqMQJlW62R2BWbln0DZf/K3yOVhNWcW1BPiHRm0fhF7AFSrv/awZQpOpYMrObfquIA3g5/CKvu1Ly4Q8nRdH42DmynepRckvrv++snDXXIgRpRZ5MnNRbIxjup5z1no94m1z8eyvbMJnbAF8ul6BLrwhBNvqgEBvhbh/b+OIitGp1r3prVgDYVnBY7geRrAd2I0J6zvpii5aHEUmWQPyAvRTtlin/epebnI5RSild0PeJMPOVtGRo/pYnNjKHHA67GEYnqVgcje7gH2jKPNd6qC1pP4oRCJEYlRwI5pwmZdWTcNg9H5GjWlulAK92cwbhaKF94eRuPwyhyIcMQHrO7mChrgfx7UeWUgyKdEMfi0/TNUIqzH0dMRlWIr4UCDuZ+3LHJEHNaD7CxA4JH0dEHSMvM4f/fNk2eRTxdd+RNJQoRqXmqtH7Mo1Dw5pi9+8JLh55ze3QFxo/89ZsJkh6ZxDBinhQ6tOUi/XAe8eHId4NBgHG8p0ipRXqtgjPMxxyLTb/rITAlubkHtID2tXKc8CbVJlAwmEXnPmtLnmicEJ0bfA2fuMfI6QOFYuwsF9Dcrh1U9eJ463ktq4+/xaZ12I9OluU8mSQeQFnl5u+nXRbB24okXu/IVJ+bWVY5eCAFF94bj5QLmf6jwW1itCcM5vBS2lS4C3aPT2JW8SWJM2lBbPiYDjIWgt8bO79XHuyLcCdk4f7nuCoPCDg4ieg3bndnvwpw8L5TzeT8rfcw647HmOcf1xenLsd4stsU82Q1g86mTDOySMhda0QgR6wNuJs1EoIr8R/+1/rboBm8QalpMS3OSH/N8a4rc3ACY/gdIiJ4/12gJA0LisZyafZ21nahpTQ+N5wj71Ssk+yTw4B+iFOkJ8IpoCmxfo/YnCrFaxBiNF0PdLs08P9epZ9DWDrQYS5xl6GSsYmNbk8FE3s33ecUYXR4Nqxt/dDyOy2E8g8l0LtR4ukChDUl9PnZBIw9PvBxJUYylGvU7+A3LpuLPSjzwOC11Ek6uFbLtDC5C06FhOamxCjCnCiHhbm/6tWqFkqNsU69k68fuFjcJZZGrgH0+qLD6FJVDdMKfmaQw2aY7maOOs5dYXO1gElI9oMn37urtK9J+EJ0/kTb2Wl1e5EO9QtIbrj415Hi9+go5MWj86LzzU1aa2UdRIa55LjJR1lHYSI1cyg+oUBuwhqpe2q9Ai/YSpnrf9yXBkD0/VuhfBYu20xUocridrB/v/iDLeHjAayjDLCtmlFBnpT6GzM1qhZ+d0f3UZLfLEdE+19ckiC/oQ09eS1eE7K2kC7XsanyhZeinJtrFLL8gplLPUUfnZRvUwmqlsIUq1rNR/dCHiNdTYnivXZ1sReRN6YV6buIByZkP47FxVrtj/X5VrJUk5kn21oFHVN7ciEno9oQW74mFTML9wBwgy4QVB9UoyYI3SgWulbLgKnnPVwArtKn5/LqqOg2Lgp9h9tbUlzOJ3vnXlinBMQ68mNL7ldS3xKxVFRXCTe+e9A7Mu+kUSo3KuzEKkvjLG9y358sOp7yTlOI1L78ugJtZhoYs+yPJsDMQ4W8vPhC+ccvuT4HNhvDPjwZb98ZuYyqwo47Ul/WL/ZVePJRPKFk9OckECrGh2e35dG7wccLzJWheqeIRvy0SkGSyBvAbBPK6Z0KewMCm38iPEc6y3VEU75PEBSlZbU4Q7OvmRbZ24ceqv5bB/uXi+89hHBISVfkacozuMmTWCgsK5HqwdGzRW1g6EeSSfmP/pX2/DfMwumWWhLfCQ0CBbhLPL/2BVEzeUuw8mkOfex1mzcPeeEPGi6i37AQCVkHk5b2kc6E2NGO3wcI/eECA3kGrQ/WzTTsy02FJhnTr+klKCDdsOsrEZMAwCa1O9BYWUxwwvhCrjqZmSViKKYIlc7Nb0oX4RlKKcnla5AT5tYf/7CVy7dNje1B9oGJZSL0hkKmm0lbO/0z5/Zsxfsje0UwuCqJZ5FShrMM=,iv:4TEnsQAMYuk8x4EYkT+i1ibsIovbt6pzYGv685SKBjI=,tag:JV4R9kOnAYefNjDiXNUzdA==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBFMkRmY0dVcWVieEg5QWNw - MVRxMXVjZXBqTnQ4bmNEK1FBSTdZckdJZWhzCmk4ZFhrUUJVYXU0V2V1MmdPVDIz - LzlBSHFrR0xIVFlMblNHN3EyZ2lHNWsKLS0tIFZPNVVDUUFzclRXYUwrdnVuUTJW - MS9KVmtwczR3R3luU3pzaExXdEVMck0KBDEHK2xu5xnaIuX3vxJV5kUVJvtdWXbs - UU1xOdXor67vnppQuydXjmS4KHj9sUuv7ZieJdb6ncnuNxClizlWYA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:54:52Z" - mac: ENC[AES256_GCM,data:1PBjo1rCAAwV5kAyPKlShj0EdTdKk12vzY+iUS1Q6unU8pnz5ZyTmOFWsjyK04ebXUiH2depYv5TJzldJSwHRhwG7cEa7TFvKPp9N0vlof9VF9/zmQORmxaoPwndIQljdap8oQylJ7BW2FNTb8AK4mouPxEmqZ1NkAaP924Y4ek=,iv:4nL1hsl2WegABKiSfIu0cFUzumRPrnbPOlBk9TkRK/M=,tag:jjho2ug9TkAR2xuuMBHFdQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/google-gcr/.gitignore b/pkg/alpha.dagger.io/.dagger/env/google-gcr/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-gcr/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/google-gcr/values.yaml b/pkg/alpha.dagger.io/.dagger/env/google-gcr/values.yaml deleted file mode 100644 index 15ffb894..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-gcr/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ -plan: - package: ./gcp/gcr/tests -name: google-gcr -inputs: - TestConfig.gcpConfig.project: - text: dagger-ci - TestConfig.gcpConfig.region: - text: us-west2-a - TestConfig.gcpConfig.serviceKey: - secret: ENC[AES256_GCM,data:UEKTXvyrBgHKOYE9vSGoHua9wWALjghxWu+ui9K3MAS+1mnVlc1qjTbwv/1/hIIkRNlyhY6WlN0k3x2imusFFInzrNZ5G4FJHGiP/zaazd7shUS8LZsh1cL0I1jnsaDJaz4Zw0yVu+FT1z2/+9l81U9MrtvbLNKFSqZJsrymZl5lUCxiRsUEBiC0/rOoOlQ88kfnxUdBXnG7ABciqPUK7cYaMo5RbB1a9YfacB8S2sosClxK727jUgD20I12ru+y5Y/hg00BhBl9bIg35VTI8PFeZvRqQowqaJO+i1BjQbBYef8s9faYdZGEP0hUrvUpPek4Z0ZBDRbxRfRFAiXBbWbvCJErGlsmcNGqllixgDbcYQNKBTjZEKke4PGHtahmPXOIOO9/fxnUCoci//azJ5fUP0Kdiw06DQYQnngwRSA/nOqTBiuWcfiTLY00iQxoh+8Mt5/CMTXhRz8PpRpvXtKLe4ogaVbEBMOXe8+nMtwt0H6kV+YmHgA+vVHw0WYtBF6gmKnXuGWT/dz94SHGe9oMiK7H7KtfRCyN1SBAx3H9R3qitt9114TlWRBvfrVtDsb/E0MQdnbXZQirJ/2ev78DTc5bdRTFus2vvHZB2RP+wr7sB8A+jcWS1RBv0NJOZoPlHqKIfB93NBhI8wU+lqEbTn2Zm0LAvGVypws3ci+0GJFReIok9yGc/WucFBDMWi8tDOwUdbreX7EpdGLSn9Rwq0Oeuo5Udy5Qo4xFAC/v2yCzqb7MrZzX1S+OHyNObUTGuEyTOL8t91KYBebHtLK0Ud9qQoYuO5IvYCGeKIHr5FDFCYKDJAlW8Y9Iw27LsU45rqeHTjUi1BqOLfXZbns79w8WYiz5bqc3eMXmYOgCKtU5BwLo9LV7WR+FW8cCi9gSJHnRbc8uT9V1NWaGeoKuaPXpBWLH/GTKXEKuy1HXz+yPgQsYYN2yrGNgmgXpKbxgp92h6LRA/PRjxrjkAV8kVdivxG3GUFVfq4ZtGlLdRrcYCkDIZVpwPrNp8Qg5NLn5xhWj1hsqqOOJdeDHHLkS48A9pLAhPubRWH0s1IixLstnJ95DGIZDE0QpEh7STctqvS7SVhclroKI5xzT7w3C78fxTKC//JkdrV0/rQ2CQ1u+emaCUt3X1WwYofudoMjp5iESscDvw6PnqzubUT51FwGtAf2hkT07VQWZ2CcNP4dvYgDSsc26Y0hwWdr+ppCy1xbmpENU5moUPELtF9w2da1zG5N32Fcxr9VOqOGwa4pqkasIQPCRdqsEa/34g95L7Z1BAXpMxCLTbW5nxD3wQBsrsTjO0rmBh4n9BdKjqj5GrXOTceAaJ+L3o07aVIzICJ5HGo7GQXjaQOABzysbGr7bdBIQyp//ruqXNLVSaylIunZJY4/HFdqetZj6jfb4rE+/GkjFLw23Ym8RIDYJQsTAR8OdwZNtVPrILdve1ohlyBW/nS+gy5dZ3qHnE9ZxbgN6FpRYr9G4acK3yCyMeuBdiB6Tqz0o6xz/c2WLWpWcw/HivVce53MfbqMhj0K/jjpl+fsJT/+ZkaPviDrOtKR/WPz/ewNwQ7pZgCubtlzCmPw8pBKjP+uI9tvwydgnV8I/LdEvS0IrP9m22kPZiw/m7mPQPkDA7IzQSIlrmWMCt/iJ0rvVEtkyi1pPyzVVby4OyzvyhexVcFu2X1x5jOqfUL3eEjO+IhMJufVCOVlUKNHPci0r4KQZ07n1wPCjUoCN4MMl9D8yaP0l8SQmSmp9/DFVZ1Cd5m+O0cmaQfZX8dYV52uxkPnkRNn9SnKCz5Nf8tBG8p+kvznEYw6d4UKQLocFdzeBU6FBa4zQSf+oXHghds9YGJoWNAGzD9ucgVNyu4hU2rq7UDnAwT/pm8FTbw/OM2uCyPr80J3CpgKPdA0+jEvBNxlezsZeLyTntoZLIstgllETxC9QjqfCVtnQYBYT8oFCXZPadyBZPPVrXvQORCpRXJCQ9iyoiKTQCCOGqGyIgC+23Q0ebmZPr7e4I5JbBZWeh6ek2RRWOZMI0lkLeE72KO+9h8HPxmgMhPtDes/l6DmWjAPb6IwZSM9SseTYF447HL5rQKkv4x7W4Cu1pACSc/2qqdUwnC6jydk8EY2zPa9kdguwdSiDr+KwASZex2MKMJa+peXhTDLqB7jxiO7snU4r0nk7E0B3IBqWM89PVskyNTJXqTkAXyzHWag1S8URPhk9Q9UYpyVCWRzs4nfXAX2WgCJl9iw8ZXrIJZ3fGs3vXQMYI/kGJ7rGIDWhcQEDJGKJYrBCh6zNsbSzBagd5AQ6DNIUEvTUcPvxZP6sy+uiiMMqErDgbi2IT3G6E5sEL0sO7GtrVWoxDQWXX80vtf146fnNNp4uS2wGta7b4kguAt39olceX7nUrYgzLm1aXcr0ObbRjcPdeSlNGLTJGlZRNtvTlFdT1RgTQBfRdG3d1JCraCGsAWxBC+Bwa/zAcdIwUNnMfgdZ5eOAyiBTmoGAAOkUr7avSVvP5Xyrk9JlNzeArrjZUFMYOcXBfkMquqD1NoPHUZ12u9jCoj109zJquxcJ1zGT5TylJYSTc9xz46TfLrz5KvsMhfetBx0ocY8lXjbs3pzB6ZswDGzF4j0eiWBfu9UZoiQVtt1eIfAPoZO9u/n2Wbpx+ov+mJFf0dZklKDED5CUbmj8/izOdE9KbiPDFr1nZZQbO+YwJYhjxxqxzwC41CvH5XQTCCadeWgb5cHEwwunFRVCYeEFvTlP6nR9pS19UZoQvPNk5NEnZVKxWVD1lK18frvX8MxIpB2xaSbUkvGi3tueinLa7OYVfjirBJ1GYbuADa4H0KOxi4MP59ah6TOmsZstA6plFbtRRtk4Iofzu1mAyUN52SZzwCvH5/IxOh6vQxg7EcMfB8O5+S87PeE3vd1ch+UVDwQ3fvNmjd7/77XdKZiR7bwiDxodxABpG4iYrxcfkGPOTCKUlisgFNNmSmwG7FJMYWkz3RcEHib/biklnEKbm/9G5000cwZXXglZb8QjleSklkSEZa4DYec1SNvD/KwRbk5lYr03TDl7DrZo3WjKWvWGMUs3,iv:tPbOGayR7NiXcuHWjX0pX/nSitOxmsr4qqrc6irlIJI=,tag:apejA4UTYTuwT4CUSeoaRQ==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCRThSTEE1Rm5HU2Y2NkJZ - SEd2blAyeEVnMHBqRGxXMEQ3TGFzWTBwd1EwCnA0OFVmTCsxSmpNV29adGt2ZHFH - WE9vN1ZoNENFV2t1TGVuZkdwVndNbVUKLS0tIGpHZEptYWxEZVNjcXF4NkoyWHRv - ZXd6Qmd1YUtxMnVTVkYybWgrV3pVK2MKowMeOZU3j3BxERT0DwhQYCGUDBK6gCdo - WByubiBATdsb7h7ytCC4HutWppynK4MpU+Ya9NP83AZuXo+Wa2u6aQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:55:02Z" - mac: ENC[AES256_GCM,data:SheT5yogmuGBmgFxuu80oDR0tZmasjzEogTjqN+LWE1A9PNPgHVhT84Y7rs82B9h6vRctwCKkRkk1FQckqzprd0eI9Q7kFtpobxzET3hp44DWVsmb/NXnlfiGMtjhnsKdRwD8uQx2Vs/gqrdAyVBXoveLT/pKt+y3GKLJiZfx0g=,iv:CcLV6Kst7F0XfBicWQmm9o099zvbS9g8dpcbyCsIn+k=,tag:wp2uU4XpcvsIM6EtvEDvLA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/google-gcs/.gitignore b/pkg/alpha.dagger.io/.dagger/env/google-gcs/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-gcs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/google-gcs/values.yaml b/pkg/alpha.dagger.io/.dagger/env/google-gcs/values.yaml deleted file mode 100644 index c0c2693a..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-gcs/values.yaml +++ /dev/null @@ -1,35 +0,0 @@ -plan: - package: ./gcp/gcs/tests -name: google-gcs -inputs: - TestConfig.bucket: - text: dagger-ci - TestConfig.gcpConfig.project: - text: dagger-ci - TestConfig.gcpConfig.region: - text: us-west2-a - TestConfig.gcpConfig.serviceKey: - secret: ENC[AES256_GCM,data:UEKTXvyrBgHKOYE9vSGoHua9wWALjghxWu+ui9K3MAS+1mnVlc1qjTbwv/1/hIIkRNlyhY6WlN0k3x2imusFFInzrNZ5G4FJHGiP/zaazd7shUS8LZsh1cL0I1jnsaDJaz4Zw0yVu+FT1z2/+9l81U9MrtvbLNKFSqZJsrymZl5lUCxiRsUEBiC0/rOoOlQ88kfnxUdBXnG7ABciqPUK7cYaMo5RbB1a9YfacB8S2sosClxK727jUgD20I12ru+y5Y/hg00BhBl9bIg35VTI8PFeZvRqQowqaJO+i1BjQbBYef8s9faYdZGEP0hUrvUpPek4Z0ZBDRbxRfRFAiXBbWbvCJErGlsmcNGqllixgDbcYQNKBTjZEKke4PGHtahmPXOIOO9/fxnUCoci//azJ5fUP0Kdiw06DQYQnngwRSA/nOqTBiuWcfiTLY00iQxoh+8Mt5/CMTXhRz8PpRpvXtKLe4ogaVbEBMOXe8+nMtwt0H6kV+YmHgA+vVHw0WYtBF6gmKnXuGWT/dz94SHGe9oMiK7H7KtfRCyN1SBAx3H9R3qitt9114TlWRBvfrVtDsb/E0MQdnbXZQirJ/2ev78DTc5bdRTFus2vvHZB2RP+wr7sB8A+jcWS1RBv0NJOZoPlHqKIfB93NBhI8wU+lqEbTn2Zm0LAvGVypws3ci+0GJFReIok9yGc/WucFBDMWi8tDOwUdbreX7EpdGLSn9Rwq0Oeuo5Udy5Qo4xFAC/v2yCzqb7MrZzX1S+OHyNObUTGuEyTOL8t91KYBebHtLK0Ud9qQoYuO5IvYCGeKIHr5FDFCYKDJAlW8Y9Iw27LsU45rqeHTjUi1BqOLfXZbns79w8WYiz5bqc3eMXmYOgCKtU5BwLo9LV7WR+FW8cCi9gSJHnRbc8uT9V1NWaGeoKuaPXpBWLH/GTKXEKuy1HXz+yPgQsYYN2yrGNgmgXpKbxgp92h6LRA/PRjxrjkAV8kVdivxG3GUFVfq4ZtGlLdRrcYCkDIZVpwPrNp8Qg5NLn5xhWj1hsqqOOJdeDHHLkS48A9pLAhPubRWH0s1IixLstnJ95DGIZDE0QpEh7STctqvS7SVhclroKI5xzT7w3C78fxTKC//JkdrV0/rQ2CQ1u+emaCUt3X1WwYofudoMjp5iESscDvw6PnqzubUT51FwGtAf2hkT07VQWZ2CcNP4dvYgDSsc26Y0hwWdr+ppCy1xbmpENU5moUPELtF9w2da1zG5N32Fcxr9VOqOGwa4pqkasIQPCRdqsEa/34g95L7Z1BAXpMxCLTbW5nxD3wQBsrsTjO0rmBh4n9BdKjqj5GrXOTceAaJ+L3o07aVIzICJ5HGo7GQXjaQOABzysbGr7bdBIQyp//ruqXNLVSaylIunZJY4/HFdqetZj6jfb4rE+/GkjFLw23Ym8RIDYJQsTAR8OdwZNtVPrILdve1ohlyBW/nS+gy5dZ3qHnE9ZxbgN6FpRYr9G4acK3yCyMeuBdiB6Tqz0o6xz/c2WLWpWcw/HivVce53MfbqMhj0K/jjpl+fsJT/+ZkaPviDrOtKR/WPz/ewNwQ7pZgCubtlzCmPw8pBKjP+uI9tvwydgnV8I/LdEvS0IrP9m22kPZiw/m7mPQPkDA7IzQSIlrmWMCt/iJ0rvVEtkyi1pPyzVVby4OyzvyhexVcFu2X1x5jOqfUL3eEjO+IhMJufVCOVlUKNHPci0r4KQZ07n1wPCjUoCN4MMl9D8yaP0l8SQmSmp9/DFVZ1Cd5m+O0cmaQfZX8dYV52uxkPnkRNn9SnKCz5Nf8tBG8p+kvznEYw6d4UKQLocFdzeBU6FBa4zQSf+oXHghds9YGJoWNAGzD9ucgVNyu4hU2rq7UDnAwT/pm8FTbw/OM2uCyPr80J3CpgKPdA0+jEvBNxlezsZeLyTntoZLIstgllETxC9QjqfCVtnQYBYT8oFCXZPadyBZPPVrXvQORCpRXJCQ9iyoiKTQCCOGqGyIgC+23Q0ebmZPr7e4I5JbBZWeh6ek2RRWOZMI0lkLeE72KO+9h8HPxmgMhPtDes/l6DmWjAPb6IwZSM9SseTYF447HL5rQKkv4x7W4Cu1pACSc/2qqdUwnC6jydk8EY2zPa9kdguwdSiDr+KwASZex2MKMJa+peXhTDLqB7jxiO7snU4r0nk7E0B3IBqWM89PVskyNTJXqTkAXyzHWag1S8URPhk9Q9UYpyVCWRzs4nfXAX2WgCJl9iw8ZXrIJZ3fGs3vXQMYI/kGJ7rGIDWhcQEDJGKJYrBCh6zNsbSzBagd5AQ6DNIUEvTUcPvxZP6sy+uiiMMqErDgbi2IT3G6E5sEL0sO7GtrVWoxDQWXX80vtf146fnNNp4uS2wGta7b4kguAt39olceX7nUrYgzLm1aXcr0ObbRjcPdeSlNGLTJGlZRNtvTlFdT1RgTQBfRdG3d1JCraCGsAWxBC+Bwa/zAcdIwUNnMfgdZ5eOAyiBTmoGAAOkUr7avSVvP5Xyrk9JlNzeArrjZUFMYOcXBfkMquqD1NoPHUZ12u9jCoj109zJquxcJ1zGT5TylJYSTc9xz46TfLrz5KvsMhfetBx0ocY8lXjbs3pzB6ZswDGzF4j0eiWBfu9UZoiQVtt1eIfAPoZO9u/n2Wbpx+ov+mJFf0dZklKDED5CUbmj8/izOdE9KbiPDFr1nZZQbO+YwJYhjxxqxzwC41CvH5XQTCCadeWgb5cHEwwunFRVCYeEFvTlP6nR9pS19UZoQvPNk5NEnZVKxWVD1lK18frvX8MxIpB2xaSbUkvGi3tueinLa7OYVfjirBJ1GYbuADa4H0KOxi4MP59ah6TOmsZstA6plFbtRRtk4Iofzu1mAyUN52SZzwCvH5/IxOh6vQxg7EcMfB8O5+S87PeE3vd1ch+UVDwQ3fvNmjd7/77XdKZiR7bwiDxodxABpG4iYrxcfkGPOTCKUlisgFNNmSmwG7FJMYWkz3RcEHib/biklnEKbm/9G5000cwZXXglZb8QjleSklkSEZa4DYec1SNvD/KwRbk5lYr03TDl7DrZo3WjKWvWGMUs3,iv:tPbOGayR7NiXcuHWjX0pX/nSitOxmsr4qqrc6irlIJI=,tag:apejA4UTYTuwT4CUSeoaRQ==,type:str] - TestDirectory: - dir: - path: ./gcp/gcs/tests/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCRThSTEE1Rm5HU2Y2NkJZ - SEd2blAyeEVnMHBqRGxXMEQ3TGFzWTBwd1EwCnA0OFVmTCsxSmpNV29adGt2ZHFH - WE9vN1ZoNENFV2t1TGVuZkdwVndNbVUKLS0tIGpHZEptYWxEZVNjcXF4NkoyWHRv - ZXd6Qmd1YUtxMnVTVkYybWgrV3pVK2MKowMeOZU3j3BxERT0DwhQYCGUDBK6gCdo - WByubiBATdsb7h7ytCC4HutWppynK4MpU+Ya9NP83AZuXo+Wa2u6aQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:55:16Z" - mac: ENC[AES256_GCM,data:Ae/YtA7Ruh5sXEqR0dRh9zUcMzpaA4MC4b2WBhjmoP/Wgs/EEjF++rGbNV0l+j6ZySjmbnBdcCqZ+2wtBYxcLJLzd86ZF333SD6FygxkUwH7NyoulSQ9ucu+nEDT96xUDy63LxMFnUNYSzAWe4i9yQ/xEgXnFaPDyZsq6cCtThA=,iv:79fmVrapJJzFMI8FT+S2TLrjMtzutErFajV702+5K7Q=,tag:tR8SghnPp3J7QBCBSFlNfQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/google-gke/.gitignore b/pkg/alpha.dagger.io/.dagger/env/google-gke/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-gke/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/google-gke/values.yaml b/pkg/alpha.dagger.io/.dagger/env/google-gke/values.yaml deleted file mode 100644 index b023b699..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-gke/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ -plan: - package: ./gcp/gke/tests -name: google-gke -inputs: - TestConfig.gcpConfig.project: - text: dagger-ci - TestConfig.gcpConfig.serviceKey: - secret: ENC[AES256_GCM,data:UEKTXvyrBgHKOYE9vSGoHua9wWALjghxWu+ui9K3MAS+1mnVlc1qjTbwv/1/hIIkRNlyhY6WlN0k3x2imusFFInzrNZ5G4FJHGiP/zaazd7shUS8LZsh1cL0I1jnsaDJaz4Zw0yVu+FT1z2/+9l81U9MrtvbLNKFSqZJsrymZl5lUCxiRsUEBiC0/rOoOlQ88kfnxUdBXnG7ABciqPUK7cYaMo5RbB1a9YfacB8S2sosClxK727jUgD20I12ru+y5Y/hg00BhBl9bIg35VTI8PFeZvRqQowqaJO+i1BjQbBYef8s9faYdZGEP0hUrvUpPek4Z0ZBDRbxRfRFAiXBbWbvCJErGlsmcNGqllixgDbcYQNKBTjZEKke4PGHtahmPXOIOO9/fxnUCoci//azJ5fUP0Kdiw06DQYQnngwRSA/nOqTBiuWcfiTLY00iQxoh+8Mt5/CMTXhRz8PpRpvXtKLe4ogaVbEBMOXe8+nMtwt0H6kV+YmHgA+vVHw0WYtBF6gmKnXuGWT/dz94SHGe9oMiK7H7KtfRCyN1SBAx3H9R3qitt9114TlWRBvfrVtDsb/E0MQdnbXZQirJ/2ev78DTc5bdRTFus2vvHZB2RP+wr7sB8A+jcWS1RBv0NJOZoPlHqKIfB93NBhI8wU+lqEbTn2Zm0LAvGVypws3ci+0GJFReIok9yGc/WucFBDMWi8tDOwUdbreX7EpdGLSn9Rwq0Oeuo5Udy5Qo4xFAC/v2yCzqb7MrZzX1S+OHyNObUTGuEyTOL8t91KYBebHtLK0Ud9qQoYuO5IvYCGeKIHr5FDFCYKDJAlW8Y9Iw27LsU45rqeHTjUi1BqOLfXZbns79w8WYiz5bqc3eMXmYOgCKtU5BwLo9LV7WR+FW8cCi9gSJHnRbc8uT9V1NWaGeoKuaPXpBWLH/GTKXEKuy1HXz+yPgQsYYN2yrGNgmgXpKbxgp92h6LRA/PRjxrjkAV8kVdivxG3GUFVfq4ZtGlLdRrcYCkDIZVpwPrNp8Qg5NLn5xhWj1hsqqOOJdeDHHLkS48A9pLAhPubRWH0s1IixLstnJ95DGIZDE0QpEh7STctqvS7SVhclroKI5xzT7w3C78fxTKC//JkdrV0/rQ2CQ1u+emaCUt3X1WwYofudoMjp5iESscDvw6PnqzubUT51FwGtAf2hkT07VQWZ2CcNP4dvYgDSsc26Y0hwWdr+ppCy1xbmpENU5moUPELtF9w2da1zG5N32Fcxr9VOqOGwa4pqkasIQPCRdqsEa/34g95L7Z1BAXpMxCLTbW5nxD3wQBsrsTjO0rmBh4n9BdKjqj5GrXOTceAaJ+L3o07aVIzICJ5HGo7GQXjaQOABzysbGr7bdBIQyp//ruqXNLVSaylIunZJY4/HFdqetZj6jfb4rE+/GkjFLw23Ym8RIDYJQsTAR8OdwZNtVPrILdve1ohlyBW/nS+gy5dZ3qHnE9ZxbgN6FpRYr9G4acK3yCyMeuBdiB6Tqz0o6xz/c2WLWpWcw/HivVce53MfbqMhj0K/jjpl+fsJT/+ZkaPviDrOtKR/WPz/ewNwQ7pZgCubtlzCmPw8pBKjP+uI9tvwydgnV8I/LdEvS0IrP9m22kPZiw/m7mPQPkDA7IzQSIlrmWMCt/iJ0rvVEtkyi1pPyzVVby4OyzvyhexVcFu2X1x5jOqfUL3eEjO+IhMJufVCOVlUKNHPci0r4KQZ07n1wPCjUoCN4MMl9D8yaP0l8SQmSmp9/DFVZ1Cd5m+O0cmaQfZX8dYV52uxkPnkRNn9SnKCz5Nf8tBG8p+kvznEYw6d4UKQLocFdzeBU6FBa4zQSf+oXHghds9YGJoWNAGzD9ucgVNyu4hU2rq7UDnAwT/pm8FTbw/OM2uCyPr80J3CpgKPdA0+jEvBNxlezsZeLyTntoZLIstgllETxC9QjqfCVtnQYBYT8oFCXZPadyBZPPVrXvQORCpRXJCQ9iyoiKTQCCOGqGyIgC+23Q0ebmZPr7e4I5JbBZWeh6ek2RRWOZMI0lkLeE72KO+9h8HPxmgMhPtDes/l6DmWjAPb6IwZSM9SseTYF447HL5rQKkv4x7W4Cu1pACSc/2qqdUwnC6jydk8EY2zPa9kdguwdSiDr+KwASZex2MKMJa+peXhTDLqB7jxiO7snU4r0nk7E0B3IBqWM89PVskyNTJXqTkAXyzHWag1S8URPhk9Q9UYpyVCWRzs4nfXAX2WgCJl9iw8ZXrIJZ3fGs3vXQMYI/kGJ7rGIDWhcQEDJGKJYrBCh6zNsbSzBagd5AQ6DNIUEvTUcPvxZP6sy+uiiMMqErDgbi2IT3G6E5sEL0sO7GtrVWoxDQWXX80vtf146fnNNp4uS2wGta7b4kguAt39olceX7nUrYgzLm1aXcr0ObbRjcPdeSlNGLTJGlZRNtvTlFdT1RgTQBfRdG3d1JCraCGsAWxBC+Bwa/zAcdIwUNnMfgdZ5eOAyiBTmoGAAOkUr7avSVvP5Xyrk9JlNzeArrjZUFMYOcXBfkMquqD1NoPHUZ12u9jCoj109zJquxcJ1zGT5TylJYSTc9xz46TfLrz5KvsMhfetBx0ocY8lXjbs3pzB6ZswDGzF4j0eiWBfu9UZoiQVtt1eIfAPoZO9u/n2Wbpx+ov+mJFf0dZklKDED5CUbmj8/izOdE9KbiPDFr1nZZQbO+YwJYhjxxqxzwC41CvH5XQTCCadeWgb5cHEwwunFRVCYeEFvTlP6nR9pS19UZoQvPNk5NEnZVKxWVD1lK18frvX8MxIpB2xaSbUkvGi3tueinLa7OYVfjirBJ1GYbuADa4H0KOxi4MP59ah6TOmsZstA6plFbtRRtk4Iofzu1mAyUN52SZzwCvH5/IxOh6vQxg7EcMfB8O5+S87PeE3vd1ch+UVDwQ3fvNmjd7/77XdKZiR7bwiDxodxABpG4iYrxcfkGPOTCKUlisgFNNmSmwG7FJMYWkz3RcEHib/biklnEKbm/9G5000cwZXXglZb8QjleSklkSEZa4DYec1SNvD/KwRbk5lYr03TDl7DrZo3WjKWvWGMUs3,iv:tPbOGayR7NiXcuHWjX0pX/nSitOxmsr4qqrc6irlIJI=,tag:apejA4UTYTuwT4CUSeoaRQ==,type:str] - TestConfig.gcpConfig.zone: - text: us-west2-a -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCRThSTEE1Rm5HU2Y2NkJZ - SEd2blAyeEVnMHBqRGxXMEQ3TGFzWTBwd1EwCnA0OFVmTCsxSmpNV29adGt2ZHFH - WE9vN1ZoNENFV2t1TGVuZkdwVndNbVUKLS0tIGpHZEptYWxEZVNjcXF4NkoyWHRv - ZXd6Qmd1YUtxMnVTVkYybWgrV3pVK2MKowMeOZU3j3BxERT0DwhQYCGUDBK6gCdo - WByubiBATdsb7h7ytCC4HutWppynK4MpU+Ya9NP83AZuXo+Wa2u6aQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-09-14T09:13:06Z" - mac: ENC[AES256_GCM,data:8niBQ2za+ig2qm+V35pnAqqgAqoafBLxd62ZEwTrVfQz8gg28YCUMGIWD0/tT/KiFhBYDZ07T61D6uQVJuUANc2adDo6xx/jJ3Q3si4HJLScLzzPWTdVhc++tbXAGnBVXOxJNjKw6zbTK+cY8E1aLWpWJ+jLNgCpg/UCyZhetNU=,iv:dS1xMRHEdvFlJaIUFHdDVyE1d7UyN8hVFe8CtVV8PkE=,tag:lYmVhDbGo6Klne5mWcryLA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/google-secretmanager/.gitignore b/pkg/alpha.dagger.io/.dagger/env/google-secretmanager/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-secretmanager/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/google-secretmanager/values.yaml b/pkg/alpha.dagger.io/.dagger/env/google-secretmanager/values.yaml deleted file mode 100644 index adc10201..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/google-secretmanager/values.yaml +++ /dev/null @@ -1,32 +0,0 @@ -plan: - package: ./gcp/secretmanager/tests -name: google-secretmanager -inputs: - TestConfig.gcpConfig.project: - text: dagger-ci - TestConfig.gcpConfig.region: - text: us-west2 - TestConfig.gcpConfig.serviceKey: - secret: ENC[AES256_GCM,data:fQKVyu3dOiRz7Ubnosa8agcKs+juarkz/RWe7puRxag1VDJTi6xU5tf6crFkzI6DvGSKe5ipe8wc1Qw+v50I3ETHkZ2XxdM2AdhfAT/zULEX5r4czv1Z/Z+oDLuZwwfRZ7KhPArYaAkFLPSQ1fCjuXfVUwmHPpbUDO7t+NgkifHQ4MIZLGl07imbjNVHUW7TknsZmgO76AcGk7RYd+ky1YCDd8NYDr+X0WznF+LPuAEBDDpJUDGRoUpXZwgXp7JjzzheNosqFUHIO460yK1M2EGMHfm7TDcgF35C7SvUWfyl3njKnyxqlKxq7UQ/Yqhv5IuL0kuMBhsptyp8aqY12hroq89DfQu2BUHXJlTMNroDfh5EsMCihpeb7uflkNkLizEKEg9mMeRHJxtAr/dESDeHvFB4g0UNoZiXwVoWDpJbleShj5VNSqYUesoHWLHnB7ssprsMisXu3zaZ9STt4U8Q33YVAsfAdsUAF2QEAIIIzSgUxyC54VIdiIHXFrdkXrppaoU/eWVeakko5TXTJkWCrITB8gtMnglDN4qjIZjQ7Njln7fJFiJBgz9odzksjpvOgsVa0I//EV7OHWOJ4oO7fHqmg6AkfN9BxfboBQtPLW5TM08OqSbZkFcOFTImh+s0ZsrwMvHTL3FSISiw7vUsfXgfRbxtLKOX7tTy62E3BTGtWxszSNTvObMFPkzYm18InhNafq8POcxVWckWjJXl2WmKHNburSCnQgey4U6YoWon9hAzcK+8DTNXIQsN10H70IxpuQm/ANxemSPfzLFGzmZlL0/ZHO6RiwjYYXpiJ5YO/e7sZAL2C9DimdY/ZfBqGrTt6XmZ7iBWVhFjETL3+W+ere3bD1X1pO0WIg/l94GcLLjUOLMBj6HzoXrATJObW81IKeLeKQfTG5AF1qWIJJPVKSZKUlr2yP6DtqMANcQTeRQ9kqjfMw6vJ4ZkZlEHboV/3qrcYfjYAqx7Q/fV1+++RFXKXhWdwIyHl5HSeSkaWEcePDgSNoL5oEwBmhyKXmh8QAEl25VRJYQJpvPOJcYCwDAbJcua72R9LEGQy/cxx/Z5E2rLkCYknZaklpjKQintDnenogBvLjzJWHg9JLHIql+4lGmTst8526loF3hDeZlYLT/iL+JAgIZGAZ2OC5bHonUhBd0QNj1f7pDxZyYxotSIKH06FVaMcFhJkyP4E4/oaqzvjEXwzYHLsdTEp05HtJb5hohoB41IP5ck8Sz+jBDgUCsIYvRXc3HBRyyMz4Ptvov72YBolZSggUCtRbluwqxVc1EPLAy3gPcxW7ig077/FXvk+KLp+sjikzNnFLg2RICD2n58Avyu+vzgqucOCuR3eF8Ir4pUrpubum3UNnnWM0X9L6K4nrvk2gmk9awj1RJSRxxwp7NviUlQjcbZF1cCxJESff1VkK1InkEDUvPGnq1WO0MW36DUcecE+ME+fVcT7/KyDpP4xtRXkpaJM4KuhNZnWOvqm5njZ3u4I6FnGAKs9vI5qDQ3PVhxeLb1qK5koPHLQlR/LZX/w297LaCX51SBr7Pajd8y7r6ATJJ3wN5Vl4vDyivarf2EteVXiGlAs4YRQXjWUlHV74Wol9LEc1jMa24Lf2WaGG1dS1EH5HsoeOzDdjaz4TXjIIC7BrXgs/tRsnQINKv6qGrB3izBvR5a5z5He6RZA8eMVIXMtwLqOzbPWFjaXm4TYVq89JSMclz75q7KjCrji2zuE+4ImLQntm6Dib+piytCRiXWF8rkEMRyzcrz9MzjoK/pdFSfD7BFtOwJd6Jk0jd4JVzBUsaKcVMU41WNCBM7sfeIEtoFdyv+osgQsJGoB0zDeYj9sO/AdIJIUy8wJyH1+JOpI/+hLrVJUSFQ6ZPSquMaN/TRNcxiSvBNqP36uoB0ffVAfQ4JVc+2XEU88KzPYbX6Rw9ftK78kXDM7aYQ77OUpexx096OCX6GGRX5XdiMwepfMeRzvhpioXfHQk/djtPvrfTFtsU6Npy/rbcLqCpW8MWCZ4efx/Cu8qefB7Gj6h4GUk72e6lsp3+AIq/Y4mdi0v2uZlHJZj2c7D+hboey/YbO6nHM9KbUpjgZ+AyTziBk3IYbiAmN5km8z9jKL4OiHtx7Vyildv0HEmGl1CVkJQJ2s7SLgVKmeOscqvJ1Xd3FiY78nyyTlPPAha6K9nbdTog2qiROYgwjz1dAN17+c4/VxLHNbvPijsMtYLb3yckE0E25sQvVN7cu4yncnSU0fC+7BDhyOChl7zGlgb9YWWU5bFn8pQGWo7MeIHHI6PZfDqHKE+23d19Z5uBNGe5EOfTogt75GBtqylfb+fEOiitzaQnkVxj7JdkjKVPKYF3XqOneLkfdUVAFGslByii6Tpi1QEYyYAKvlgRu2IWrazJVniYm/Sl80xEgwF17gFREGh97HcmCQh4801fbT5H+RPXDEkkcm28nuNduNiVqKhnf/adJWwaav0gPOgcS6V0DPFtP/zErC/WNRebJMbn4BJE6aVLPRR2z87iTG4o7+7XDAq0b57vTfHxdihDD0wyQRS/VRy3tb3VX7B6GQwDO0akGUdPUucuCK/fjbXiUPwh6ZF6u9zr/oNCj+FjseOAklMKmfprQDcAohr2lDvjilvanUfZyizB1ugcV3DxB6MJjgUJ+4vCncxNylv3dNXdA67uiFkeXfcNTzy2caRHTEA8p2OReNmKGK5Gk41Zk7M15RvN18YXCvL2haDjEn4LOletqv/QXbWGzfNWH7uSoBMukFE08e+yFWw9jKiO9DIeF67O+y6PUSk9JVH/YnAiyscN4YzwfFGm0A8rQdkKcA3MABbCMF4bR/j/FvprwBAs4Fnv/y7sAq1qMDgOTdEJsGNMw6VgvtkwhL47ZuE1lYLQPHlzitqjy2Mbo0ozONI6Nh3/QvNTqHEpIwcfuy1tCiQtrX+OCQxmYk/Ypra4yvPgD97gmwWJCorDSCENFvhMG5/xNX0Ks9pUGG1DN9qjS8EW6zje2hSbXvWyP1JtJVdhS/7dBrFABqcsZvsWn6wOGhUcDNdRnBLSFcgs=,iv:9zRiKDjj3+9EuxGHKB12jPwtXlgywxZyX7ICqMhhvi4=,tag:COyZPIEfsgOau2EOUX1vHg==,type:str] - TestSecrets.secret.secrets.databasePassword: - secret: ENC[AES256_GCM,data:DxIcSy5UGvpDnQ==,iv:N7FD6qr51mRyie0UE/2c4IBONT82hzLUYHnz9zMiQVM=,tag:rAx37nTySZckFIV2vwWk1A==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhenNyZzhOL3pwU2Y2SGsv - NGh1QTR0U1FMNUhlRUl2cGQ2amxYSk9tNFVvCjMrbm1WMkdiSEJ1KytlQU9Nelpn - ZmZIUVMxSWo4aVFrQ1MxekM2ZzNhS1kKLS0tIG5IeFNOdGJWN2hoeFMvSHJkYU1a - QTN1MDlNNzNIQVZ2ZXZjUlV1QU1va1EK/R4z69dd8mpiez6qQVgHXnvybc5qjZcC - p5GXZhUP2Y0/9rfRXy+Nwb7dT4LnhPuXLNFFZqTzm0V+aM+AkckrLg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-09-06T14:44:22Z" - mac: ENC[AES256_GCM,data:wA4G51q9aEBX7ra0bVI9EMOBWEwYxpq6ysnJg52pM8hyK3XFS2xczPv5pFCsylNcrmf03TaTDvK+nj5GTu2TJ+3+LQgPj36eocbK5b2PtvNAzIrbr+r9IXSFCvBEePKpfcIltTnUE1vfGBRIeQIwuv7hNjH3FW9K3+ank5h8m0M=,iv:e86qrZ4uf9bSRv3diMW8b0jG31AeNmPkX2r4BGHRdQY=,tag:fpnL1/Q6DwGi9Ys/z/Gv2A==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/graphql/.gitignore b/pkg/alpha.dagger.io/.dagger/env/graphql/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/graphql/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/graphql/values.yaml b/pkg/alpha.dagger.io/.dagger/env/graphql/values.yaml deleted file mode 100644 index 1b4f3520..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/graphql/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - package: ./graphql/tests -name: graphql -inputs: - TestDockersocket: - socket: - unix: /var/run/docker.sock -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyRUk0Q3BNOFBRUEl0amtZ - QS9ZeVdPaTZ5aE5Nbk90eC80aURGZytxQ2g0CjNZSVVvcnVldzNzN3VybjRXMy9T - Sml1QmV6YW1tVlVKUEI5aE5XWTcrY00KLS0tIE05ZllhMkppSFRyN2ZjdUlvMktV - V0J1ZC9BVEJCb1pWcWdsc0lkWDdmYWcKFA7YrasrdKXAnbv4xtebelPia4GREZa7 - lv1rAmsTc7w4MER5h+syxHHr2C0fsysR6WZHNS+lRPH+b4eZCvgHvg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-11-25T13:14:38Z" - mac: ENC[AES256_GCM,data:EuIpdctm28LZwIgdoq+73l1VzG2198s4Kb1qQSeGE5kqscPIFskh1c+DsP5VDtDCExRC5sAVHnDIwWst+Zh5Q9TzbLtMg/+5bYYtBWtf/XZldb1aaGRHdl/g4mILvmZmxdCDmU8BFv7snmIswsrP8X3dY3ItOG85hAJndoY6irA=,iv:UfFVg/gs3qEn3xDQv6g9UqLw4josOCl1Xjl3RsH+9k0=,tag:fUcFZFHdd6Mod+RXdf7sUg==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/http/.gitignore b/pkg/alpha.dagger.io/.dagger/env/http/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/http/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/http/values.yaml b/pkg/alpha.dagger.io/.dagger/env/http/values.yaml deleted file mode 100644 index 7ef0dfa9..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/http/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - package: ./http/tests -name: http -inputs: - TestDockersocket: - socket: - unix: /var/run/docker.sock -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhYjNpR1NHc3V4aGxGNzQ1 - YlZuQ0hrZHBDWGw0elJWZWU3c0U4KzVodEhzCkowME9JVlpWVEc1L2dHUE80Q29t - bEpKTzRwYmhyc2N2a3dhaWg4aWZVWTQKLS0tIHNPWDVaQmh6SllzK2V3QjNJSWVH - NHkxc1VXWHBwZFN5WFNxamdPaGZLM3MKaZra2gWvKl7+pXSihV70/mQYel9697z2 - eBSMuRPuZSjrg3JCBLhXTdIgUYxbMgWhILLpN5UqhTBVboUlRsURQA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-11-23T17:30:31Z" - mac: ENC[AES256_GCM,data:R82VFQG+vtFoH/H4R3TGfFzcmEBLRWv81/pfbYIoWGTH3iFmVgfiCXuqF2O4suhG6mlmiGVDCFBBGPfFvOIBPSwbAqOoNQrM+pXPk3nrm3KY6RLSiByZX3yS1G2HHzGSbQVDuxlTBGyXhpJZs1ZgysZguHUqtunbrjSpD4+iWE8=,iv:LhTwB1QKXCXz9tu03d5NHIv/Jwrgg3LXQYafXykFz/o=,tag:h0mgHTyfxflAuv/uYuRibw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/java-maven/.gitignore b/pkg/alpha.dagger.io/.dagger/env/java-maven/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/java-maven/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/java-maven/values.yaml b/pkg/alpha.dagger.io/.dagger/env/java-maven/values.yaml deleted file mode 100644 index b107a195..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/java-maven/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - package: ./java/maven/tests -name: java-maven -inputs: - TestData: - dir: - path: ./java/maven/tests/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3VURHb25rcVdWRmMyWmVk - c0t4MEZscDdMWEdqMWNPRm0zRG91cnh4cnlvCllCYy9nS2F0ejZFQXBLZzgxU29n - V0tEcEJkQUFzdHczV3MrQjFpUHMzT1kKLS0tIFJvY2QvUjJlRE9hTTJWa1NkK2l4 - UjFhYnZNdUxBNEtzWkVvMUoweUFnREEKbs/IGlNmDk8e3ibJSoIcE95txghXwsso - DL281EMf0V+ARsJY2CiehZsZB+xX7y+YfyQyoWx0xMN7bCgPu2snGg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:55:36Z" - mac: ENC[AES256_GCM,data:DWdIXf9KOilX0FXRINLpHwGXAagJ9KJ1o5zrV6HKDEI8jTrNBA6HxOjlIlgC8BXAoXMNaVGl46SPh66G85eH1SR3q43kAfbCp6dpHc2bSLhX7AwqSJYFZKPPM184v1t0AWUDo+veqHcAp5m7fLS1wOVTCTOocCXjHnGuWOPr6aQ=,iv:kw31H6DCYnJJvQ6KjPtAOBeT2+BKlYJNJ0EPP2XI4wQ=,tag:47d/IHd5i0u8+BhoMP7FOg==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/js-yarn/.gitignore b/pkg/alpha.dagger.io/.dagger/env/js-yarn/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/js-yarn/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/js-yarn/values.yaml b/pkg/alpha.dagger.io/.dagger/env/js-yarn/values.yaml deleted file mode 100644 index 4ca9af4e..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/js-yarn/values.yaml +++ /dev/null @@ -1,34 +0,0 @@ -plan: - package: ./js/yarn/tests -name: js-yarn -inputs: - TestData: - dir: - path: ./js/yarn/tests/testdata - TestData2: - dir: - path: ./js/yarn/tests/testdata2 - TestSecretsAndFile.pkg.secrets.secretone: - secret: ENC[AES256_GCM,data:xfk8,iv:EHZpLqR2CAhFE/39/c7FkQD4G83nt0sIB3svzvA2axU=,tag:Frsl2djN2uYZrv8ZWvElhw==,type:str] - TestSecretsAndFile.pkg.secrets.secretwo: - secret: ENC[AES256_GCM,data:d5Yr,iv:iMS3HQO6/7hnA0rNxHbj4yMxEyKm85/73+V7W0nDGzk=,tag:J/3RUP8x17V0fnUerlY46w==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBPSmNvdnFQKzd3QUJZU0ZM - cEJHUEpvK3NieEF1SVlWWkxWRHJncFEvc1RjCklDWURWcE1sYm9ES2FtZVNpRGlJ - NkJmRHFOYkJ0UHhSbWhsOWZiTjAyeUkKLS0tIDJlWU9hS05SWnZESi9HN1BkZkRN - S2JsNXRkbWVERHM0WWk0bXBJSXJIK1kK9R3gMDcbeKRRlt0HHM+w2kcs+sGfASmE - 0YhxbFF2qQPFwHHR7aPmM+L1ML8cXOrxOOyWmmWhXNgtURCJ9/SO3A== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-10-14T00:13:29Z" - mac: ENC[AES256_GCM,data:jtcjDq2yzjQMF9+0CULS5w0CHQe9iZyAz/j4GsRxVpHj2N+1CucCK2TM8ydP3A0nspUsmiJlzrdZGJ/axb4SMNzc3rRxQXSEwXFuarGzhnZdUaui2Y3F36wCbFght9fACg7T/fXid9ZMYwHSA+5ZcjJZG4SZ5f0QyrzD8VKmBm0=,iv:z2eNPACf6NqJSe2TjlUAeTh9dkzHcaL5/7niknDFuEw=,tag:FuF+U1IaFEMS+imdNB4vKA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/kubernetes-deployment/.gitignore b/pkg/alpha.dagger.io/.dagger/env/kubernetes-deployment/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/kubernetes-deployment/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/kubernetes-deployment/values.yaml b/pkg/alpha.dagger.io/.dagger/env/kubernetes-deployment/values.yaml deleted file mode 100644 index c218a441..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/kubernetes-deployment/values.yaml +++ /dev/null @@ -1,45 +0,0 @@ -plan: - package: ./kubernetes/tests -name: kubernetes-deployment -inputs: - TestKubeconfig: - text: | - apiVersion: v1 - clusters: - - cluster: - certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeE1EUXdNakUwTlRJME5Wb1hEVE14TURNek1URTBOVEkwTlZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTkJTCmp4OHZ4YlovRTVDUWw5akdKcWt6NGkxK0xrcjJSQnlsblRvRTV2dnd0VEZMamJudzR6T3RoQlBaV1VGcEZyMG8KNytBNUxaamRnMkRFendRbnpEaUxTc2RuV1plMEg5U3hLNjVMQ0VNdkR5UlFkenc4Wmt4eXNzQ3J3V2tqd3Y0QwpsbjhzYXVvQ0hrd3ZxelhtZjI2bHR1MC9YYUhrNzdwSlZiSTR0NFNpeUNTMjZsNVhyaGhOUlpkSG5La0FOVnQyCitPcWVzUGhQNWJTcDdSdkhLSDJFWXlISkp4azRYdzJhSUl0T1BYSThGcm1LM0NaZEJaN0VVTzRYTE5aa1M1M2UKZWpNRmlXcHNCVlRsR1lhSmYxMXZ6dmlmRE1uemNvV2ZKVGhaZDBMd0dKRVFVeDA0YXpCZ1VrTWJwVGpBL1ErVwoxamx0ZTZzNERuaE5MODFrYUxNQ0F3RUFBYU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZIT0d3YjJRcG1RVW0wcWhaTlhDK0d3blBDdm9NQTBHQ1NxR1NJYjMKRFFFQkN3VUFBNElCQVFDSjdkQU94ZkJvSlE5OWgyc0RJWVdKT0NXWU9mK0h1MWhMbHpPMHBsODhEUG9WNGE1dwo0WEZVK1pjcW9aU2hVVjZ2RlFGK2s3Q29ldC8zUUppQ2VOZjhMS2pITlh2OUtKcGFoaDhQbElVb3RHMjF3a1NaCmN6MDFRTms1T2pEdmhXQ1BnckNDUEpTQlV6cXQ4cHZTWkhPL3pZckJReUhYM1VSQmhvUDdUeDg5SnBqSEYrTmEKNlBhYzR4SndKWUxPYVJJcWZwWlE4NUdXanBuWXE0c2p2cHdzbXJJZS8vcmFUTHdaSUVQdG5URlFtNFJseW9CeApDbG5mT1c5MjRFbm5nMVBDZUFNK2JyZ1psODB0NW5wK1hrTkVpaisvbFY1NGZFUjhMbTROWkpabGM4eVlOZDZqCnM2ZzgzRmlWN0tvcGZKZk1VT3hSY0hEempTekp1bGFta2pybQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== - server: https://127.0.0.1:35377 - name: kind-kind - contexts: - - context: - cluster: kind-kind - user: kind-kind - name: kind-kind - current-context: kind-kind - kind: Config - preferences: {} - users: - - name: kind-kind - user: - client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURFekNDQWZ1Z0F3SUJBZ0lJU1o0SjMxa0Rsdnd3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TVRBME1ESXhORFV5TkRWYUZ3MHlNakEwTURJeE5EVXlORFphTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXo0aGtSb1VSYlZkbEVaUDcKQTdFVGxOOG9iZzRybmY4RkJDeVlJd1dRbDR5d0lMZUV6MWVMajloS1c5Vkx1OW8yemlGQm5GRGhSQXFpc0JlTQpPanlBNzJkZzJibmZKM0kwVERpT05TcWRrS2RDRnU1V2I0TDM0U0NDcVRzeFdUL0JUNjJsZkVFUzIxN3UxV2pSClBWNlcrVjhzSlhwQVJESUxoUmpGS0pNVjE3a2U0RjVUeDE4WDBuOHhXaGhFZFBrR0FzRDdaaDQ3ZFoxbWRQMjAKbWV1M1grREtqUUpydzlVb0hCV3UzZEoyWWtNNmpUR3B1TnlmaVVrYUcrS1lmUThuVFdiM3VvVHJKYXFlL015aApyY3ducGZVNUFzVUJteUJjN1JrZlZsTEpIWDltbU5wYWxkeUpTaFFnRndSZTQ5NFVuVGpjU3lHVzhUUXhMSmVOCkx1NFdBd0lEQVFBQm8wZ3dSakFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0h3WURWUjBqQkJnd0ZvQVVjNGJCdlpDbVpCU2JTcUZrMWNMNGJDYzhLK2d3RFFZSktvWklodmNOQVFFTApCUUFEZ2dFQkFERnFWMUdvby83NVN5ekVMNlNMeVVhbXJicUJGNFNxRVFYdnBzRjdoYnJ2QWhHMEdIc21DR0tFCk11bFhxeXdiYVpmTGo4ZHFRdVVLTlExN1U5ZWIva0ZXcXRrVlNyZG03eGc0ZythOWFHT0J4RE9vUVZTTHJPeUIKb0ErSUF0d0REZlRUTWhHVksxZXVMWnhXdU1qUkJwMDB5ZUFlVEsyYjlBNUV1dFViWC94MGtWZGhlckx1MitmZAo2Um5VSnBjaEpMR3hjWDZNelVzR0RITC9RcCszaTJ2SnAvQm54V3huNjV0Sm01SXZ3UnQybEZFZ05SUHFiR1NxCit6RVpnZzFTVmlvRUU3U2VsdVV5R2NueHMvQyttdCt3QVZGNzErdGxMN1F5NmFGWEppRXlOOVE2Rjhtd1hDNGkKNmFyb1FFM2JjVkZOOTFKczNFN1NOcVJNci8rWjRFQT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= - client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBejRoa1JvVVJiVmRsRVpQN0E3RVRsTjhvYmc0cm5mOEZCQ3lZSXdXUWw0eXdJTGVFCnoxZUxqOWhLVzlWTHU5bzJ6aUZCbkZEaFJBcWlzQmVNT2p5QTcyZGcyYm5mSjNJMFREaU9OU3Fka0tkQ0Z1NVcKYjRMMzRTQ0NxVHN4V1QvQlQ2MmxmRUVTMjE3dTFXalJQVjZXK1Y4c0pYcEFSRElMaFJqRktKTVYxN2tlNEY1VAp4MThYMG44eFdoaEVkUGtHQXNEN1poNDdkWjFtZFAyMG1ldTNYK0RLalFKcnc5VW9IQld1M2RKMllrTTZqVEdwCnVOeWZpVWthRytLWWZROG5UV2IzdW9UckphcWUvTXlocmN3bnBmVTVBc1VCbXlCYzdSa2ZWbExKSFg5bW1OcGEKbGR5SlNoUWdGd1JlNDk0VW5UamNTeUdXOFRReExKZU5MdTRXQXdJREFRQUJBb0lCQUVlV3BmaUppSVJ1UkVmMwpBdnk0QmFneC9wRlFSQTJCWGVxZHMzRkpSeUp2L29XYXFLNlpaV1FlV1RBcWVMQjVTclI2Vmxha3M4QXo1d0RWCmJxTGNJaUh6U0Q1eTFwNlZ6NktIVTg3VlAzc1pwenVmeGFNN3kyUVdRZHc4dGY0eWR1MlVXZVJ0MGlKb01memQKNW1mRURGSkRXVWdvVHFqM2xtKzRKcktqWWtLQ1V3QnAzSi9NOEdEWG5xck5jYVVjc2lJSFExZnVJRllENXQ5MQpEWDVPaHAvQUkvNUhJc292YVRrS0g1LzlIblpsRllScWhRYUhRS3BMQnA1TkxyS2UybXpOSS9CUnlkNUkxdm1DCkFkeDA1MEtnSXhNRWpDaXp5MnFWSTd3eGNPR1B3Smx2YkU5b2pDakN3dk1tZWlXTkxLNUpFdXdaZitCWVFFbUIKbXA3dmU2a0NnWUVBOHBxMlkybWtLUXA4UXgzN1RPUEYwZGlWM2pDZ0FhSXoyRDJwSkIyWDEzYlRHK01UT3dONwpURUd5M055TEc3R2RvVmVNNitHMFJUSTR6VFZkWmU2T3k3U1NQQXdxS0IrZGJINEE0NU9MT29rUGxUWDRDTmdQCjB1eXFTSCtLWEQ1dkxkbEFhalpqSzkzK3gvbFFaRWhKM3VqYlFZaStkQVJtOGlwam9XWkR4b2NDZ1lFQTJ2M3UKaXc0R3FrWW1FQjlmTEVqN3hUZE11Q1FHdUxLUEZaUUtSNjRZbUR6MGdESnVkWk1XUmVLZFZibEFDSzBrUHdyegpyOTIrdUpzSWkyUzlNYjVabmo0QnR2Y1JqTzJzcUdoTG9YNDVVZHNadTduSDM3dTNSVzVaRi90VnBTYTJ5SkpPCkxHY3FKY3VyWnB5Vk1uZmt3L3dHdHJSdWNCODV5a1hqSEsrUEY2VUNnWUVBMEtpdWZEeU5POXRQMnk0N1NQdVMKMWhUUmVhUWF5cXptcUhNSU9nN1YzVFRQQitvN1RRT0dsYVRnSU1QelJXTnpyeVF0Q1dnNzgxUHB0TjNVTWVxSAptTDc3RTNobS9kR0xSWmZ1VGM1RjdwZVo5bnpQazFPNThIRXJXR1dSN0JxcTV5VTNHT01rVXNPQjhoOEZ2T3JMCjFsUXkyRit6WnZldVQxU1VFbXB4bXBzQ2dZQlBSVG9URmRtdHkwUzk4MDAxTDVvTGNwQVAyK0tlK3V1MmFPY3IKdVVabjNUQzRNd2t2QURaQXg5NGlDTE80TUV4OWtZNVNhOWM4NWNtN0E1VkVxMTJ2WFV5cm1WVytDTTdHQ3pMTgpXMjZPUmR4VHl0VWlGTVlybU4waFJEWmxXTlV6VjFwNjBrRThlelFwS2FjTUpNQW5mVlJFMEoxbGNyZ3Rrd3k1CjlvYTZqUUtCZ1FESGNuNnl5dzhzSThUTlUvazZDMGhyRkhYeHpLc0ZkMWV5Misxa01ZMm5pR0o3UHRGaHBMZWwKaTIzU3NPSFFyM29Da1l0bHpIL2pzR21OS01IOWxyOFdjTkgvTE04eEJ0N2lhZDFESTlrN0RYbjFscjFIbW1wUApsRlhyQjZ3VDV1UDZVRmhxNHY5NWhkQW5CL3YvOWFPdTIyNlBKYXVUV2RtaGxaNElFa3N1M1E9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIQ2hZZ3ZRVzRseXZyVW1h - L01WYkNrTzdHSEN5WTlyQzVDTm9FbzRENzFFCjdrcVhKa1ZwaGNyYmo3ditDR1hC - cStzcmVjUXY3V3FUZElRNUIzQlQzL0UKLS0tIHlmWTlUdFVOczM0TTF5RHFTUXps - SVVkOUtuWTJneE45em5iQ3JvbnIwWlkKgdJC5IzvVDxbWSfU41Xg/UGPxuVBSOGY - eqenr07uWppNaHuLuo9A+znQa2RQ0L2clcB2d+ka+6z5tQyHOfx1nA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:55:54Z" - mac: ENC[AES256_GCM,data:pxSS4ozN3opL/vP9ZTPamN7F1XftVRpUotfLyrv4r1DsGuoXuJXSjmg975/319VnA/yTa3jlhASrSRXgeQu0CTKj+mvTXrATdsoK6GR3kob2jReIYJh6Xk6nZtNA76aWkviHBlF4soNtb9M/jUcu5iHTk+LYQ97YX+D+0Ees6Fo=,iv:KASRIq/hg8hj9uVvbZTBdcGHdVgA8IfG5/OaVB2DnJI=,tag:pXzN1cor3GOaJ6DeJ8Pfrw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/kubernetes-helm/.gitignore b/pkg/alpha.dagger.io/.dagger/env/kubernetes-helm/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/kubernetes-helm/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/kubernetes-helm/values.yaml b/pkg/alpha.dagger.io/.dagger/env/kubernetes-helm/values.yaml deleted file mode 100644 index ce1c614f..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/kubernetes-helm/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -plan: - package: ./kubernetes/helm/tests -name: kubernetes-helm -inputs: - TestChartSource: - dir: - path: ./kubernetes/helm/tests/testdata/mychart - TestKubeconfig: - text: | - apiVersion: v1 - clusters: - - cluster: - certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeE1EUXdNakUwTlRJME5Wb1hEVE14TURNek1URTBOVEkwTlZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTkJTCmp4OHZ4YlovRTVDUWw5akdKcWt6NGkxK0xrcjJSQnlsblRvRTV2dnd0VEZMamJudzR6T3RoQlBaV1VGcEZyMG8KNytBNUxaamRnMkRFendRbnpEaUxTc2RuV1plMEg5U3hLNjVMQ0VNdkR5UlFkenc4Wmt4eXNzQ3J3V2tqd3Y0QwpsbjhzYXVvQ0hrd3ZxelhtZjI2bHR1MC9YYUhrNzdwSlZiSTR0NFNpeUNTMjZsNVhyaGhOUlpkSG5La0FOVnQyCitPcWVzUGhQNWJTcDdSdkhLSDJFWXlISkp4azRYdzJhSUl0T1BYSThGcm1LM0NaZEJaN0VVTzRYTE5aa1M1M2UKZWpNRmlXcHNCVlRsR1lhSmYxMXZ6dmlmRE1uemNvV2ZKVGhaZDBMd0dKRVFVeDA0YXpCZ1VrTWJwVGpBL1ErVwoxamx0ZTZzNERuaE5MODFrYUxNQ0F3RUFBYU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZIT0d3YjJRcG1RVW0wcWhaTlhDK0d3blBDdm9NQTBHQ1NxR1NJYjMKRFFFQkN3VUFBNElCQVFDSjdkQU94ZkJvSlE5OWgyc0RJWVdKT0NXWU9mK0h1MWhMbHpPMHBsODhEUG9WNGE1dwo0WEZVK1pjcW9aU2hVVjZ2RlFGK2s3Q29ldC8zUUppQ2VOZjhMS2pITlh2OUtKcGFoaDhQbElVb3RHMjF3a1NaCmN6MDFRTms1T2pEdmhXQ1BnckNDUEpTQlV6cXQ4cHZTWkhPL3pZckJReUhYM1VSQmhvUDdUeDg5SnBqSEYrTmEKNlBhYzR4SndKWUxPYVJJcWZwWlE4NUdXanBuWXE0c2p2cHdzbXJJZS8vcmFUTHdaSUVQdG5URlFtNFJseW9CeApDbG5mT1c5MjRFbm5nMVBDZUFNK2JyZ1psODB0NW5wK1hrTkVpaisvbFY1NGZFUjhMbTROWkpabGM4eVlOZDZqCnM2ZzgzRmlWN0tvcGZKZk1VT3hSY0hEempTekp1bGFta2pybQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== - server: https://127.0.0.1:35377 - name: kind-kind - contexts: - - context: - cluster: kind-kind - user: kind-kind - name: kind-kind - current-context: kind-kind - kind: Config - preferences: {} - users: - - name: kind-kind - user: - client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURFekNDQWZ1Z0F3SUJBZ0lJU1o0SjMxa0Rsdnd3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TVRBME1ESXhORFV5TkRWYUZ3MHlNakEwTURJeE5EVXlORFphTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXo0aGtSb1VSYlZkbEVaUDcKQTdFVGxOOG9iZzRybmY4RkJDeVlJd1dRbDR5d0lMZUV6MWVMajloS1c5Vkx1OW8yemlGQm5GRGhSQXFpc0JlTQpPanlBNzJkZzJibmZKM0kwVERpT05TcWRrS2RDRnU1V2I0TDM0U0NDcVRzeFdUL0JUNjJsZkVFUzIxN3UxV2pSClBWNlcrVjhzSlhwQVJESUxoUmpGS0pNVjE3a2U0RjVUeDE4WDBuOHhXaGhFZFBrR0FzRDdaaDQ3ZFoxbWRQMjAKbWV1M1grREtqUUpydzlVb0hCV3UzZEoyWWtNNmpUR3B1TnlmaVVrYUcrS1lmUThuVFdiM3VvVHJKYXFlL015aApyY3ducGZVNUFzVUJteUJjN1JrZlZsTEpIWDltbU5wYWxkeUpTaFFnRndSZTQ5NFVuVGpjU3lHVzhUUXhMSmVOCkx1NFdBd0lEQVFBQm8wZ3dSakFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0h3WURWUjBqQkJnd0ZvQVVjNGJCdlpDbVpCU2JTcUZrMWNMNGJDYzhLK2d3RFFZSktvWklodmNOQVFFTApCUUFEZ2dFQkFERnFWMUdvby83NVN5ekVMNlNMeVVhbXJicUJGNFNxRVFYdnBzRjdoYnJ2QWhHMEdIc21DR0tFCk11bFhxeXdiYVpmTGo4ZHFRdVVLTlExN1U5ZWIva0ZXcXRrVlNyZG03eGc0ZythOWFHT0J4RE9vUVZTTHJPeUIKb0ErSUF0d0REZlRUTWhHVksxZXVMWnhXdU1qUkJwMDB5ZUFlVEsyYjlBNUV1dFViWC94MGtWZGhlckx1MitmZAo2Um5VSnBjaEpMR3hjWDZNelVzR0RITC9RcCszaTJ2SnAvQm54V3huNjV0Sm01SXZ3UnQybEZFZ05SUHFiR1NxCit6RVpnZzFTVmlvRUU3U2VsdVV5R2NueHMvQyttdCt3QVZGNzErdGxMN1F5NmFGWEppRXlOOVE2Rjhtd1hDNGkKNmFyb1FFM2JjVkZOOTFKczNFN1NOcVJNci8rWjRFQT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= - client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBejRoa1JvVVJiVmRsRVpQN0E3RVRsTjhvYmc0cm5mOEZCQ3lZSXdXUWw0eXdJTGVFCnoxZUxqOWhLVzlWTHU5bzJ6aUZCbkZEaFJBcWlzQmVNT2p5QTcyZGcyYm5mSjNJMFREaU9OU3Fka0tkQ0Z1NVcKYjRMMzRTQ0NxVHN4V1QvQlQ2MmxmRUVTMjE3dTFXalJQVjZXK1Y4c0pYcEFSRElMaFJqRktKTVYxN2tlNEY1VAp4MThYMG44eFdoaEVkUGtHQXNEN1poNDdkWjFtZFAyMG1ldTNYK0RLalFKcnc5VW9IQld1M2RKMllrTTZqVEdwCnVOeWZpVWthRytLWWZROG5UV2IzdW9UckphcWUvTXlocmN3bnBmVTVBc1VCbXlCYzdSa2ZWbExKSFg5bW1OcGEKbGR5SlNoUWdGd1JlNDk0VW5UamNTeUdXOFRReExKZU5MdTRXQXdJREFRQUJBb0lCQUVlV3BmaUppSVJ1UkVmMwpBdnk0QmFneC9wRlFSQTJCWGVxZHMzRkpSeUp2L29XYXFLNlpaV1FlV1RBcWVMQjVTclI2Vmxha3M4QXo1d0RWCmJxTGNJaUh6U0Q1eTFwNlZ6NktIVTg3VlAzc1pwenVmeGFNN3kyUVdRZHc4dGY0eWR1MlVXZVJ0MGlKb01memQKNW1mRURGSkRXVWdvVHFqM2xtKzRKcktqWWtLQ1V3QnAzSi9NOEdEWG5xck5jYVVjc2lJSFExZnVJRllENXQ5MQpEWDVPaHAvQUkvNUhJc292YVRrS0g1LzlIblpsRllScWhRYUhRS3BMQnA1TkxyS2UybXpOSS9CUnlkNUkxdm1DCkFkeDA1MEtnSXhNRWpDaXp5MnFWSTd3eGNPR1B3Smx2YkU5b2pDakN3dk1tZWlXTkxLNUpFdXdaZitCWVFFbUIKbXA3dmU2a0NnWUVBOHBxMlkybWtLUXA4UXgzN1RPUEYwZGlWM2pDZ0FhSXoyRDJwSkIyWDEzYlRHK01UT3dONwpURUd5M055TEc3R2RvVmVNNitHMFJUSTR6VFZkWmU2T3k3U1NQQXdxS0IrZGJINEE0NU9MT29rUGxUWDRDTmdQCjB1eXFTSCtLWEQ1dkxkbEFhalpqSzkzK3gvbFFaRWhKM3VqYlFZaStkQVJtOGlwam9XWkR4b2NDZ1lFQTJ2M3UKaXc0R3FrWW1FQjlmTEVqN3hUZE11Q1FHdUxLUEZaUUtSNjRZbUR6MGdESnVkWk1XUmVLZFZibEFDSzBrUHdyegpyOTIrdUpzSWkyUzlNYjVabmo0QnR2Y1JqTzJzcUdoTG9YNDVVZHNadTduSDM3dTNSVzVaRi90VnBTYTJ5SkpPCkxHY3FKY3VyWnB5Vk1uZmt3L3dHdHJSdWNCODV5a1hqSEsrUEY2VUNnWUVBMEtpdWZEeU5POXRQMnk0N1NQdVMKMWhUUmVhUWF5cXptcUhNSU9nN1YzVFRQQitvN1RRT0dsYVRnSU1QelJXTnpyeVF0Q1dnNzgxUHB0TjNVTWVxSAptTDc3RTNobS9kR0xSWmZ1VGM1RjdwZVo5bnpQazFPNThIRXJXR1dSN0JxcTV5VTNHT01rVXNPQjhoOEZ2T3JMCjFsUXkyRit6WnZldVQxU1VFbXB4bXBzQ2dZQlBSVG9URmRtdHkwUzk4MDAxTDVvTGNwQVAyK0tlK3V1MmFPY3IKdVVabjNUQzRNd2t2QURaQXg5NGlDTE80TUV4OWtZNVNhOWM4NWNtN0E1VkVxMTJ2WFV5cm1WVytDTTdHQ3pMTgpXMjZPUmR4VHl0VWlGTVlybU4waFJEWmxXTlV6VjFwNjBrRThlelFwS2FjTUpNQW5mVlJFMEoxbGNyZ3Rrd3k1CjlvYTZqUUtCZ1FESGNuNnl5dzhzSThUTlUvazZDMGhyRkhYeHpLc0ZkMWV5Misxa01ZMm5pR0o3UHRGaHBMZWwKaTIzU3NPSFFyM29Da1l0bHpIL2pzR21OS01IOWxyOFdjTkgvTE04eEJ0N2lhZDFESTlrN0RYbjFscjFIbW1wUApsRlhyQjZ3VDV1UDZVRmhxNHY5NWhkQW5CL3YvOWFPdTIyNlBKYXVUV2RtaGxaNElFa3N1M1E9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBud1hMc0dTZTlIQ3lZVEQ5 - WjA2UlAvTm15ZEgycXlKKzhjTmU0Ui9xZHcwCkRxclFUTUE0aXRvaElkc3diV2Ix - N2VZZVIzS2t3cVl3UmtXOC9PY1VObzAKLS0tIG9ydkFzak1SaUo2NGxET3ZiNklZ - VHlGUExaMzcwM0pOM2VDY280UWZXSzQKAm7ZV1agxbla3Yrc7vrwJosSjQtWhdac - ZFyQ6Gi+9H7qHZM89yVjAaIg1lwr68HcjYgDzpvvhJO9YPfzwoLyHw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:56:04Z" - mac: ENC[AES256_GCM,data:MuWGfoZbSuIgUjCOnFAVFyApcPn+rPyKtWAjuAt+04qsYZP3oGlYsUBWlKVTtlCqx1EmSccgMjL1HUaXg4kO/SltUd/qhAZsjRuTzr84lIXyAqLQ7ScgXYX/z/fNCn4CbZHcpJg6C0dzRDWykxSBttYrmcNyGs7ynaOF0tGPkHA=,iv:+YiBGrCkT/nMcARgWb3B0NSqNZIhf0V5tEXzBiTC+YE=,tag:ssB5Ee9GSsr/0vOIRb1wLw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/kubernetes-kustomize/.gitignore b/pkg/alpha.dagger.io/.dagger/env/kubernetes-kustomize/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/kubernetes-kustomize/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/kubernetes-kustomize/values.yaml b/pkg/alpha.dagger.io/.dagger/env/kubernetes-kustomize/values.yaml deleted file mode 100644 index 429daca4..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/kubernetes-kustomize/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - package: ./kubernetes/kustomize/tests -name: kubernetes-kustomize -inputs: - TestKustomize.testdata: - dir: - path: ./kubernetes/kustomize/tests/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTL2Jyczk3QXZiUVkyd3cw - TlYzQ2NyR2ZGZnhSRmowSGRmbFBodFRPc2dnCnJpYjdCdUpEUE10d3I4clh1eDVV - MmVqbmxiNmRvSUNqZEY3clZnci9pRkkKLS0tIGVLSVFwTy9TSElFUkdjOVlWb3Yy - OFllMEh3cVJZZnFxbW4xS1RtcFQzcFUKo/1WcYp4nPBXba8wQBe3DMt6pYQJGoSu - ja5BiCffN5wOoW9WT0j8Clx21w7BXcl46+T5GYpXDQDcqf6nCv1kYQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:56:13Z" - mac: ENC[AES256_GCM,data:3Y62uoofDyzVwzmOqvdO08rVoGyXOSQnE4CXrVCi+DsoyaWAEi2BhzWc1yk/giYnwedZtMDGnmCHS1abirbVzPJShQbPqgHvh0Wp7RlJCnnYAPLpE/VGPvMb1qHv24yKMr+YKM6kA5q7tRlC9LZQ5tjv2bd5ZnBH7WRoA9RUIQk=,iv:S2KOS6ntLxKdbkvK5yM1YwvCSF+I/bbqUI22uMSKLMg=,tag:QxXjIfo7DPZyPr+5X9bChQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/netlify/.gitignore b/pkg/alpha.dagger.io/.dagger/env/netlify/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/netlify/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/netlify/values.yaml b/pkg/alpha.dagger.io/.dagger/env/netlify/values.yaml deleted file mode 100644 index 97e14d19..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/netlify/values.yaml +++ /dev/null @@ -1,28 +0,0 @@ -plan: - package: ./netlify/tests -name: netlify -inputs: - TestNetlify.deploy.account.name: - text: blocklayer - TestNetlify.deploy.account.token: - secret: ENC[AES256_GCM,data:oWKi8eqTUEs+YClokLKeAKsEj3qae4yQTn/67u6ga4Ptcq4+MyYS/6wAUg==,iv:Xfw+L/4p7vO+jb/EVyYOvsIZ9KxZbi30ms2Ckg4E8cE=,tag:G4EBBer04D6FHFP9e+feTw==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwWHFLRUtscWVma0lQM3Qv - M2czUFJhSEpnczdJTWhadnJHOWowaXd1dWtJCmk3aU15NDJYcmtUOE5pZ0lIQzRu - dTYvRFdsM0ZoUjFWSG91UnZRVWdvZjgKLS0tIENhK2VWNHByY3hYNUVmWDRmOUFM - SEdUK2RsaUxuVWg2aXUwdVJ0eUtrWWMKWkQDBuL5e4QDx5Wy6+fHiD+J4fp7QdMm - lsqgmxRvJMWgEvm1U+hDAo/Pkn8PFUFJf0KxEvkdF4qGuguQePgzFQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:56:21Z" - mac: ENC[AES256_GCM,data:kwYvKyJtStkcUQ6BaKt2KfY1s2al1bfcTc3MfTLtBsjBRoFvaaHdpMzy8XbNe6RG0R60ZH/1UJVHKohbceHOWcZlEZbK3siAiaXRNo5uLDlKBzpiGvLyW3QDDqE8qWpmh2sKWsh8DKjj3bXxiY4aLXwxVJt/zry221l+U7RdrvY=,iv:zUaaLxty4RN0c2aov9u6uXaqvlHdhlOhfgk8qMZgqv0=,tag:BI8xtsvsOe3Kr+5fZEpSjA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/os-container/.gitignore b/pkg/alpha.dagger.io/.dagger/env/os-container/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/os-container/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/os-container/values.yaml b/pkg/alpha.dagger.io/.dagger/env/os-container/values.yaml deleted file mode 100644 index 1a09231d..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/os-container/values.yaml +++ /dev/null @@ -1,28 +0,0 @@ -plan: - package: ./os/tests/container -name: os-container -inputs: - SimpleSecret.cleartext: - text: hello, world! - SimpleSecret.encrypted: - secret: ENC[AES256_GCM,data:Ps0VwEr1g2VJAkuyvA==,iv:LWWhr6wjWhpiv46VIehkVK0p8gwd8S1atmiFYqWcdLI=,tag:lridOOyvkUlSa6n+e6rMPw==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5SU9NUTRWWTBvZzRWZkNT - Tk5TWFBFcHBWMldNSXA4KzU3TlVwTU9pdEZJCkFXNWpMMmZOZGs3WTYxZ3hDZVpv - L3lYNVh3Ti9UQXZzaTNWRU9IdGh4UncKLS0tIDFxbE1ZTmlUNElWWmRIN2hSRjk4 - azJIU2lIVlF4N1VxT2tVWDBPU2RsOEkKqkfxeT/mnnDxdvv/vhXMj2Zl8ogaAHa6 - xbBUOaCZ8stwj4Zz4/iKdrPspQQKo7/QuxxAcFUfyuK3fULqJHPXPQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:56:37Z" - mac: ENC[AES256_GCM,data:zDGloHwc2X2XQ5by1ZTPJyUihX4Zy9xgPUksHFKOhbXC/NvkUIrw/UWWEkcdyNWCuErQG+r/uGrY/h03rl2qFnpkxlabji4+wvUgNQ0ehO/z+LfL4fjweNBrNvCzwPlyTNOZAu4wFqc3iIwkwWDng4vnjZW6QwxZDL58otuOdfE=,iv:afSdXL5l/0HvF7FKJXKs5UtTMgpF+AbDW86VwWnRuGc=,tag:1F5MP75Uwq4OUiJ17hD+cA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/os/.gitignore b/pkg/alpha.dagger.io/.dagger/env/os/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/os/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/os/values.yaml b/pkg/alpha.dagger.io/.dagger/env/os/values.yaml deleted file mode 100644 index b80d25b3..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/os/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ -plan: - package: ./os/tests/os -name: os -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0bDM5blE0cC9LNHkxZmEy - bitYcjhMOHhrWE5pRm90Qyt4S200ZTN0Q1d3Clh2VmdKQjdGUGdKaThmaktwN1F6 - aXZpellwbHpkb3pMb1NMNXVJYnFUMmMKLS0tIFNiZGlBNjE3UjlXWnBjZ3hwSWto - STlrbFNHZGFRUVQ1S1RIaGVyWktNV0kKo9AFURi/BKI+JuGYVuOrsw3eJU3s66Im - FCc5YCzrsjX+Y26Su+XW81fTWkcC910e/g+tlZbEFWKZYa8qu1VkqA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:56:27Z" - mac: ENC[AES256_GCM,data:a69jnTQsVKzWB+52XfoCldJUev6YqJTpdVFBhgbx4WXW9x3YNwRQy4fguiNqiXo/BmiVoHQrPEQsUUHkmsB8r/pOVzq0SlsRRqLLnkJRTdoRSzP8BnOvMxk9Am2g8Y0a7smXAgmkbDzVLLBOZXyGROb1geTrGxeCFgF9AjGLJrM=,iv:5cUq11KBRxrWapdpvC1VqMQ0otyGZbHuU/C/FsIM0+o=,tag:QD4KCFnGxw6eH/fmSoByYQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/sanity-check/.gitignore b/pkg/alpha.dagger.io/.dagger/env/sanity-check/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/sanity-check/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/cue.mod/module.cue b/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/cue.mod/pkg/.gitignore b/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/cue.mod/pkg/.gitignore deleted file mode 100644 index 2d4dc1ae..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# generated by dagger -alpha.dagger.io -dagger.lock diff --git a/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/main.cue b/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/main.cue deleted file mode 100644 index 3b26b485..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/sanity-check/plan/main.cue +++ /dev/null @@ -1,69 +0,0 @@ -package main - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" - "alpha.dagger.io/alpine" -) - -// Assert that there are no errors -err: "" - -// Directory containing universe packages (./universe/ in dagger repo) -universe: dagger.#Input & dagger.#Artifact - -ctr: #CueCLI & { - ctx: universe - command: """ - ( - find . -name '*.cue' -print0 | xargs -0iX dirname X | sort -u | { - while read -r dir; do - [ "$(basename $dir)" = "cue.mod" ] && continue - echo "--- $dir" - cue eval "$dir" >/dev/null - done - } > /out 2>/err - ) || true - """ -} - -result: (os.#File & { - from: ctr.ctr - path: "/out" -}).contents @dagger(output) - -err: (os.#File & { - from: ctr.ctr - path: "/err" -}).contents @dagger(output) - -#CueCLI: { - command: string - ctx: dagger.#Artifact - vendor: [name=string]: dagger.#Artifact - - ctr: os.#Container & { - image: alpine.#Image & { - package: { - curl: true - tar: true - } - } - setup: [ - """ - set -e - cd $(mktemp -d) - curl -L https://github.com/cue-lang/cue/releases/download/v0.4.0/cue_v0.4.0_linux_amd64.tar.gz -o cue.tgz - tar zxvf cue.tgz - cp cue /usr/local/bin/cue - rm -fr ./* - """, - ] - mount: "/ctx": from: ctx - for name, dir in vendor { - mount: "/ctx/cue.mod/pkg/\(name)": from: dir - } - dir: "/ctx" - "command": command - } -} diff --git a/pkg/alpha.dagger.io/.dagger/env/sanity-check/values.yaml b/pkg/alpha.dagger.io/.dagger/env/sanity-check/values.yaml deleted file mode 100644 index 4f546458..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/sanity-check/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -plan: - module: .dagger/env/sanity-check/plan -name: sanity-check -inputs: - universe: - dir: - path: . -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBtMjhYeVhscGxYWVg1RHZ2 - bjlWcnFuQ1hvVGVvZGRDYUlpeWpYYUZnWW5nCndObmdoSkpZZXI4MytwNUtsMkwr - ZkY4a01iN1dSL05KaGExSk0rWFpjNzQKLS0tIGF0eVRXalloUERaU2lhZ2gwcG1G - RE1BR1ZvSlpRWnpZVERFQlB5ckhPYk0KMm8XjFKgcjWaXh9F542NXyv9dBZQdZJC - rn5YittfEOwRkrlqBCVwPtU+nhE5oDxnt9a0n8JMUgvB0Nnd6tgP+A== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-24T15:27:51Z" - mac: ENC[AES256_GCM,data:SDJPXr1NjGSOcHMLmKrzJ9XkFjfXOg7g5pdgXS3fQ4sSALVBqhHSfHJnH2m4NVSJPyOd35ia2/BivTWTGw1oguovLSfSvlptPUDqbwsXQoB2NEFcAJ6eJeDyz8Bx98OrBliyJaVOVYzF4y5dWwW2BGuevW097PbY/Sv3p6x8fyY=,iv:IftNBSOvEn3nGRQlD47At8pvundsXdk68yz+cWct/tU=,tag:XUPxsP39xSjPgvIZNBV09w==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/terraform/.gitignore b/pkg/alpha.dagger.io/.dagger/env/terraform/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/terraform/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/terraform/values.yaml b/pkg/alpha.dagger.io/.dagger/env/terraform/values.yaml deleted file mode 100644 index 271d5605..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/terraform/values.yaml +++ /dev/null @@ -1,31 +0,0 @@ -plan: - package: ./terraform/tests -name: terraform -inputs: - TestConfig.awsConfig.accessKey: - secret: ENC[AES256_GCM,data:V/p84nLbgjrytefnsfItiY71ikQ=,iv:i1x3UYP+sctwY9LrRp/rfeJ8/JPWOfiiJSG0NWUiXW0=,tag:IynKh1fQEhExmmR3qGx/zQ==,type:str] - TestConfig.awsConfig.secretKey: - secret: ENC[AES256_GCM,data:cBYaVhbeV9D6acJWNU7uL8AsEtpnY0wHM8td9ZAJ9ebGB+BY4iBZLQ==,iv:SDkRKQQKBSz/cRQlW65sIjF0PhHhhKkGUEgZe9CV7Ek=,tag:OCUQmgjP2p57YoLts9Dh4w==,type:str] - TestData: - dir: - path: ./terraform/tests/testdata -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkOTJpQWJWY3dnM2hDdXZG - bVJEN0dNUzQ0VGhneWtHVG1hUHA5ZjdhdHdvClR0ZVpKb1RYRnc3dy9wSjVuSHBn - c2RMbzE0Y2EzN2FVak9CMk9CK0hOTFkKLS0tIG9Fdi9xWWc0TU5WY1ZsVUdZM2lw - cC9LSiswbFRKaTNXUGNIWVZVbGJqV1UK3/wsgPwR5P2fzs80wcz1dM/8sbBWMR+B - dmhP99OQisIgcwGATy0nh726pYKtosDpSLIJkLZDAUq9qRKm9bch1w== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-07-08T09:56:55Z" - mac: ENC[AES256_GCM,data:dj/ZP/H8mKH5lZaRpEWeWLMihGBVVVNTHMQ+vpYIsCSh0TZy8fy0MHsGnIrJCrBFfHMpaAG5pzvrkqUwAqGTX4UpUJXHCT5HMHbUQdIZB/Yril/d9Pto29bhSr9xKXecMbc4j/cwaypS1ScCIAdAc3Wq+kBSTYFyZiy5ekvyLsM=,iv:EjvQEBW4ovKnLdIwHCcXgVbUU/O5gglw8Igr8WBzw/k=,tag:yad/G2bXpiUzUhZMsMbb+Q==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.dagger/env/trivy/.gitignore b/pkg/alpha.dagger.io/.dagger/env/trivy/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/trivy/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/pkg/alpha.dagger.io/.dagger/env/trivy/values.yaml b/pkg/alpha.dagger.io/.dagger/env/trivy/values.yaml deleted file mode 100644 index 9e986560..00000000 --- a/pkg/alpha.dagger.io/.dagger/env/trivy/values.yaml +++ /dev/null @@ -1,32 +0,0 @@ -plan: - package: ./trivy/tests -name: trivy -inputs: - TestConfig.awsConfig.accessKey: - secret: ENC[AES256_GCM,data:49pmU12lmfa9Lxuw4SE/9+kBJOA=,iv:LHzgaSmsNrPQ2jrrSPfVwV+gUbaGAFg/ARifdGnMZwQ=,tag:gb6FLzaQAvUT0EGKMXBJ9A==,type:str] - TestConfig.awsConfig.secretKey: - secret: ENC[AES256_GCM,data:OMpMHVZMwM2a6YhecV0FwvBBxgUsZqu1Y1QXrCisQD3X0ab8vC5Kpw==,iv:HtyLQttG1M4NOC/jA/jvpNMG8N5is3LA2c0fGecrN5o=,tag:0ajZGtMwRXOCFOQRiqxm8A==,type:str] - TestConfig.gcpConfig.serviceKey: - secret: ENC[AES256_GCM,data:lwZNdc+jszBc1D7L8Hh7/iTecCayUg2bLhRIlK/0TU7weGigSUFmmCoRUGKRjaF2xwWSA9q/Racq3ko8OqjCEzeN6/Z5wYgANtAfZi6Wm3zALL3FMNH5aeLy6uOemfXaeaRFfajMkbSy2Iq2SyBGDcU6zmE8Sb3T+O1ty8HoF6ggJi7cuwIo/V6u38PxTgDrISfQ3+RB1DArhn0KvIakmY2oPx1EmugWAWWz9wUDFxGr4WghV0leai80c63S6JPc1AY7HFR5uJ3UwA6lpWuFxmD/ACXV4+JK5REkYsdASI541TlvUDQTAxKsCePKapqrrBbugzDtlYxoltAHKIXf4/FXxh+KrEpThCqVHBStQeZEeh17A/PgX0eX7zeSY3Y1rsYlZRKzdLAdsQUMko+Tfb7NHhVW/Lq9OaLL/ASAk19qIBCdkvefTqkCTMdA0EGvRpl0mMhxzsHN7C/CJ+Xunr5mB8vZOFKH8yxHgT7ha+Rz1K6brywBbrylwMdKQ19UDBPwmMxEXVp24k+PgwBwOkVEw+Zj+gvl77J4ac7bPJTT6lQs3j8WMz+fONS9okg6j+2iCeRg/omrSg4wCIWwIZLMYlnJKzURNPYIJt7dMTM6HCr6UHTUsfGvxZZeQPXigff1USWv69j42sD4IzN7VLLiidLnflSt2NJXRioYeHzX76I6m3FPN5xm6NiWfna3SzcmqmflymdLYJ5yAvzk6Mrpt/dQbSuNSJhSB60ffBTquAOZJFdhynFBprtEyu/V0l5oQndfjrwCp/dNE47EfhX6vgEAcF7Q5ZqCDg3xACUSjQw5dlJqt7TL8fwowsE1Z6aDM1mN///S4sGf3fiW24SuoaMti6DJ36tDUZkGiboDL5UfW4oCbX6Fg4RJSmgQX0j8I4qNrhSmgtrC/i1kvye/Yei7jqu1MmWGFqbG4QgpGK6mCn86g54gqoz3RnibIEHOSUt97q9kze4lUzsvPcLFo5fyU/3aC3RMX+iY7hQ+aZQE2vIdnYTY/a4IUN8r/k9ygr2l3bGsz9pCbuNpiTX8SlEdTxyhdq6HUnfGXBC8+7mS+woLasawjaakGR48ZOSOB5ZN3fAVfNZ6mQNcvTMlS2ntcut7AYhTrc/XqeYhwnrOkhDjBro55mD1G7I+GdSK5zUilXpKgrtLXb2yuY0mEd8qlrnyqzvY/uBFfgvHSSONIMbelUEmY+EoW0qCn8l5dkA+ze3xoYocEa4kvilN39Ag33uJI3MGpYJWIpZSlxttuJepKMVB4ypJdPujw6m2ry2dXwNszTMxg5kH6M7GhnfZxgxIZo6xsDM9XF3LMLPd6GT+nOaPPwDDoIIHuWIUGQlBFkaChQxJY5ZpgYWzkIZYSgxf+I8v/mvdUZgfQ2ymBtwBFoVppXkDVvsq9HxKd4NJMyWGCC4HjaqDo+N7L7ktlnTSxfNWfd1MKgVcDdCer/54qP3J8clKAtq+bWQY3VYNA9iM3EbQeWrLatXt0mpJ6sc30APPM4fUHfzkum2KTX4IRHJ/KYcnU0GMpql812ShfGsheh4JA6LPoNFPH5PEZRXvSLdOnmN6w7y09YeX+sHUYJ1EwOz9I6VGQmd3P+A9yBEIMFX6y1cCwthCo++wXfrPMSDAYvI0Sytmy1IaRdPvonuvmyw85NC3gLmP701/KJ65tUw1NkUrEPwTDnONjc27caAT3hHlTa+rzuQpovo526tSmfYnj7cU39r29IvEagwqRMOA+088FOqRzutsW737tVE4TVAV2g/pTgk/LRSDbG30pajoJi4oMfHfKDTtZZQ4QrpFVFK8jAzaiyOVd/faE+iuwtJoRy8yEI/1Hd3AEgmF375POWijh7U3JdaY57jUzpQiY3uMogCEdk6ZaU8zelq+j1g8R1JdeoCA+VmkwcceGrR0D9TQKHdUT2zuoR6y7A6hLJX6ifS3v/ZBj4sJaD3qlmUN0oELf1sgPQ7CuR2wKz1rfby7HdDFgFQ3F1EwGctS/1vxeubigCTItB43MJpHo1Ladx8PsRkgNcrFVq4WOP+kyFKu/gpfueaNCH+RY3j9EXhTKsi1HYIfJyUV47TMbqitjE5nWseaigEr9X9WXdxAccsRCjloWJ6QstcrEWBlVCqE6qiMTq6UMMgAwsggRbBBjYcG8BcI9aLULHpLPrTQ9jGEVpM6hHmeL2ggJblsXaTxai0Q6LOOcwKpOkt/ODSI1/3j3HyVN/s94a2tDy0fOB1sMHqrIB2gsW3K+PuYsPIqDcwz879MBkWErTeb9++RIP+bmBoGR8DM0o/4Ituopg+qfZIKSMtvQ2V7ueW8vWd/nefzi1RBNI8qNwMOZOfKJJD/HwjOqUu19RCHwq5z2oEab6QOxfXGZxWICESNO14PVGpwY0oR/USG3Xqfd5Q8Hr4pCn2L9Ca1aW52ubp+dtjvgsFBKcan/08zz7XVB7vk30xIhtNLCWCHzxCmpeuhSEwjDflh7l039FgKcK/8avk1oGLhuVmoOqLhLRN349rF62DkaFtRMiUIINu90I9zkU6E1Q4st3kkHYZ6+KSixstEI0LAntEwA71F7Lm/nmQ7eDBPaN/4xqH+WXIEbrTK1UKBlKjTBR/OV4oPv7ls2w/npqwGGPwPQvpOV/u4KwyZX99vxbSErgxzSNVxk+jf3rKLWW8+O9X+4uovX2hy6WSxcAXq+W1u/i6wlDG/dOhSeaU5nV3lLB95dzz9q6dioaVs2296sRhhzOzAutvrdvxYnpFftBOfdsMc5lwhogI2KiXPUtOjENdlEAAu+QNPcGfUfeNE7pY0SZv1qw4ErkI4loS4PGT5gHMqcms9RQozsnQ7Foq60HPBrUqiNpP0wqEZcVQdVlU8bZhNn6Qk/qfepOQWzTbl8MG+Q793cP1hIa8nv3CIEV9AQbM1BgjZ53Z03wSa+n/TaJhsGp/yn3X4GlCRk29Kt3emJwVA9gtncydpxY9DDN1kcWESJHP1mmX0Gyhzv4holAhYGhdCvH3YzW+JbEL7GBgOg/B/Wmavu2iZMaK7TTxIWRouY5tIZYtTJazQOSHBImHVfFM5AZYN,iv:1emUpXQvyJFMMb195ZRcHS/jzR1bC31t+j1nWhjNNzQ=,tag:PfgiV2TAgLOxj1qqz1yzgA==,type:str] - TestConfig.trivyBasicAuth.basicAuth.password: - secret: ENC[AES256_GCM,data:RiQ1Jc0tYbwydpMp,iv:c9YF6O4YEljEEspgSp9l/RCGrL6mX4mKRq0VS+G1wpY=,tag:K0JOxed4yh/Ypn8wZVr40w==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2QVVmbFlHazZaeDJ6Vk5l - dldPbmttNWhLb1hnVjZMMGRkdk9kR3ErMENZCkJBOGN5NDFZYzRHR0N6d1NIeDMx - QXV0RkJydWltL092YnFNY3FGcUlYTGsKLS0tIGcxV0tYOGRNTE51K0VCNHAwcEtn - bHZuNEZsYnNNaHdBOFBTYmJtNC9JRncKVcqn44INSaA5TGRl/566DMu7scX9UjtV - 3FhUcSfLFJXviw/ll3dUONXOQJTe3p9SgFCHir2qnMmJqErDDvqj/Q== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-10-27T22:36:22Z" - mac: ENC[AES256_GCM,data:DbTYfCl2OFTe0nqxd3b08ssF1hyKACzqGJOjNyKtCKOVXzlTh1QCynejLE+APehkHUkl/8GqEmjqlwYFNXfbUcWNcw4U0ZD9ZWzkFG/Nk8HuSQyAqhF2zF8DBPbhZhupjzXcRGmZcM8LJjJPJsAg3u018eGo6TWmjt6+1uettLw=,iv:vCAiBHHC017v7saIPpkJ+gL3ku4wHwFVszF4xmbwSRE=,tag:LdcZ1HpWx0Zfjfm1OQ+4Dw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/pkg/alpha.dagger.io/.gitignore b/pkg/alpha.dagger.io/.gitignore deleted file mode 100644 index ff8f4176..00000000 --- a/pkg/alpha.dagger.io/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -report.xml diff --git a/pkg/alpha.dagger.io/alpine/alpine.cue b/pkg/alpha.dagger.io/alpine/alpine.cue deleted file mode 100644 index 329b06c0..00000000 --- a/pkg/alpha.dagger.io/alpine/alpine.cue +++ /dev/null @@ -1,36 +0,0 @@ -// Base package for Alpine Linux -package alpine - -import ( - "alpha.dagger.io/dagger/op" -) - -// Default Alpine version -let defaultVersion = "3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" - -// Base image for Alpine Linux -#Image: { - // List of packages to install - package: [string]: true | false | string - // Alpine version to install - version: string | *defaultVersion - - // Use of os package not possible : alpine is a low level component - #up: [ - op.#FetchContainer & { - ref: "index.docker.io/alpine:\(version)" - }, - for pkg, info in package { - if (info & true) != _|_ { - op.#Exec & { - args: ["apk", "add", "-U", "--no-cache", pkg] - } - } - if (info & string) != _|_ { - op.#Exec & { - args: ["apk", "add", "-U", "--no-cache", "\(pkg)\(info)"] - } - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/alpine/tests/alpine.cue b/pkg/alpha.dagger.io/alpine/tests/alpine.cue deleted file mode 100644 index 987e811b..00000000 --- a/pkg/alpha.dagger.io/alpine/tests/alpine.cue +++ /dev/null @@ -1,43 +0,0 @@ -package alpine - -import ( - "alpha.dagger.io/dagger/op" -) - -TestImageVersion: { - image: #Image & { - // install an old version on purpose - version: "3.10.9" - } - - test: #up: [ - op.#Load & {from: image}, - op.#Exec & { - args: [ - "sh", - "-ec", - """ - test "$(cat /etc/alpine-release)" = 3.10.9 - """, - ] - }, - ] -} - -TestPackageInstall: { - image: #Image & { - package: jq: true - package: curl: true - version: "3.15.0" - } - - test: #up: [ - op.#Load & {from: image}, - op.#Exec & { - args: ["jq", "--version"] - }, - op.#Exec & { - args: ["sh", "-ec", "curl --version"] - }, - ] -} diff --git a/pkg/alpha.dagger.io/argocd/app.cue b/pkg/alpha.dagger.io/argocd/app.cue deleted file mode 100644 index dd652f10..00000000 --- a/pkg/alpha.dagger.io/argocd/app.cue +++ /dev/null @@ -1,48 +0,0 @@ -package argocd - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" -) - -// Create an ArgoCD application -#App: { - // ArgoCD configuration - config: #Config - - // App name - name: dagger.#Input & {string} - - // Repository url (git or helm) - repo: dagger.#Input & {string} - - // Folder to deploy - path: dagger.#Input & {"." | string} - - // Destination server - server: dagger.#Input & {*"https://kubernetes.default.svc" | string} - - // Destination namespace - namespace: dagger.#Input & {*"default" | string} - - os.#Container & { - image: #CLI & { - "config": config - } - command: #""" - argocd app create "$APP_NAME" \ - --repo "$APP_REPO" \ - --path "$APP_PATH" \ - --dest-server "$APP_SERVER" \ - --dest-namespace "$APP_NAMESPACE" - """# - always: true - env: { - APP_NAME: name - APP_REPO: repo - APP_PATH: path - APP_SERVER: server - APP_NAMESPACE: namespace - } - } -} diff --git a/pkg/alpha.dagger.io/argocd/argocd.cue b/pkg/alpha.dagger.io/argocd/argocd.cue deleted file mode 100644 index 029da8f6..00000000 --- a/pkg/alpha.dagger.io/argocd/argocd.cue +++ /dev/null @@ -1,99 +0,0 @@ -// ArgoCD client operations -package argocd - -import ( - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -// ArgoCD configuration -#Config: { - // ArgoCD CLI binary version - version: *"v2.0.5" | dagger.#Input & {string} - - // ArgoCD server - server: dagger.#Input & {string} - - // ArgoCD project - project: *"default" | dagger.#Input & {string} - - // Basic authentication to login - basicAuth: { - // Username - username: dagger.#Input & {string} - - // Password - password: dagger.#Input & {dagger.#Secret} - } | *null - - // ArgoCD authentication token - token: dagger.#Input & {*null | dagger.#Secret} -} - -// Re-usable CLI component -#CLI: { - config: #Config - - #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: jq: true - package: curl: true - } - }, - - // Install the ArgoCD CLI - op.#Exec & { - args: ["sh", "-c", - #""" - curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/$VERSION/argocd-linux-amd64 && - chmod +x /usr/local/bin/argocd - """#, - ] - env: VERSION: config.version - }, - - if config.basicAuth != null && config.token == null { - // Login to ArgoCD server - op.#Exec & { - args: ["sh", "-c", #""" - argocd login "$ARGO_SERVER" --username "$ARGO_USERNAME" --password $(cat /run/secrets/password) --insecure - """#, - ] - env: { - ARGO_SERVER: config.server - ARGO_USERNAME: config.basicAuth.username - } - mount: "/run/secrets/password": secret: config.basicAuth.password - } - }, - - if config.token != null && config.basicAuth == null { - // Write config file - op.#Exec & { - args: ["sh", "-c", - #""" - mkdir -p ~/.argocd && cat > ~/.argocd/config << EOF - contexts: - - name: "$SERVER" - server: "$SERVER" - user: "$SERVER" - current-context: "$SERVER" - servers: - - grpc-web-root-path: "" - server: "$SERVER" - users: - - auth-token: $(cat /run/secrets/token) - name: "$SERVER" - EOF - """#, - ] - mount: "/run/secrets/token": secret: config.token - env: SERVER: config.server - } - }, - - ] -} diff --git a/pkg/alpha.dagger.io/argocd/status.cue b/pkg/alpha.dagger.io/argocd/status.cue deleted file mode 100644 index 0383f4d1..00000000 --- a/pkg/alpha.dagger.io/argocd/status.cue +++ /dev/null @@ -1,59 +0,0 @@ -package argocd - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -// Get application's status -#Status: { - // ArgoCD configuration - config: #Config - - // ArgoCD application - name: dagger.#Input & {string} - - // ArgoCD CLI output - outputs: { - // Application health - health: dagger.#Output & {string} - - // Application sync state - sync: dagger.#Output & {string} - - // Namespace - namespace: dagger.#Output & {string} - - // Server - server: dagger.#Output & {string} - - // Comma separated list of application URLs - urls: dagger.#Output & {string} - - // Last operation state message - state: dagger.#Output & {string} - } - - outputs: #up: [ - op.#Load & { - from: #CLI & { - "config": config - } - }, - - op.#Exec & { - args: ["sh", "-c", - #""" - argocd app get "$APPLICATION" --output json | jq '{health:.status.health.status,sync:.status.sync.status,namespace:.spec.destination.namespace,server:.spec.destination.server,urls:(.status.summary.externalURLs//[]|join(",")),state:.status.operationState.message}' > /output.json - """#, - ] - env: APPLICATION: name - always: true - }, - - op.#Export & { - source: "/output.json" - format: "json" - }, - ] -} diff --git a/pkg/alpha.dagger.io/argocd/sync.cue b/pkg/alpha.dagger.io/argocd/sync.cue deleted file mode 100644 index b43f184e..00000000 --- a/pkg/alpha.dagger.io/argocd/sync.cue +++ /dev/null @@ -1,41 +0,0 @@ -package argocd - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" -) - -// Sync an application to its target state -#Sync: { - // ArgoCD configuration - config: #Config - - // ArgoCD application - application: dagger.#Input & {string} - - // Wait the application to sync correctly - wait: dagger.#Input & {*false | bool} - - ctr: os.#Container & { - image: #CLI & { - "config": config - } - command: #""" - argocd app sync "$APPLICATION" - - if [ -n "$WAIT_FLAG" ]; then - argocd app wait "$APPLICATION" - fi - """# - always: true - env: APPLICATION: application - if wait { - env: WAIT_FLAG: "wait" - } - } - - status: #Status & { - config: ctr.image.config - name: application - } -} diff --git a/pkg/alpha.dagger.io/argocd/tests/argocd.cue b/pkg/alpha.dagger.io/argocd/tests/argocd.cue deleted file mode 100644 index bfd1d71e..00000000 --- a/pkg/alpha.dagger.io/argocd/tests/argocd.cue +++ /dev/null @@ -1,38 +0,0 @@ -package argocd - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" -) - -TestConfig: argocdConfig: #Config & { - version: dagger.#Input & {*"v2.0.5" | string} - server: dagger.#Input & {*"dagger-example-argocd-server.tld" | string} - basicAuth: { - username: dagger.#Input & {*"admin" | string} - password: dagger.#Input & {dagger.#Secret} - } -} - -TestClient: os.#Container & { - image: #CLI & { - config: TestConfig.argocdConfig - } - command: #""" - argocd account list | grep "$ARGOCD_USERNAME" - """# - env: ARGOCD_USERNAME: TestConfig.argocdConfig.basicAuth.username -} - -TestApp: #App & { - config: TestConfig.argocdConfig - name: "daggerci-test" - repo: "https://github.com/argoproj/argocd-example-apps.git" - path: "guestbook" -} - -TestArgoCDStatus: #Sync & { - config: TestApp.config - application: TestApp.name - wait: true -} diff --git a/pkg/alpha.dagger.io/argocd/tests/infra/infra.cue b/pkg/alpha.dagger.io/argocd/tests/infra/infra.cue deleted file mode 100644 index 30ca30b5..00000000 --- a/pkg/alpha.dagger.io/argocd/tests/infra/infra.cue +++ /dev/null @@ -1,14 +0,0 @@ -package infra - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/kubernetes" -) - -TestKubeconfig: dagger.#Input & {string} - -TestArgoInfra: kubernetes.#Resources & { - kubeconfig: TestKubeconfig - namespace: "argocd" - url: "https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml" -} diff --git a/pkg/alpha.dagger.io/aws/aws.cue b/pkg/alpha.dagger.io/aws/aws.cue deleted file mode 100644 index 3f4730ec..00000000 --- a/pkg/alpha.dagger.io/aws/aws.cue +++ /dev/null @@ -1,151 +0,0 @@ -// AWS base package -package aws - -import ( - "regexp" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -// AWS Config shared by all AWS packages -#Config: { - // AWS region - region: dagger.#Input & {string} - // AWS access key - accessKey: dagger.#Input & {dagger.#Secret} - // AWS secret key - secretKey: dagger.#Input & {dagger.#Secret} - // AWS localstack mode - localMode: dagger.#Input & {*false | bool} -} - -// Configuration specific to CLI v1 -#V1: { - config: #Config - package: [string]: string | bool - version: dagger.#Input & {*"1.19" | string} - - #up: [ - op.#Load & { - from: alpine.#Image & { - "package": package - "package": bash: true - "package": jq: true - "package": curl: true - "package": "aws-cli": "=~\( version )" - if config.localMode != false { - package: "py3-pip": true - } - } - - }, - ] -} - -// Configuration specific to CLI v2 -#V2: { - config: #Config - package: [string]: string | bool - version: dagger.#Input & {*"2.1.29" | string} - - #up: [ - op.#Load & { - from: alpine.#Image & { - "package": package - "package": bash: true - "package": jq: true - "package": curl: true - "package": binutils: true - if config.localMode != false { - package: "py3-pip": true - } - } - }, - //https://stackoverflow.com/a/61268529 - op.#Exec & { - env: AWS_CLI_VERSION: version - args: ["/bin/bash", "--noprofile", "--norc", "-eo", "pipefail", "-c", - #""" - curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub - curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk - curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-bin-2.31-r0.apk - curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-i18n-2.31-r0.apk - apk add --no-cache glibc-2.31-r0.apk glibc-bin-2.31-r0.apk glibc-i18n-2.31-r0.apk - /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 - - curl -s https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip -o awscliv2.zip - unzip awscliv2.zip > /dev/null - ./aws/install - rm -rf awscliv2.zip aws /usr/local/aws-cli/v2/*/dist/aws_completer /usr/local/aws-cli/v2/*/dist/awscli/data/ac.index \ - usr/local/aws-cli/v2/*/dist/awscli/examples glibc-*.apk - """#] - }, - ] -} - -#CLI: { - config: #Config - package: [string]: string | bool - version: dagger.#Input & {*"1.19" | string} - - _isV2: regexp.Match("^2.*$", version) - - #up: [ - op.#Load & { - if _isV2 == false { - from: #V1 & { - "config": config - "package": package - "version": version - } - } - if _isV2 == true { - from: #V2 & { - "config": config - "package": package - "version": version - } - } - - }, - op.#Exec & { - if config.localMode == false { - args: ["/bin/bash", "--noprofile", "--norc", "-eo", "pipefail", "-c", - #""" - aws configure set aws_access_key_id "$(cat /run/secrets/access_key)" - aws configure set aws_secret_access_key "$(cat /run/secrets/secret_key)" - - aws configure set default.region "$AWS_DEFAULT_REGION" - aws configure set default.cli_pager "" - aws configure set default.output "json" - """#] - } - if config.localMode == true { - args: [ "/bin/bash", "--noprofile", "--norc", "-eo", "pipefail", "-c", - #""" - # Download awscli v3 and override aws - pip install awscli-local==0.14 - mv /usr/bin/awslocal /usr/bin/aws - - # Configure - mkdir -p ~/.aws/ - - # Set up ~/.aws/config - echo "[default]" > ~/.aws/config - echo "region = $AWS_DEFAULT_REGION" >> ~/.aws/config - echo "cli_pager =" >> ~/.aws/config - echo "output = json" >> ~/.aws/config - - # Set up ~/.aws/credentials - echo "[default]" > ~/.aws/credentials - echo "aws_access_key_id = $(cat /run/secrets/access_key)" >> ~/.aws/credentials - echo "aws_secret_access_key = $(cat /run/secrets/secret_key)" >> ~/.aws/credentials - """#] - } - mount: "/run/secrets/access_key": secret: config.accessKey - mount: "/run/secrets/secret_key": secret: config.secretKey - env: AWS_DEFAULT_REGION: config.region - }, - ] -} diff --git a/pkg/alpha.dagger.io/aws/cloudformation/cloudformation.cue b/pkg/alpha.dagger.io/aws/cloudformation/cloudformation.cue deleted file mode 100644 index 50dad7f8..00000000 --- a/pkg/alpha.dagger.io/aws/cloudformation/cloudformation.cue +++ /dev/null @@ -1,94 +0,0 @@ -// AWS CloudFormation -package cloudformation - -import ( - "encoding/json" - - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/aws" -) - -// AWS CloudFormation Stack -#Stack: { - - // AWS Config - config: aws.#Config - - // Source is the Cloudformation template (JSON/YAML string) - source: string @dagger(input) - - // Stackname is the cloudformation stack - stackName: string @dagger(input) - - // Stack parameters - parameters: { - ... - } @dagger(input) - - // Behavior when failure to create/update the Stack - onFailure: *"DO_NOTHING" | "ROLLBACK" | "DELETE" @dagger(input) - - // Maximum waiting time until stack creation/update (in minutes) - timeout: *10 | uint @dagger(input) - - // Never update the stack if already exists - neverUpdate: *false | true @dagger(input) - - #files: { - "/entrypoint.sh": #Code - "/src/template.json": source - if len(parameters) > 0 { - "/src/parameters.json": json.Marshal( - [ for key, val in parameters { - ParameterKey: "\(key)" - ParameterValue: "\(val)" - }]) - "/src/parameters_overrides.json": json.Marshal([ for key, val in parameters {"\(key)=\(val)"}]) - } - } - - outputs: { - [string]: string @dagger(output) - } - - outputs: #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - op.#Mkdir & { - path: "/src" - }, - for dest, content in #files { - op.#WriteFile & { - "dest": dest - "content": content - } - }, - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - env: { - if neverUpdate { - NEVER_UPDATE: "true" - } - STACK_NAME: stackName - TIMEOUT: "\(timeout)" - ON_FAILURE: onFailure - } - dir: "/src" - }, - op.#Export & { - source: "/outputs.json" - format: "json" - }, - ] -} diff --git a/pkg/alpha.dagger.io/aws/cloudformation/code.cue b/pkg/alpha.dagger.io/aws/cloudformation/code.cue deleted file mode 100644 index 7d0d3c6b..00000000 --- a/pkg/alpha.dagger.io/aws/cloudformation/code.cue +++ /dev/null @@ -1,108 +0,0 @@ -package cloudformation - -#Code: #""" - set +o pipefail - - aws cloudformation validate-template --template-body file:///src/template.json - parameters="" - - function getOutputs() { - aws cloudformation describe-stacks \ - --stack-name "$STACK_NAME" \ - --query 'Stacks[].Outputs' \ - --output json \ - | jq '.[] | map( { (.OutputKey|tostring): .OutputValue } ) | add' \ - > /outputs.json - } - - # Check if the stack exists - aws cloudformation describe-stacks --stack-name "$STACK_NAME" 2>/dev/null || { - if [ -f /src/parameters.json ]; then - parameters="--parameters file:///src/parameters.json" - cat /src/parameters.json - fi - - aws cloudformation create-stack \ - --stack-name "$STACK_NAME" \ - --template-body "file:///src/template.json" \ - --capabilities CAPABILITY_IAM \ - --on-failure "$ON_FAILURE" \ - --timeout-in-minutes "$TIMEOUT" \ - $parameters \ - || { - # Create failed, display errors - aws cloudformation describe-stack-events \ - --stack-name "$STACK_NAME" \ - --max-items 10 \ - | >&2 jq '.StackEvents[] | select((.ResourceStatus | contains("FAILED")) or (.ResourceStatus | contains("ERROR"))) | ("===> ERROR: " + .LogicalResourceId + ": " + .ResourceStatusReason)' - exit 1 - } - - aws cloudformation wait stack-create-complete \ - --stack-name "$STACK_NAME" - - getOutputs - exit 0 - } - - # In case there is an action already in progress, we wait for the corresponding action to complete - wait_action="" - stack_status=$(aws cloudformation describe-stacks --stack-name "$STACK_NAME" | jq -r '.Stacks[].StackStatus') - case "$stack_status" in - "CREATE_FAILED") - echo "Deleting previous failed stack..." - aws cloudformation delete-stack --stack-name "$STACK_NAME" - aws cloudformation wait stack-delete-complete --stack-name "$STACK_NAME" || true - ;; - "CREATE_IN_PROGRESS") - echo "Stack create already in progress, waiting..." - aws cloudformation wait stack-create-complete --stack-name "$STACK_NAME" || true - ;; - "UPDATE_IN_PROGRESS") - # Cancel update to avoid stacks stuck in deadlock (re-apply then works) - echo "Stack update already in progress, waiting..." - aws cloudformation cancel-update-stack --stack-name "$STACK_NAME" || true - ;; - "ROLLBACK_IN_PROGRESS") - echo "Stack rollback already in progress, waiting..." - aws cloudformation wait stack-rollback-complete --stack-name "$STACK_NAME" || true - ;; - "DELETE_IN_PROGRESS") - echo "Stack delete already in progress, waiting..." - aws cloudformation wait stack-delete-complete --stack-name "$STACK_NAME" || true - ;; - "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS") - echo "Stack update almost completed, waiting..." - aws cloudformation wait stack-update-complete --stack-name "$STACK_NAME" || true - ;; - esac - - [ -n "$NEVER_UPDATE" ] && { - getOutputs - exit 0 - } - - # Stack exists, trigger an update via `deploy` - if [ -f /src/parameters_overrides.json ]; then - parameters="--parameter-overrides file:///src/parameters_overrides.json" - cat /src/parameters_overrides.json - fi - echo "Deploying stack $STACK_NAME" - aws cloudformation deploy \ - --stack-name "$STACK_NAME" \ - --template-file "/src/template.json" \ - --capabilities CAPABILITY_IAM \ - --no-fail-on-empty-changeset \ - $parameters \ - || { - # Deploy failed, display errors - echo "Failed to deploy stack $STACK_NAME" - aws cloudformation describe-stack-events \ - --stack-name "$STACK_NAME" \ - --max-items 10 \ - | >&2 jq '.StackEvents[] | select((.ResourceStatus | contains("FAILED")) or (.ResourceStatus | contains("ERROR"))) | ("===> ERROR: " + .LogicalResourceId + ": " + .ResourceStatusReason)' - exit 1 - } - - getOutputs - """# diff --git a/pkg/alpha.dagger.io/aws/ecr/ecr.cue b/pkg/alpha.dagger.io/aws/ecr/ecr.cue deleted file mode 100644 index b6f77594..00000000 --- a/pkg/alpha.dagger.io/aws/ecr/ecr.cue +++ /dev/null @@ -1,32 +0,0 @@ -// Amazon Elastic Container Registry (ECR) -package ecr - -import ( - "alpha.dagger.io/aws" - "alpha.dagger.io/os" -) - -// Convert ECR credentials to Docker Login format -#Credentials: { - // AWS Config - config: aws.#Config - - // ECR registry - username: "AWS" @dagger(output) - - ctr: os.#Container & { - image: aws.#CLI & { - "config": config - } - always: true - command: "aws ecr get-login-password > /out" - } - - // ECR registry secret - secret: { - os.#File & { - from: ctr - path: "/out" - } - }.contents @dagger(output) -} diff --git a/pkg/alpha.dagger.io/aws/ecr/tests/ecr.cue b/pkg/alpha.dagger.io/aws/ecr/tests/ecr.cue deleted file mode 100644 index e6f61846..00000000 --- a/pkg/alpha.dagger.io/aws/ecr/tests/ecr.cue +++ /dev/null @@ -1,95 +0,0 @@ -package ecr - -import ( - "alpha.dagger.io/aws" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/random" -) - -TestConfig: awsConfig: aws.#Config & { - region: "us-east-2" -} - -TestECR: { - localMode: TestConfig.awsConfig.localMode - - suffix: random.#String & { - seed: "" - } - - repository: string - if localMode == false { - repository: "125635003186.dkr.ecr.\(TestConfig.awsConfig.region).amazonaws.com/dagger-ci" - } - if localMode == true { - repository: "localhost:4510/dagger-ci" - } - tag: "test-ecr-\(suffix.out)" - - creds: #Credentials & { - config: TestConfig.awsConfig - } - - push: { - ref: "\(repository):\(tag)" - - #up: [ - op.#DockerBuild & { - dockerfile: """ - FROM alpine - RUN echo \(suffix.out) > /test - """ - }, - - op.#DockerLogin & { - target: repository - username: creds.username - secret: creds.secret - }, - - op.#PushContainer & { - "ref": ref - }, - ] - } - - pull: #up: [ - op.#DockerLogin & { - target: push.ref - username: creds.username - secret: creds.secret - }, - - op.#FetchContainer & { - ref: push.ref - }, - ] - - verify: #up: [ - op.#Load & { - from: pull - }, - - op.#Exec & { - always: true - args: [ - "sh", "-c", "test $(cat test) = \(suffix.out)", - ] - }, - ] - - verifyBuild: #up: [ - op.#DockerLogin & { - target: push.ref - username: creds.username - secret: creds.secret - }, - - op.#DockerBuild & { - dockerfile: #""" - FROM \#(push.ref) - RUN test $(cat test) = \#(suffix.out) - """# - }, - ] -} diff --git a/pkg/alpha.dagger.io/aws/ecs/run-task.cue b/pkg/alpha.dagger.io/aws/ecs/run-task.cue deleted file mode 100644 index 33ac7159..00000000 --- a/pkg/alpha.dagger.io/aws/ecs/run-task.cue +++ /dev/null @@ -1,70 +0,0 @@ -// AWS Elastic Container Service (ECS) -package ecs - -import ( - "alpha.dagger.io/aws" -) - -// Task implements ecs run-task for running a single container on ECS -#Task: { - - // AWS Config - config: aws.#Config - - // ECS cluster name - cluster: string @dagger(input) - - // Arn of the task to run - taskArn: string @dagger(input) - - // Environment variables of the task - containerEnvironment: { - [string]: string @dagger(input) - } - - // Container name - containerName: string @dagger(input) - - // Container command to give - containerCommand: [...string] @dagger(input) - - // Task role ARN - roleArn: string | *"" @dagger(input) - - containerOverrides: { - containerOverrides: [{ - name: containerName - if len(containerCommand) > 0 { - command: containerCommand - } - if len(containerEnvironment) > 0 { - environment: [ for k, v in containerEnvironment { - name: k - value: v - }] - } - }] - if roleArn != "" { - taskRoleArn: roleArn - } - } - - aws.#Script & { - "config": config - export: "/out" - files: { - "/inputs/cluster": cluster - "/inputs/task_arn": taskArn - "/inputs/container_overrides": containerOverrides - } - code: #""" - cat /inputs/container_overrides | jq - - aws ecs run-task \ - --cluster "$(cat /inputs/cluster)" \ - --task-definition "$(cat /inputs/task_arn)" \ - --overrides "$(cat /inputs/container_overrides)" \ - > /out - """# - } -} diff --git a/pkg/alpha.dagger.io/aws/eks/code.cue b/pkg/alpha.dagger.io/aws/eks/code.cue deleted file mode 100644 index 6c84a6d0..00000000 --- a/pkg/alpha.dagger.io/aws/eks/code.cue +++ /dev/null @@ -1,27 +0,0 @@ -package eks - -#Code: #""" - [ -e /cache/bin/kubectl ] || { - curl -sfL https://dl.k8s.io/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /cache/bin/kubectl \ - && chmod +x /cache/bin/kubectl - } - - export KUBECONFIG=/kubeconfig - export PATH="$PATH:/cache/bin" - - # Generate a kube configuration - aws eks update-kubeconfig --name "$EKS_CLUSTER" - - # Figure out the kubernetes username - CONTEXT="$(kubectl config current-context)" - USER="$(kubectl config view -o json | \ - jq -r ".contexts[] | select(.name==\"$CONTEXT\") | .context.user")" - - # Grab a kubernetes access token - ACCESS_TOKEN="$(aws eks get-token --cluster-name "$EKS_CLUSTER" | \ - jq -r .status.token)" - - # Remove the user config and replace it with the token - kubectl config unset "users.${USER}" - kubectl config set-credentials "$USER" --token "$ACCESS_TOKEN" - """# diff --git a/pkg/alpha.dagger.io/aws/eks/eks.cue b/pkg/alpha.dagger.io/aws/eks/eks.cue deleted file mode 100644 index db13fb7c..00000000 --- a/pkg/alpha.dagger.io/aws/eks/eks.cue +++ /dev/null @@ -1,61 +0,0 @@ -// AWS Elastic Kubernetes Service (EKS) -package eks - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/aws" -) - -// KubeConfig config outputs a valid kube-auth-config for kubectl client -#KubeConfig: { - // AWS Config - config: aws.#Config - - // EKS cluster name - clusterName: string @dagger(input) - - // Kubectl version - version: *"v1.19.9" | string @dagger(input) - - // kubeconfig is the generated kube configuration file - kubeconfig: { - string - - #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - - op.#WriteFile & { - dest: "/entrypoint.sh" - content: #Code - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - env: { - EKS_CLUSTER: clusterName - KUBECTL_VERSION: version - } - mount: { - "/cache/aws": "cache" - "/cache/bin": "cache" - } - }, - op.#Export & { - source: "/kubeconfig" - format: "string" - }, - ] - } @dagger(output) -} diff --git a/pkg/alpha.dagger.io/aws/eks/tests/eks.cue b/pkg/alpha.dagger.io/aws/eks/tests/eks.cue deleted file mode 100644 index bbaef4f1..00000000 --- a/pkg/alpha.dagger.io/aws/eks/tests/eks.cue +++ /dev/null @@ -1,52 +0,0 @@ -package eks - -import ( - "alpha.dagger.io/aws" - "alpha.dagger.io/kubernetes" - "alpha.dagger.io/dagger/op" -) - -TestConfig: awsConfig: aws.#Config & { - region: "us-east-2" -} - -TestCluster: #KubeConfig & { - config: TestConfig.awsConfig - clusterName: *"dagger-example-eks-cluster" | string -} - -TestEks: { - #GetPods: - """ - kubectl get pods -A - """ - - #up: [ - op.#Load & { - from: kubernetes.#Kubectl - }, - - op.#WriteFile & { - dest: "/kubeconfig" - content: TestCluster.kubeconfig - }, - - op.#WriteFile & { - dest: "/getPods.sh" - content: #GetPods - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/getPods.sh", - ] - env: KUBECONFIG: "/kubeconfig" - }, - ] -} diff --git a/pkg/alpha.dagger.io/aws/elb/elb.cue b/pkg/alpha.dagger.io/aws/elb/elb.cue deleted file mode 100644 index 8d38c87e..00000000 --- a/pkg/alpha.dagger.io/aws/elb/elb.cue +++ /dev/null @@ -1,85 +0,0 @@ -// AWS Elastic Load Balancer (ELBv2) -package elb - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/aws" -) - -// Returns an unused rule priority (randomized in available range) -#RandomRulePriority: { - - // AWS Config - config: aws.#Config - - // ListenerArn - listenerArn: string @dagger(input) - - // Optional vhost for reusing priorities - vhost?: string @dagger(input) - - // exported priority - priority: out @dagger(output) - - out: { - string - - #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - #""" - if [ -s "$VHOST" ]; then - # We passed a vhost as input, try to recycle priority from previously allocated vhost - priority=$(aws elbv2 describe-rules \ - --listener-arn "$LISTENER_ARN" | \ - jq -r --arg vhost "$VHOST" '.Rules[] | select(.Conditions[].HostHeaderConfig.Values[] == $VHOST) | .Priority') - - if [ -n "${priority}" ]; then - echo -n "${priority}" > /priority - exit 0 - fi - fi - - # Grab a priority random from 1-50k and check if available, retry 10 times if none available - priority=0 - for i in {1..10} - do - p=$(shuf -i 1-50000 -n 1) - # Find the next priority available that we can allocate - aws elbv2 describe-rules \ - --listener-arn "$LISTENER_ARN" \ - | jq -e "select(.Rules[].Priority == \"${p}\") | true" && continue - priority="${p}" - break - done - if [ "${priority}" -lt 1 ]; then - echo "Error: cannot determine a Rule priority" - exit 1 - fi - echo -n "${priority}" > /priority - """#, - ] - env: { - LISTENER_ARN: listenerArn - VHOST: vhost - } - }, - - op.#Export & { - source: "/db_created" - format: "string" - }, - ] - } -} diff --git a/pkg/alpha.dagger.io/aws/rds/rds.cue b/pkg/alpha.dagger.io/aws/rds/rds.cue deleted file mode 100644 index ce7299dc..00000000 --- a/pkg/alpha.dagger.io/aws/rds/rds.cue +++ /dev/null @@ -1,249 +0,0 @@ -// AWS Relational Database Service (RDS) -package rds - -import ( - "alpha.dagger.io/dagger/op" - "encoding/json" - "alpha.dagger.io/aws" -) - -// Creates a new Database on an existing RDS Instance -#Database: { - - // AWS Config - config: aws.#Config - - // DB name - name: string @dagger(input) - - // ARN of the database instance - dbArn: string @dagger(input) - - // ARN of the database secret (for connecting via rds api) - secretArn: string @dagger(input) - - // Database type MySQL or PostgreSQL (Aurora Serverless only) - dbType: "mysql" | "postgres" @dagger(input) - - // Name of the DB created - out: { - @dagger(output) - string - - #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - #""" - echo "dbType: $DB_TYPE" - - sql="CREATE DATABASE \`"$NAME" \`" - if [ "$DB_TYPE" = postgres ]; then - sql="CREATE DATABASE \""$NAME"\"" - fi - - echo "$NAME" >> /db_created - - aws rds-data execute-statement \ - --resource-arn "$DB_ARN" \ - --secret-arn "$SECRET_ARN" \ - --sql "$sql" \ - --database "$DB_TYPE" \ - --no-include-result-metadata \ - |& tee /tmp/out - exit_code=${PIPESTATUS[0]} - if [ $exit_code -ne 0 ]; then - grep -q "database exists\|already exists" /tmp/out || exit $exit_code - fi - """#, - ] - env: { - NAME: name - DB_ARN: dbArn - SECRET_ARN: secretArn - DB_TYPE: dbType - } - }, - - op.#Export & { - source: "/db_created" - format: "string" - }, - ] - } -} - -// Creates a new user credentials on an existing RDS Instance -#User: { - - // AWS Config - config: aws.#Config - - // Username - username: string @dagger(input) - - // Password - password: string @dagger(input) - - // ARN of the database instance - dbArn: string @dagger(input) - - // ARN of the database secret (for connecting via rds api) - secretArn: string @dagger(input) - - // Name of the database to grants access to - grantDatabase: string | *"" @dagger(input) - - // Database type MySQL or PostgreSQL (Aurora Serverless only) - dbType: "mysql" | "postgres" @dagger(input) - - // Outputted username - out: { - string - - #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - #""" - echo "dbType: $DB_TYPE" - - sql="CREATE USER '"$USERNAME"'@'%' IDENTIFIED BY '"$PASSWORD"'" - if [ "$DB_TYPE" = postgres ]; then - sql="CREATE USER \""$USERNAME"\" WITH PASSWORD '"$PASSWORD"'" - fi - - echo "$USERNAME" >> /username - - aws rds-data execute-statement \ - --resource-arn "$DB_ARN" \ - --secret-arn "$SECRET_ARN" \ - --sql "$sql" \ - --database "$DB_TYPE" \ - --no-include-result-metadata \ - |& tee tmp/out - exit_code=${PIPESTATUS[0]} - if [ $exit_code -ne 0 ]; then - grep -q "Operation CREATE USER failed for\|ERROR" tmp/out || exit $exit_code - fi - - sql="SET PASSWORD FOR '"$USERNAME"'@'%' = PASSWORD('"$PASSWORD"')" - if [ "$DB_TYPE" = postgres ]; then - sql="ALTER ROLE \""$USERNAME"\" WITH PASSWORD '"$PASSWORD"'" - fi - - aws rds-data execute-statement \ - --resource-arn "$DB_ARN" \ - --secret-arn "$SECRET_ARN" \ - --sql "$sql" \ - --database "$DB_TYPE" \ - --no-include-result-metadata - - sql="GRANT ALL ON \`"$GRAND_DATABASE"\`.* to '"$USERNAME"'@'%'" - if [ "$DB_TYPE" = postgres ]; then - sql="GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO \""$USERNAME"\"; GRANT ALL PRIVILEGES ON DATABASE \""$GRAND_DATABASE"\" to \""$USERNAME"\"; GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO \""$USERNAME"\"; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO \""$USERNAME"\"; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO \""$USERNAME"\"; GRANT USAGE ON SCHEMA public TO \""$USERNAME"\";" - fi - - if [ -s "$GRAND_DATABASE ]; then - aws rds-data execute-statement \ - --resource-arn "$DB_ARN" \ - --secret-arn "$SECRET_ARN" \ - --sql "$sql" \ - --database "$DB_TYPE" \ - --no-include-result-metadata - fi - """#, - ] - env: { - USERNAME: username - PASSWORD: password - DB_ARN: dbArn - SECRET_ARN: secretArn - GRAND_DATABASE: grantDatabase - DB_TYPE: dbType - } - }, - - op.#Export & { - source: "/username" - format: "string" - }, - ] - } @dagger(output) -} - -// Fetches information on an existing RDS Instance -#Instance: { - - // AWS Config - config: aws.#Config - - // ARN of the database instance - dbArn: string @dagger(input) - - // DB hostname - hostname: info.hostname @dagger(output) - - // DB port - port: info.port @dagger(output) - - info: { - hostname: string - port: int - } - - info: json.Unmarshal(out) @dagger(output) - out: { - string - - #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - #""" - data=$(aws rds describe-db-clusters --filters "Name=db-cluster-id,Values=$DB_URN" ) - echo "$data" | jq -r '.DBClusters[].Endpoint' > /tmp/out - echo "$data" | jq -r '.DBClusters[].Port' >> /tmp/out - cat /tmp/out | jq -sR 'split("\n") | {hostname: .[0], port: (.[1] | tonumber)}' > /out - """#, - ] - env: DB_ARN: dbArn - }, - - op.#Export & { - source: "/out" - format: "json" - }, - ] - } -} diff --git a/pkg/alpha.dagger.io/aws/s3/s3.cue b/pkg/alpha.dagger.io/aws/s3/s3.cue deleted file mode 100644 index 3235f713..00000000 --- a/pkg/alpha.dagger.io/aws/s3/s3.cue +++ /dev/null @@ -1,98 +0,0 @@ -// AWS Simple Storage Service -package s3 - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/aws" -) - -// S3 Bucket object(s) sync -#Object: { - - // AWS Config - config: aws.#Config - - // Source Artifact to upload to S3 - source: dagger.#Artifact @dagger(input) - - // Target S3 URL (eg. s3:////) - target: string @dagger(input) - - // Delete files that already exist on remote destination - delete: *false | true @dagger(input) - - // Object content type - contentType: string | *"" @dagger(input) - - // Always write the object to S3 - always: *true | false @dagger(input) - - // Upload method - uploadMethod: *"cp" | "sync" - - // URL of the uploaded S3 object - url: { - string - - #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - - op.#Exec & { - if always { - always: true - } - env: { - TARGET: target - OPT_CONTENT_TYPE: contentType - if delete { - OPT_DELETE: "1" - } - UPLOAD_METHOD: uploadMethod - } - - mount: "/source": from: source - - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - opts=() - case "$UPLOAD_METHOD" in - sync) - [ -n "$OPT_DELETE" ] && opts+="--delete" - opts+="--exact-timestamps" - ;; - cp) - opts+="--recursive" - ;; - *) - echo "not supported command" - exit 1 - ;; - esac - [ -n "$OPT_CONTENT_TYPE" ] && opts+="--content-type $OPT_CONTENT_TYPE" - [ -n "$OPT_DELETE" ] && opts+="--delete" - aws s3 "$UPLOAD_METHOD" ${opts[@]} /source "$TARGET" - echo -n "$TARGET" \ - | sed -E 's=^s3://([^/]*)/=https://\1.s3.amazonaws.com/=' \ - > /url - """#, - ] - }, - - op.#Export & { - source: "/url" - format: "string" - }, - ] - } @dagger(output) -} diff --git a/pkg/alpha.dagger.io/aws/s3/tests/s3.cue b/pkg/alpha.dagger.io/aws/s3/tests/s3.cue deleted file mode 100644 index ebb788c0..00000000 --- a/pkg/alpha.dagger.io/aws/s3/tests/s3.cue +++ /dev/null @@ -1,46 +0,0 @@ -package s3 - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/aws" - "alpha.dagger.io/random" -) - -TestConfig: awsConfig: aws.#Config & { - region: "us-east-2" -} - -bucket: "dagger-ci" - -content: "A simple test sentence" - -TestDirectory: dagger.#Artifact - -TestS3Object: { - suffix: random.#String & { - seed: "s3" - } - - target: "s3://\(bucket)/\(suffix.out)/" - - deploy: #Object & { - always: true - config: TestConfig.awsConfig - source: TestDirectory - "target": target - } - - verifyFile: #VerifyS3 & { - config: TestConfig.awsConfig - target: deploy.target - url: deploy.url - file: "dirFile.txt" - } - - verifyDir: #VerifyS3 & { - config: TestConfig.awsConfig - target: deploy.target - url: deploy.url - file: "foo.txt" - } -} diff --git a/pkg/alpha.dagger.io/aws/s3/tests/testdata/bar/foo.txt b/pkg/alpha.dagger.io/aws/s3/tests/testdata/bar/foo.txt deleted file mode 100644 index 616e65a3..00000000 --- a/pkg/alpha.dagger.io/aws/s3/tests/testdata/bar/foo.txt +++ /dev/null @@ -1 +0,0 @@ -Test recursivity \ No newline at end of file diff --git a/pkg/alpha.dagger.io/aws/s3/tests/testdata/dirFile.txt b/pkg/alpha.dagger.io/aws/s3/tests/testdata/dirFile.txt deleted file mode 100644 index 590f5066..00000000 --- a/pkg/alpha.dagger.io/aws/s3/tests/testdata/dirFile.txt +++ /dev/null @@ -1 +0,0 @@ -Test directory \ No newline at end of file diff --git a/pkg/alpha.dagger.io/aws/s3/tests/verify.cue b/pkg/alpha.dagger.io/aws/s3/tests/verify.cue deleted file mode 100644 index f27897ec..00000000 --- a/pkg/alpha.dagger.io/aws/s3/tests/verify.cue +++ /dev/null @@ -1,89 +0,0 @@ -package s3 - -import ( - "alpha.dagger.io/aws" - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger/op" -) - -#List: { - // AWS Config - config: aws.#Config - - // Target S3 URL (e.g. s3:////) - target: string - - // URL: dummy URL, used to force a dependency - url: string - - contents: { - string - - #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - aws s3 ls --recursive \#(target) > /contents - """#, - ] - env: URL: url - }, - - op.#Export & { - source: "/contents" - format: "string" - }, - ] - } -} - -#VerifyS3: { - file: string - config: aws.#Config - target: string - url: string - - lists: #List & { - "config": config - "target": target - "url": url - } - - test: #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - } - }, - - op.#WriteFile & { - dest: "/test" - content: lists.contents - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - "grep -q \(file) /test", - ] - }, - ] -} diff --git a/pkg/alpha.dagger.io/azure/azure.cue b/pkg/alpha.dagger.io/azure/azure.cue deleted file mode 100644 index b98bef5d..00000000 --- a/pkg/alpha.dagger.io/azure/azure.cue +++ /dev/null @@ -1,53 +0,0 @@ -// Azure base package -package azure - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/docker" - "alpha.dagger.io/os" -) - -// Default Azure CLI version -let defaultVersion = "2.27.1@sha256:1e117183100c9fce099ebdc189d73e506e7b02d2b73d767d3fc07caee72f9fb1" - -//Azure Config shared by all Azure packages -#Config: { - // AZURE tenant id - tenantId: dagger.#Secret & dagger.#Input - // AZURE subscription id - subscriptionId: dagger.#Secret & dagger.#Input - // AZURE app id for the service principal used - appId: dagger.#Secret & dagger.#Input - // AZURE password for the service principal used - password: dagger.#Secret & dagger.#Input -} - -// Azure Cli to be used by all Azure packages -#CLI: { - // Azure Config - config: #Config - - // Azure CLI version to install - version: string | *defaultVersion - - // Container image - os.#Container & { - image: docker.#Pull & { - from: "mcr.microsoft.com/azure-cli:\(version)" - } - - always: true - - command: """ - az login --service-principal -u "$(cat /run/secrets/appId)" -p "$(cat /run/secrets/password)" -t "$(cat /run/secrets/tenantId)" - az account set -s "$(cat /run/secrets/subscriptionId)" - """ - - secret: { - "/run/secrets/appId": config.appId - "/run/secrets/password": config.password - "/run/secrets/tenantId": config.tenantId - "/run/secrets/subscriptionId": config.subscriptionId - } - } -} diff --git a/pkg/alpha.dagger.io/azure/resourcegroup/rg.cue b/pkg/alpha.dagger.io/azure/resourcegroup/rg.cue deleted file mode 100644 index 5f2e7215..00000000 --- a/pkg/alpha.dagger.io/azure/resourcegroup/rg.cue +++ /dev/null @@ -1,48 +0,0 @@ -package resourcegroup - -import ( - "alpha.dagger.io/azure" - "alpha.dagger.io/os" - "alpha.dagger.io/dagger" -) - -// Create a resource group -#ResourceGroup: { - // Azure Config - config: azure.#Config - - // ResourceGroup name - rgName: string & dagger.#Input - - // ResourceGroup location - rgLocation: string & dagger.#Input - - // ResourceGroup Id - id: string & dagger.#Output - - // Container image - ctr: os.#Container & { - image: azure.#CLI & { - "config": config - } - always: true - - command: """ - az group create -l "$AZURE_DEFAULTS_LOCATION" -n "$AZURE_DEFAULTS_GROUP" - az group show -n "$AZURE_DEFAULTS_GROUP" --query "id" -o json | jq -r . | tr -d "\n" > /resourceGroupId - """ - - env: { - AZURE_DEFAULTS_GROUP: rgName - AZURE_DEFAULTS_LOCATION: rgLocation - } - } - - // Resource Id - id: ({ - os.#File & { - from: ctr - path: "/resourceGroupId" - } - }).contents -} diff --git a/pkg/alpha.dagger.io/azure/resourcegroup/tests/rg.cue b/pkg/alpha.dagger.io/azure/resourcegroup/tests/rg.cue deleted file mode 100644 index dc2eda0b..00000000 --- a/pkg/alpha.dagger.io/azure/resourcegroup/tests/rg.cue +++ /dev/null @@ -1,17 +0,0 @@ -package resourcegroup - -import ( - "alpha.dagger.io/azure" - "alpha.dagger.io/azure/resourcegroup" - "alpha.dagger.io/random" -) - -TestSuffix: random.#String & { - seed: "azrg" -} - -TestRG: resourcegroup.#ResourceGroup & { - config: azure.#Config - rgName: "rg-test-\(TestSuffix.out)" - rgLocation: "eastus2" -} diff --git a/pkg/alpha.dagger.io/azure/staticwebapp/stapp.cue b/pkg/alpha.dagger.io/azure/staticwebapp/stapp.cue deleted file mode 100644 index dd27f981..00000000 --- a/pkg/alpha.dagger.io/azure/staticwebapp/stapp.cue +++ /dev/null @@ -1,79 +0,0 @@ -package staticwebapp - -import ( - "alpha.dagger.io/azure" - "alpha.dagger.io/os" - "alpha.dagger.io/dagger" -) - -// Create a static web app -#StaticWebApp: { - // Azure Config - config: azure.#Config - - // ResourceGroup name in which to create static webapp - rgName: string & dagger.#Input - - // StaticWebApp location - stappLocation: string & dagger.#Input - - // StaticWebApp name - stappName: string & dagger.#Input - - // GitHubRepository URL - remote: string & dagger.#Input - - // GitHub Branch - ref: *"main" | string & dagger.#Input - - // Location of your application code - appLocation: *"/" | string & dagger.#Input - - // Location of your build artifacts - buildLocation: *"build" | string & dagger.#Input - - // GitHub Personal Access Token - authToken: dagger.#Secret & dagger.#Input - - // DefaultHostName generated by Azure - defaultHostName: string & dagger.#Output - - // Container image - ctr: os.#Container & { - image: azure.#CLI & { - "config": config - } - always: true - - command: #""" - az staticwebapp create -n "$AZURE_STATICWEBAPP_NAME" \ - -g "$AZURE_DEFAULTS_GROUP" \ - -l "$AZURE_DEFAULTS_LOCATION" \ - -s "$GIT_URL" \ - -b "$GIT_BRANCH" \ - -t "$(cat /run/secrets/git_pat)" \ - --app-location "$APP_LOCATION" \ - --output-location "$BUILD_LOCATION" | jq -r '.defaultHostname' | tr -d "\n" > /defaultHostName - """# - - secret: "/run/secrets/git_pat": authToken - - env: { - AZURE_DEFAULTS_GROUP: rgName - AZURE_DEFAULTS_LOCATION: stappLocation - AZURE_STATICWEBAPP_NAME: stappName - GIT_URL: remote - GIT_BRANCH: ref - APP_LOCATION: appLocation - BUILD_LOCATION: buildLocation - } - } - - // DefaultHostName generated by Azure - defaultHostName: ({ - os.#File & { - from: ctr - path: "/defaultHostName" - } - }).contents -} diff --git a/pkg/alpha.dagger.io/azure/staticwebapp/tests/stapp.cue b/pkg/alpha.dagger.io/azure/staticwebapp/tests/stapp.cue deleted file mode 100644 index 9c8def62..00000000 --- a/pkg/alpha.dagger.io/azure/staticwebapp/tests/stapp.cue +++ /dev/null @@ -1,31 +0,0 @@ -package staticwebapp - -import ( - "alpha.dagger.io/azure" - "alpha.dagger.io/azure/resourcegroup" - "alpha.dagger.io/azure/staticwebapp" - "alpha.dagger.io/random" - "strings" -) - -TestConfig: azConfig: azure.#Config & { -} - -TestSuffix: random.#String & { - seed: "azrg" -} - -TestRG: resourcegroup.#ResourceGroup & { - config: TestConfig.azConfig - rgName: "rg-test-\(TestSuffix.out)" - rgLocation: "eastus2" -} - -// rgName is obtained from above TestRG -TestSWA: staticwebapp.#StaticWebApp & { - config: TestRG.config - rgName: "\(strings.Split(TestRG.id, "/")[4])" - stappLocation: "eastus2" - stappName: "stapp-test-\(TestSuffix.out)" - remote: "https://github.com/sujaypillai/todoapp" -} diff --git a/pkg/alpha.dagger.io/azure/storage/st.cue b/pkg/alpha.dagger.io/azure/storage/st.cue deleted file mode 100644 index 40e3ee2e..00000000 --- a/pkg/alpha.dagger.io/azure/storage/st.cue +++ /dev/null @@ -1,52 +0,0 @@ -package storage - -import ( - "alpha.dagger.io/azure" - "alpha.dagger.io/os" - "alpha.dagger.io/dagger" -) - -// Create a storage account -#StorageAccount: { - // Azure Config - config: azure.#Config - - // ResourceGroup name - rgName: string & dagger.#Input - - // StorageAccount location - stLocation: string & dagger.#Input - - // StorageAccount name - stName: string & dagger.#Input - - // StorageAccount Id - id: string & dagger.#Output - - // Container image - ctr: os.#Container & { - image: azure.#CLI & { - "config": config - } - always: true - - command: """ - az storage account create -n "$AZURE_STORAGE_ACCOUNT" -g "$AZURE_DEFAULTS_GROUP" -l "$AZURE_DEFAULTS_LOCATION" - az storage account show -n "$AZURE_STORAGE_ACCOUNT" -g "$AZURE_DEFAULTS_GROUP" --query "id" -o json | jq -r . | tr -d "\n" > /storageAccountId - """ - - env: { - AZURE_DEFAULTS_GROUP: rgName - AZURE_DEFAULTS_LOCATION: stLocation - AZURE_STORAGE_ACCOUNT: stName - } - } - - // StorageAccount Id - id: ({ - os.#File & { - from: ctr - path: "/storageAccountId" - } - }).contents -} diff --git a/pkg/alpha.dagger.io/azure/storage/tests/st.cue b/pkg/alpha.dagger.io/azure/storage/tests/st.cue deleted file mode 100644 index 4c1b2480..00000000 --- a/pkg/alpha.dagger.io/azure/storage/tests/st.cue +++ /dev/null @@ -1,28 +0,0 @@ -package storage - -import ( - "alpha.dagger.io/azure" - "alpha.dagger.io/azure/resourcegroup" - "alpha.dagger.io/azure/storage" - "alpha.dagger.io/random" -) - -TestConfig: azureConfig: azure.#Config & { -} - -TestSuffix: random.#String & { - seed: "azst" -} - -TestRG: resourcegroup.#ResourceGroup & { - config: TestConfig.azureConfig - rgName: "rg-test-\(TestSuffix.out)" - rgLocation: "eastus2" -} - -TestStorage: storage.#StorageAccount & { - config: TestConfig.azureConfig - rgName: "rg-test-ahkkzwyoaucw" - stLocation: "eastus2" - stName: "st\(TestSuffix.out)001" -} diff --git a/pkg/alpha.dagger.io/bats/bats.cue b/pkg/alpha.dagger.io/bats/bats.cue deleted file mode 100644 index 35e6dcfb..00000000 --- a/pkg/alpha.dagger.io/bats/bats.cue +++ /dev/null @@ -1,56 +0,0 @@ -package bats - -import ( - "strings" - - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" - "alpha.dagger.io/alpine" -) - -#Bats: { - // Source containing bats files - source: dagger.#Artifact & dagger.#Input - - // bats options - options: [...string] - - // mount points passed to the bats container - mount: [string]: from: dagger.#Artifact - - // environment variables - env: [string]: string - - // socket mounts for the bats container - socket: [string]: dagger.#Stream - - // setup commands to run only once (for installing dependencies) - setupCommands: [...string] - - // init script to run right before bats - initScript: string | *"" - - defaultOptions: ["--print-output-on-failure", "--show-output-of-passing-tests"] - - ctr: os.#Container & { - image: alpine.#Image & { - package: curl: true - package: bash: true - package: jq: true - package: npm: true - package: git: true - } - shell: path: "/bin/bash" - setup: ["npm install -g bats"] + setupCommands - command: #""" - \#(initScript) - bats \#(strings.Join(defaultOptions, " ")) \#(strings.Join(options, " ")) ../src - """# - - dir: "/app" - "mount": mount - "mount": "/src": from: source - "env": env - "socket": socket - } -} diff --git a/pkg/alpha.dagger.io/bats/tests/bats.cue b/pkg/alpha.dagger.io/bats/tests/bats.cue deleted file mode 100644 index 74ce8269..00000000 --- a/pkg/alpha.dagger.io/bats/tests/bats.cue +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import ( - "alpha.dagger.io/bats" -) - -TestBats: bats.#Bats diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/CHANGELOG.md b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/CHANGELOG.md deleted file mode 100644 index 7e326f47..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - - -## [0.3.0] - 2016-03-22 - -### Removed - -- Move `fail()` to `bats-support` - - -## [0.2.0] - 2016-03-11 - -### Added - -- `refute()` to complement `assert()` -- `npm` support - -### Fixed - -- Not consuming the `--` when stopping option parsing in - `assert_output`, `refute_output`, `assert_line` and `refute_line` - - -## 0.1.0 - 2016-02-16 - -### Added - -- Reporting arbitrary failures with `fail()` -- Generic assertions with `assert()` and `assert_equal()` -- Testing exit status with `assert_success()` and `assert_failure()` -- Testing output with `assert_output()` and `refute_output()` -- Testing individual lines with `assert_line()` and `refute_line()` - - -[0.3.0]: https://github.com/ztombol/bats-assert/compare/v0.2.0...v0.3.0 -[0.2.0]: https://github.com/ztombol/bats-assert/compare/v0.1.0...v0.2.0 diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/LICENSE b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/LICENSE deleted file mode 100644 index 670154e3..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/LICENSE +++ /dev/null @@ -1,116 +0,0 @@ -CC0 1.0 Universal - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator and -subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for the -purpose of contributing to a commons of creative, cultural and scientific -works ("Commons") that the public can reliably and without fear of later -claims of infringement build upon, modify, incorporate in other works, reuse -and redistribute as freely as possible in any form whatsoever and for any -purposes, including without limitation commercial purposes. These owners may -contribute to the Commons to promote the ideal of a free culture and the -further production of creative, cultural and scientific works, or to gain -reputation or greater distribution for their Work in part through the use and -efforts of others. - -For these and/or other purposes and motivations, and without any expectation -of additional consideration or compensation, the person associating CC0 with a -Work (the "Affirmer"), to the extent that he or she is an owner of Copyright -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work -and publicly distribute the Work under its terms, with knowledge of his or her -Copyright and Related Rights in the Work and the meaning and intended legal -effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not limited -to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, communicate, - and translate a Work; - - ii. moral rights retained by the original author(s) and/or performer(s); - - iii. publicity and privacy rights pertaining to a person's image or likeness - depicted in a Work; - - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - - v. rights protecting the extraction, dissemination, use and reuse of data in - a Work; - - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation thereof, - including any amended or successor version of such directive); and - - vii. other similar, equivalent or corresponding rights throughout the world - based on applicable law or treaty, and any national implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention of, -applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and -unconditionally waives, abandons, and surrenders all of Affirmer's Copyright -and Related Rights and associated claims and causes of action, whether now -known or unknown (including existing as well as future claims and causes of -action), in the Work (i) in all territories worldwide, (ii) for the maximum -duration provided by applicable law or treaty (including future time -extensions), (iii) in any current or future medium and for any number of -copies, and (iv) for any purpose whatsoever, including without limitation -commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes -the Waiver for the benefit of each member of the public at large and to the -detriment of Affirmer's heirs and successors, fully intending that such Waiver -shall not be subject to revocation, rescission, cancellation, termination, or -any other legal or equitable action to disrupt the quiet enjoyment of the Work -by the public as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason be -judged legally invalid or ineffective under applicable law, then the Waiver -shall be preserved to the maximum extent permitted taking into account -Affirmer's express Statement of Purpose. In addition, to the extent the Waiver -is so judged Affirmer hereby grants to each affected person a royalty-free, -non transferable, non sublicensable, non exclusive, irrevocable and -unconditional license to exercise Affirmer's Copyright and Related Rights in -the Work (i) in all territories worldwide, (ii) for the maximum duration -provided by applicable law or treaty (including future time extensions), (iii) -in any current or future medium and for any number of copies, and (iv) for any -purpose whatsoever, including without limitation commercial, advertising or -promotional purposes (the "License"). The License shall be deemed effective as -of the date CC0 was applied by Affirmer to the Work. Should any part of the -License for any reason be judged legally invalid or ineffective under -applicable law, such partial invalidity or ineffectiveness shall not -invalidate the remainder of the License, and in such case Affirmer hereby -affirms that he or she will not (i) exercise any of his or her remaining -Copyright and Related Rights in the Work or (ii) assert any associated claims -and causes of action with respect to the Work, in either case contrary to -Affirmer's express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - - b. Affirmer offers the Work as-is and makes no representations or warranties - of any kind concerning the Work, express, implied, statutory or otherwise, - including without limitation warranties of title, merchantability, fitness - for a particular purpose, non infringement, or the absence of latent or - other defects, accuracy, or the present or absence of errors, whether or not - discoverable, all to the greatest extent permissible under applicable law. - - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without limitation - any person's Copyright and Related Rights in the Work. Further, Affirmer - disclaims responsibility for obtaining any necessary consents, permissions - or other rights required for any use of the Work. - - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to this - CC0 or use of the Work. - -For more information, please see - diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/README.md b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/README.md deleted file mode 100644 index dfe78a42..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/README.md +++ /dev/null @@ -1,712 +0,0 @@ -# bats-assert - -[![License](https://img.shields.io/npm/l/bats-assert.svg)](https://github.com/jasonkarns/bats-assert-1/blob/master/LICENSE) -[![GitHub release](https://img.shields.io/github/release/jasonkarns/bats-assert-1.svg)](https://github.com/jasonkarns/bats-assert-1/releases) -[![npm release](https://img.shields.io/npm/v/bats-assert.svg)](https://www.npmjs.com/package/bats-assert) -[![Build Status](https://travis-ci.org/jasonkarns/bats-assert-1.svg?branch=master)](https://travis-ci.org/jasonkarns/bats-assert-1) - -`bats-assert` is a helper library providing common assertions for -[Bats][bats]. - -Assertions are functions that perform a test and output relevant -information on failure to help debugging. They return 1 on failure and 0 -otherwise. Output, [formatted][bats-support-output] for readability, is -sent to the standard error to make assertions usable outside of `@test` -blocks too. - -Assertions testing exit code and output operate on the results of the -most recent invocation of `run`. - -Dependencies: -- [`bats-support`][bats-support] (formerly `bats-core`) - output - formatting - -See the [shared documentation][bats-docs] to learn how to install and -load this library. - - -## Usage - -### `assert` - -Fail if the given expression evaluates to false. - -***Note:*** *The expression must be a simple command. [Compound -commands][bash-comp-cmd], such as `[[`, can be used only when executed -with `bash -c`.* - -```bash -@test 'assert()' { - touch '/var/log/test.log' - assert [ -e '/var/log/test.log' ] -} -``` - -On failure, the failed expression is displayed. - -``` --- assertion failed -- -expression : [ -e /var/log/test.log ] --- -``` - - -### `refute` - -Fail if the given expression evaluates to true. - -***Note:*** *The expression must be a simple command. [Compound -commands][bash-comp-cmd], such as `[[`, can be used only when executed -with `bash -c`.* - -```bash -@test 'refute()' { - rm -f '/var/log/test.log' - refute [ -e '/var/log/test.log' ] -} -``` - -On failure, the successful expression is displayed. - -``` --- assertion succeeded, but it was expected to fail -- -expression : [ -e /var/log/test.log ] --- -``` - - -### `assert_equal` - -Fail if the two parameters, actual and expected value respectively, do -not equal. - -```bash -@test 'assert_equal()' { - assert_equal 'have' 'want' -} -``` - -On failure, the expected and actual values are displayed. - -``` --- values do not equal -- -expected : want -actual : have --- -``` - -If either value is longer than one line both are displayed in -*multi-line* format. - - -### `assert_success` - -Fail if `$status` is not 0. - -```bash -@test 'assert_success() status only' { - run bash -c "echo 'Error!'; exit 1" - assert_success -} -``` - -On failure, `$status` and `$output` are displayed. - -``` --- command failed -- -status : 1 -output : Error! --- -``` - -If `$output` is longer than one line, it is displayed in *multi-line* -format. - - -### `assert_failure` - -Fail if `$status` is 0. - -```bash -@test 'assert_failure() status only' { - run echo 'Success!' - assert_failure -} -``` - -On failure, `$output` is displayed. - -``` --- command succeeded, but it was expected to fail -- -output : Success! --- -``` - -If `$output` is longer than one line, it is displayed in *multi-line* -format. - -#### Expected status - -When one parameter is specified, fail if `$status` does not equal the -expected status specified by the parameter. - -```bash -@test 'assert_failure() with expected status' { - run bash -c "echo 'Error!'; exit 1" - assert_failure 2 -} -``` - -On failure, the expected and actual status, and `$output` are displayed. - -``` --- command failed as expected, but status differs -- -expected : 2 -actual : 1 -output : Error! --- -``` - -If `$output` is longer than one line, it is displayed in *multi-line* -format. - - -### `assert_output` - -This function helps to verify that a command or function produces the -correct output by checking that the specified expected output matches -the actual output. Matching can be literal (default), partial or regular -expression. This function is the logical complement of `refute_output`. - -#### Literal matching - -By default, literal matching is performed. The assertion fails if -`$output` does not equal the expected output. - -```bash -@test 'assert_output()' { - run echo 'have' - assert_output 'want' -} -``` - -On failure, the expected and actual output are displayed. - -``` --- output differs -- -expected : want -actual : have --- -``` - -If either value is longer than one line both are displayed in -*multi-line* format. - -#### Existence - -To assert that any (non-empty) output exists at all, simply omit the matching -argument. - -```bash -@test 'assert_output()' { - run echo 'have' - assert_output -} -``` - -On failure, an error message is displayed. - -``` --- no output -- -expected non-empty output, but output was empty --- -``` - -#### Partial matching - -Partial matching can be enabled with the `--partial` option (`-p` for -short). When used, the assertion fails if the expected *substring* is -not found in `$output`. - -```bash -@test 'assert_output() partial matching' { - run echo 'ERROR: no such file or directory' - assert_output --partial 'SUCCESS' -} -``` - -On failure, the substring and the output are displayed. - -``` --- output does not contain substring -- -substring : SUCCESS -output : ERROR: no such file or directory --- -``` - -This option and regular expression matching (`--regexp` or `-e`) are -mutually exclusive. An error is displayed when used simultaneously. - -#### Regular expression matching - -Regular expression matching can be enabled with the `--regexp` option -(`-e` for short). When used, the assertion fails if the *extended -regular expression* does not match `$output`. - -*Note: The anchors `^` and `$` bind to the beginning and the end of the -entire output (not individual lines), respectively.* - -```bash -@test 'assert_output() regular expression matching' { - run echo 'Foobar 0.1.0' - assert_output --regexp '^Foobar v[0-9]+\.[0-9]+\.[0-9]$' -} -``` - -On failure, the regular expression and the output are displayed. - -``` --- regular expression does not match output -- -regexp : ^Foobar v[0-9]+\.[0-9]+\.[0-9]$ -output : Foobar 0.1.0 --- -``` - -An error is displayed if the specified extended regular expression is -invalid. - -This option and partial matching (`--partial` or `-p`) are mutually -exclusive. An error is displayed when used simultaneously. - -#### Standard Input, HereDocs and HereStrings - -The expected output can be specified via standard input (also -heredoc/herestring) with the `-`/`--stdin` option. - -```bash -@test 'assert_output() with pipe' { - run echo 'hello' - echo 'hello' | assert_output - -} - -@test 'assert_output() with herestring' { - run echo 'hello' - assert_output - <<< hello -} -``` - - -### `refute_output` - -This function helps to verify that a command or function produces the -correct output by checking that the specified unexpected output does not -match the actual output. Matching can be literal (default), partial or -regular expression. This function is the logical complement of -`assert_output`. - -#### Literal matching - -By default, literal matching is performed. The assertion fails if -`$output` equals the unexpected output. - -```bash -@test 'refute_output()' { - run echo 'want' - refute_output 'want' -} -``` - -On failure, the output is displayed. - -``` --- output equals, but it was expected to differ -- -output : want --- -``` - -If output is longer than one line it is displayed in *multi-line* -format. - -#### Existence - -To assert that there is no output at all, simply omit the matching argument. - -```bash -@test 'refute_output()' { - run foo --silent - refute_output -} -``` - -On failure, an error message is displayed. - -``` --- unexpected output -- -expected no output, but output was non-empty --- -``` - -#### Partial matching - -Partial matching can be enabled with the `--partial` option (`-p` for -short). When used, the assertion fails if the unexpected *substring* is -found in `$output`. - -```bash -@test 'refute_output() partial matching' { - run echo 'ERROR: no such file or directory' - refute_output --partial 'ERROR' -} -``` - -On failure, the substring and the output are displayed. - -``` --- output should not contain substring -- -substring : ERROR -output : ERROR: no such file or directory --- -``` - -This option and regular expression matching (`--regexp` or `-e`) are -mutually exclusive. An error is displayed when used simultaneously. - -#### Regular expression matching - -Regular expression matching can be enabled with the `--regexp` option -(`-e` for short). When used, the assertion fails if the *extended -regular expression* matches `$output`. - -*Note: The anchors `^` and `$` bind to the beginning and the end of the -entire output (not individual lines), respectively.* - -```bash -@test 'refute_output() regular expression matching' { - run echo 'Foobar v0.1.0' - refute_output --regexp '^Foobar v[0-9]+\.[0-9]+\.[0-9]$' -} -``` - -On failure, the regular expression and the output are displayed. - -``` --- regular expression should not match output -- -regexp : ^Foobar v[0-9]+\.[0-9]+\.[0-9]$ -output : Foobar v0.1.0 --- -``` - -An error is displayed if the specified extended regular expression is -invalid. - -This option and partial matching (`--partial` or `-p`) are mutually -exclusive. An error is displayed when used simultaneously. - -#### Standard Input, HereDocs and HereStrings - -The unexpected output can be specified via standard input (also -heredoc/herestring) with the `-`/`--stdin` option. - -```bash -@test 'refute_output() with pipe' { - run echo 'hello' - echo 'world' | refute_output - -} - -@test 'refute_output() with herestring' { - run echo 'hello' - refute_output - <<< world -} -``` - - -### `assert_line` - -Similarly to `assert_output`, this function helps to verify that a -command or function produces the correct output. It checks that the -expected line appears in the output (default) or in a specific line of -it. Matching can be literal (default), partial or regular expression. -This function is the logical complement of `refute_line`. - -***Warning:*** *Due to a [bug in Bats][bats-93], empty lines are -discarded from `${lines[@]}`, causing line indices to change and -preventing testing for empty lines.* - -[bats-93]: https://github.com/sstephenson/bats/pull/93 - -#### Looking for a line in the output - -By default, the entire output is searched for the expected line. The -assertion fails if the expected line is not found in `${lines[@]}`. - -```bash -@test 'assert_line() looking for line' { - run echo $'have-0\nhave-1\nhave-2' - assert_line 'want' -} -``` - -On failure, the expected line and the output are displayed. - -***Warning:*** *The output displayed does not contain empty lines. See -the Warning above for more.* - -``` --- output does not contain line -- -line : want -output (3 lines): - have-0 - have-1 - have-2 --- -``` - -If output is not longer than one line, it is displayed in *two-column* -format. - -#### Matching a specific line - -When the `--index ` option is used (`-n ` for short) , the -expected line is matched only against the line identified by the given -index. The assertion fails if the expected line does not equal -`${lines[]}`. - -```bash -@test 'assert_line() specific line' { - run echo $'have-0\nhave-1\nhave-2' - assert_line --index 1 'want-1' -} -``` - -On failure, the index and the compared lines are displayed. - -``` --- line differs -- -index : 1 -expected : want-1 -actual : have-1 --- -``` - -#### Partial matching - -Partial matching can be enabled with the `--partial` option (`-p` for -short). When used, a match fails if the expected *substring* is not -found in the matched line. - -```bash -@test 'assert_line() partial matching' { - run echo $'have 1\nhave 2\nhave 3' - assert_line --partial 'want' -} -``` - -On failure, the same details are displayed as for literal matching, -except that the substring replaces the expected line. - -``` --- no output line contains substring -- -substring : want -output (3 lines): - have 1 - have 2 - have 3 --- -``` - -This option and regular expression matching (`--regexp` or `-e`) are -mutually exclusive. An error is displayed when used simultaneously. - -#### Regular expression matching - -Regular expression matching can be enabled with the `--regexp` option -(`-e` for short). When used, a match fails if the *extended regular -expression* does not match the line being tested. - -*Note: As expected, the anchors `^` and `$` bind to the beginning and -the end of the matched line, respectively.* - -```bash -@test 'assert_line() regular expression matching' { - run echo $'have-0\nhave-1\nhave-2' - assert_line --index 1 --regexp '^want-[0-9]$' -} -``` - -On failure, the same details are displayed as for literal matching, -except that the regular expression replaces the expected line. - -``` --- regular expression does not match line -- -index : 1 -regexp : ^want-[0-9]$ -line : have-1 --- -``` - -An error is displayed if the specified extended regular expression is -invalid. - -This option and partial matching (`--partial` or `-p`) are mutually -exclusive. An error is displayed when used simultaneously. - - -### `refute_line` - -Similarly to `refute_output`, this function helps to verify that a -command or function produces the correct output. It checks that the -unexpected line does not appear in the output (default) or in a specific -line of it. Matching can be literal (default), partial or regular -expression. This function is the logical complement of `assert_line`. - -***Warning:*** *Due to a [bug in Bats][bats-93], empty lines are -discarded from `${lines[@]}`, causing line indices to change and -preventing testing for empty lines.* - -[bats-93]: https://github.com/sstephenson/bats/pull/93 - -#### Looking for a line in the output - -By default, the entire output is searched for the unexpected line. The -assertion fails if the unexpected line is found in `${lines[@]}`. - -```bash -@test 'refute_line() looking for line' { - run echo $'have-0\nwant\nhave-2' - refute_line 'want' -} -``` - -On failure, the unexpected line, the index of its first match and the -output with the matching line highlighted are displayed. - -***Warning:*** *The output displayed does not contain empty lines. See -the Warning above for more.* - -``` --- line should not be in output -- -line : want -index : 1 -output (3 lines): - have-0 -> want - have-2 --- -``` - -If output is not longer than one line, it is displayed in *two-column* -format. - -#### Matching a specific line - -When the `--index ` option is used (`-n ` for short) , the -unexpected line is matched only against the line identified by the given -index. The assertion fails if the unexpected line equals -`${lines[]}`. - -```bash -@test 'refute_line() specific line' { - run echo $'have-0\nwant-1\nhave-2' - refute_line --index 1 'want-1' -} -``` - -On failure, the index and the unexpected line are displayed. - -``` --- line should differ -- -index : 1 -line : want-1 --- -``` - -#### Partial matching - -Partial matching can be enabled with the `--partial` option (`-p` for -short). When used, a match fails if the unexpected *substring* is found -in the matched line. - -```bash -@test 'refute_line() partial matching' { - run echo $'have 1\nwant 2\nhave 3' - refute_line --partial 'want' -} -``` - -On failure, in addition to the details of literal matching, the -substring is also displayed. When used with `--index ` the -substring replaces the unexpected line. - -``` --- no line should contain substring -- -substring : want -index : 1 -output (3 lines): - have 1 -> want 2 - have 3 --- -``` - -This option and regular expression matching (`--regexp` or `-e`) are -mutually exclusive. An error is displayed when used simultaneously. - -#### Regular expression matching - -Regular expression matching can be enabled with the `--regexp` option -(`-e` for short). When used, a match fails if the *extended regular -expression* matches the line being tested. - -*Note: As expected, the anchors `^` and `$` bind to the beginning and -the end of the matched line, respectively.* - -```bash -@test 'refute_line() regular expression matching' { - run echo $'Foobar v0.1.0\nRelease date: 2015-11-29' - refute_line --index 0 --regexp '^Foobar v[0-9]+\.[0-9]+\.[0-9]$' -} -``` - -On failure, in addition to the details of literal matching, the regular -expression is also displayed. When used with `--index ` the regular -expression replaces the unexpected line. - -``` --- regular expression should not match line -- -index : 0 -regexp : ^Foobar v[0-9]+\.[0-9]+\.[0-9]$ -line : Foobar v0.1.0 --- -``` - -An error is displayed if the specified extended regular expression is -invalid. - -This option and partial matching (`--partial` or `-p`) are mutually -exclusive. An error is displayed when used simultaneously. - - -## Options - -For functions that have options, `--` disables option parsing for the -remaining arguments to allow using arguments identical to one of the -allowed options. - -```bash -assert_output -- '-p' -``` - -Specifying `--` as an argument is similarly simple. - -```bash -refute_line -- '--' -``` - - - - -[bats]: https://github.com/sstephenson/bats -[bats-support-output]: https://github.com/ztombol/bats-support#output-formatting -[bats-support]: https://github.com/ztombol/bats-support -[bats-docs]: https://github.com/ztombol/bats-docs -[bash-comp-cmd]: https://www.gnu.org/software/bash/manual/bash.html#Compound-Commands diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/load.bash b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/load.bash deleted file mode 100644 index ac4a875a..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/load.bash +++ /dev/null @@ -1 +0,0 @@ -source "$(dirname "${BASH_SOURCE[0]}")/src/assert.bash" diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/package.json b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/package.json deleted file mode 100644 index 9a3fd991..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "bats-assert", - "version": "2.0.0", - "description": "Common assertions for Bats", - "homepage": "https://github.com/jasonkarns/bats-assert-1", - "license": "CC0-1.0", - "contributors": [ - "Zoltán Tömböl (https://github.com/ztombol)", - "Sam Stephenson (http://sstephenson.us/)", - "Jason Karns (http://jason.karns.name)", - "Mislav Marohnić (http://mislav.net/)", - "Tim Pope (https://github.com/tpope)" - ], - "repository": { - "type": "git", - "url": "https://github.com/jasonkarns/bats-assert-1.git" - }, - "bugs": { - "url": "https://github.com/jasonkarns/bats-assert-1/issues" - }, - "directories": { - "lib": "src", - "test": "test" - }, - "files": [ - "load.bash", - "src" - ], - "scripts": { - "postversion": "npm publish", - "prepublishOnly": "npm run publish:github", - "publish:github": "git push --follow-tags" - }, - "peerDependencies": { - "bats-support": "git+https://github.com/ztombol/bats-support.git#v0.2.0" - }, - "keywords": [ - "bats", - "bash", - "shell", - "test", - "unit", - "assert", - "assertion", - "helper" - ] -} diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/src/assert.bash b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/src/assert.bash deleted file mode 100644 index efe069a1..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-assert/src/assert.bash +++ /dev/null @@ -1,755 +0,0 @@ -# -# bats-assert - Common assertions for Bats -# -# Written in 2016 by Zoltan Tombol -# -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any -# warranty. -# -# You should have received a copy of the CC0 Public Domain Dedication -# along with this software. If not, see -# . -# - -# -# assert.bash -# ----------- -# -# Assertions are functions that perform a test and output relevant -# information on failure to help debugging. They return 1 on failure -# and 0 otherwise. -# -# All output is formatted for readability using the functions of -# `output.bash' and sent to the standard error. -# - -# Fail and display the expression if it evaluates to false. -# -# NOTE: The expression must be a simple command. Compound commands, such -# as `[[', can be used only when executed with `bash -c'. -# -# Globals: -# none -# Arguments: -# $1 - expression -# Returns: -# 0 - expression evaluates to TRUE -# 1 - otherwise -# Outputs: -# STDERR - details, on failure -assert() { - if ! "$@"; then - batslib_print_kv_single 10 'expression' "$*" \ - | batslib_decorate 'assertion failed' \ - | fail - fi -} - -# Fail and display the expression if it evaluates to true. -# -# NOTE: The expression must be a simple command. Compound commands, such -# as `[[', can be used only when executed with `bash -c'. -# -# Globals: -# none -# Arguments: -# $1 - expression -# Returns: -# 0 - expression evaluates to FALSE -# 1 - otherwise -# Outputs: -# STDERR - details, on failure -refute() { - if "$@"; then - batslib_print_kv_single 10 'expression' "$*" \ - | batslib_decorate 'assertion succeeded, but it was expected to fail' \ - | fail - fi -} - -# Fail and display details if the expected and actual values do not -# equal. Details include both values. -# -# Globals: -# none -# Arguments: -# $1 - actual value -# $2 - expected value -# Returns: -# 0 - values equal -# 1 - otherwise -# Outputs: -# STDERR - details, on failure -assert_equal() { - if [[ $1 != "$2" ]]; then - batslib_print_kv_single_or_multi 8 \ - 'expected' "$2" \ - 'actual' "$1" \ - | batslib_decorate 'values do not equal' \ - | fail - fi -} - -# Fail and display details if `$status' is not 0. Details include -# `$status' and `$output'. -# -# Globals: -# status -# output -# Arguments: -# none -# Returns: -# 0 - `$status' is 0 -# 1 - otherwise -# Outputs: -# STDERR - details, on failure -assert_success() { - if (( status != 0 )); then - { local -ir width=6 - batslib_print_kv_single "$width" 'status' "$status" - batslib_print_kv_single_or_multi "$width" 'output' "$output" - } | batslib_decorate 'command failed' \ - | fail - fi -} - -# Fail and display details if `$status' is 0. Details include `$output'. -# -# Optionally, when the expected status is specified, fail when it does -# not equal `$status'. In this case, details include the expected and -# actual status, and `$output'. -# -# Globals: -# status -# output -# Arguments: -# $1 - [opt] expected status -# Returns: -# 0 - `$status' is not 0, or -# `$status' equals the expected status -# 1 - otherwise -# Outputs: -# STDERR - details, on failure -assert_failure() { - (( $# > 0 )) && local -r expected="$1" - if (( status == 0 )); then - batslib_print_kv_single_or_multi 6 'output' "$output" \ - | batslib_decorate 'command succeeded, but it was expected to fail' \ - | fail - elif (( $# > 0 )) && (( status != expected )); then - { local -ir width=8 - batslib_print_kv_single "$width" \ - 'expected' "$expected" \ - 'actual' "$status" - batslib_print_kv_single_or_multi "$width" \ - 'output' "$output" - } | batslib_decorate 'command failed as expected, but status differs' \ - | fail - fi -} - -# Fail and display details if `$output' does not match the expected -# output. The expected output can be specified either by the first -# parameter or on the standard input. -# -# By default, literal matching is performed. The assertion fails if the -# expected output does not equal `$output'. Details include both values. -# -# Option `--partial' enables partial matching. The assertion fails if -# the expected substring cannot be found in `$output'. -# -# Option `--regexp' enables regular expression matching. The assertion -# fails if the extended regular expression does not match `$output'. An -# invalid regular expression causes an error to be displayed. -# -# It is an error to use partial and regular expression matching -# simultaneously. -# -# Globals: -# output -# Options: -# -p, --partial - partial matching -# -e, --regexp - extended regular expression matching -# -, --stdin - read expected output from the standard input -# Arguments: -# $1 - expected output -# Returns: -# 0 - expected matches the actual output -# 1 - otherwise -# Inputs: -# STDIN - [=$1] expected output -# Outputs: -# STDERR - details, on failure -# error message, on error -assert_output() { - local -i is_mode_partial=0 - local -i is_mode_regexp=0 - local -i is_mode_nonempty=0 - local -i use_stdin=0 - - # Handle options. - if (( $# == 0 )); then - is_mode_nonempty=1 - fi - - while (( $# > 0 )); do - case "$1" in - -p|--partial) is_mode_partial=1; shift ;; - -e|--regexp) is_mode_regexp=1; shift ;; - -|--stdin) use_stdin=1; shift ;; - --) shift; break ;; - *) break ;; - esac - done - - if (( is_mode_partial )) && (( is_mode_regexp )); then - echo "\`--partial' and \`--regexp' are mutually exclusive" \ - | batslib_decorate 'ERROR: assert_output' \ - | fail - return $? - fi - - # Arguments. - local expected - if (( use_stdin )); then - expected="$(cat -)" - else - expected="$1" - fi - - # Matching. - if (( is_mode_nonempty )); then - if [ -z "$output" ]; then - echo 'expected non-empty output, but output was empty' \ - | batslib_decorate 'no output' \ - | fail - fi - elif (( is_mode_regexp )); then - if [[ '' =~ $expected ]] || (( $? == 2 )); then - echo "Invalid extended regular expression: \`$expected'" \ - | batslib_decorate 'ERROR: assert_output' \ - | fail - elif ! [[ $output =~ $expected ]]; then - batslib_print_kv_single_or_multi 6 \ - 'regexp' "$expected" \ - 'output' "$output" \ - | batslib_decorate 'regular expression does not match output' \ - | fail - fi - elif (( is_mode_partial )); then - if [[ $output != *"$expected"* ]]; then - batslib_print_kv_single_or_multi 9 \ - 'substring' "$expected" \ - 'output' "$output" \ - | batslib_decorate 'output does not contain substring' \ - | fail - fi - else - if [[ $output != "$expected" ]]; then - batslib_print_kv_single_or_multi 8 \ - 'expected' "$expected" \ - 'actual' "$output" \ - | batslib_decorate 'output differs' \ - | fail - fi - fi -} - -# Fail and display details if `$output' matches the unexpected output. -# The unexpected output can be specified either by the first parameter -# or on the standard input. -# -# By default, literal matching is performed. The assertion fails if the -# unexpected output equals `$output'. Details include `$output'. -# -# Option `--partial' enables partial matching. The assertion fails if -# the unexpected substring is found in `$output'. The unexpected -# substring is added to details. -# -# Option `--regexp' enables regular expression matching. The assertion -# fails if the extended regular expression does matches `$output'. The -# regular expression is added to details. An invalid regular expression -# causes an error to be displayed. -# -# It is an error to use partial and regular expression matching -# simultaneously. -# -# Globals: -# output -# Options: -# -p, --partial - partial matching -# -e, --regexp - extended regular expression matching -# -, --stdin - read unexpected output from the standard input -# Arguments: -# $1 - unexpected output -# Returns: -# 0 - unexpected matches the actual output -# 1 - otherwise -# Inputs: -# STDIN - [=$1] unexpected output -# Outputs: -# STDERR - details, on failure -# error message, on error -refute_output() { - local -i is_mode_partial=0 - local -i is_mode_regexp=0 - local -i is_mode_empty=0 - local -i use_stdin=0 - - # Handle options. - if (( $# == 0 )); then - is_mode_empty=1 - fi - - while (( $# > 0 )); do - case "$1" in - -p|--partial) is_mode_partial=1; shift ;; - -e|--regexp) is_mode_regexp=1; shift ;; - -|--stdin) use_stdin=1; shift ;; - --) shift; break ;; - *) break ;; - esac - done - - if (( is_mode_partial )) && (( is_mode_regexp )); then - echo "\`--partial' and \`--regexp' are mutually exclusive" \ - | batslib_decorate 'ERROR: refute_output' \ - | fail - return $? - fi - - # Arguments. - local unexpected - if (( use_stdin )); then - unexpected="$(cat -)" - else - unexpected="$1" - fi - - if (( is_mode_regexp == 1 )) && [[ '' =~ $unexpected ]] || (( $? == 2 )); then - echo "Invalid extended regular expression: \`$unexpected'" \ - | batslib_decorate 'ERROR: refute_output' \ - | fail - return $? - fi - - # Matching. - if (( is_mode_empty )); then - if [ -n "$output" ]; then - batslib_print_kv_single_or_multi 6 \ - 'output' "$output" \ - | batslib_decorate 'output non-empty, but expected no output' \ - | fail - fi - elif (( is_mode_regexp )); then - if [[ $output =~ $unexpected ]] || (( $? == 0 )); then - batslib_print_kv_single_or_multi 6 \ - 'regexp' "$unexpected" \ - 'output' "$output" \ - | batslib_decorate 'regular expression should not match output' \ - | fail - fi - elif (( is_mode_partial )); then - if [[ $output == *"$unexpected"* ]]; then - batslib_print_kv_single_or_multi 9 \ - 'substring' "$unexpected" \ - 'output' "$output" \ - | batslib_decorate 'output should not contain substring' \ - | fail - fi - else - if [[ $output == "$unexpected" ]]; then - batslib_print_kv_single_or_multi 6 \ - 'output' "$output" \ - | batslib_decorate 'output equals, but it was expected to differ' \ - | fail - fi - fi -} - -# Fail and display details if the expected line is not found in the -# output (default) or in a specific line of it. -# -# By default, the entire output is searched for the expected line. The -# expected line is matched against every element of `${lines[@]}'. If no -# match is found, the assertion fails. Details include the expected line -# and `${lines[@]}'. -# -# When `--index ' is specified, only the -th line is matched. -# If the expected line does not match `${lines[]}', the assertion -# fails. Details include and the compared lines. -# -# By default, literal matching is performed. A literal match fails if -# the expected string does not equal the matched string. -# -# Option `--partial' enables partial matching. A partial match fails if -# the expected substring is not found in the target string. -# -# Option `--regexp' enables regular expression matching. A regular -# expression match fails if the extended regular expression does not -# match the target string. An invalid regular expression causes an error -# to be displayed. -# -# It is an error to use partial and regular expression matching -# simultaneously. -# -# Mandatory arguments to long options are mandatory for short options -# too. -# -# Globals: -# output -# lines -# Options: -# -n, --index - match the -th line -# -p, --partial - partial matching -# -e, --regexp - extended regular expression matching -# Arguments: -# $1 - expected line -# Returns: -# 0 - match found -# 1 - otherwise -# Outputs: -# STDERR - details, on failure -# error message, on error -# FIXME(ztombol): Display `${lines[@]}' instead of `$output'! -assert_line() { - local -i is_match_line=0 - local -i is_mode_partial=0 - local -i is_mode_regexp=0 - - # Handle options. - while (( $# > 0 )); do - case "$1" in - -n|--index) - if (( $# < 2 )) || ! [[ $2 =~ ^([0-9]|[1-9][0-9]+)$ ]]; then - echo "\`--index' requires an integer argument: \`$2'" \ - | batslib_decorate 'ERROR: assert_line' \ - | fail - return $? - fi - is_match_line=1 - local -ri idx="$2" - shift 2 - ;; - -p|--partial) is_mode_partial=1; shift ;; - -e|--regexp) is_mode_regexp=1; shift ;; - --) shift; break ;; - *) break ;; - esac - done - - if (( is_mode_partial )) && (( is_mode_regexp )); then - echo "\`--partial' and \`--regexp' are mutually exclusive" \ - | batslib_decorate 'ERROR: assert_line' \ - | fail - return $? - fi - - # Arguments. - local -r expected="$1" - - if (( is_mode_regexp == 1 )) && [[ '' =~ $expected ]] || (( $? == 2 )); then - echo "Invalid extended regular expression: \`$expected'" \ - | batslib_decorate 'ERROR: assert_line' \ - | fail - return $? - fi - - # Matching. - if (( is_match_line )); then - # Specific line. - if (( is_mode_regexp )); then - if ! [[ ${lines[$idx]} =~ $expected ]]; then - batslib_print_kv_single 6 \ - 'index' "$idx" \ - 'regexp' "$expected" \ - 'line' "${lines[$idx]}" \ - | batslib_decorate 'regular expression does not match line' \ - | fail - fi - elif (( is_mode_partial )); then - if [[ ${lines[$idx]} != *"$expected"* ]]; then - batslib_print_kv_single 9 \ - 'index' "$idx" \ - 'substring' "$expected" \ - 'line' "${lines[$idx]}" \ - | batslib_decorate 'line does not contain substring' \ - | fail - fi - else - if [[ ${lines[$idx]} != "$expected" ]]; then - batslib_print_kv_single 8 \ - 'index' "$idx" \ - 'expected' "$expected" \ - 'actual' "${lines[$idx]}" \ - | batslib_decorate 'line differs' \ - | fail - fi - fi - else - # Contained in output. - if (( is_mode_regexp )); then - local -i idx - for (( idx = 0; idx < ${#lines[@]}; ++idx )); do - [[ ${lines[$idx]} =~ $expected ]] && return 0 - done - { local -ar single=( - 'regexp' "$expected" - ) - local -ar may_be_multi=( - 'output' "$output" - ) - local -ir width="$( batslib_get_max_single_line_key_width \ - "${single[@]}" "${may_be_multi[@]}" )" - batslib_print_kv_single "$width" "${single[@]}" - batslib_print_kv_single_or_multi "$width" "${may_be_multi[@]}" - } | batslib_decorate 'no output line matches regular expression' \ - | fail - elif (( is_mode_partial )); then - local -i idx - for (( idx = 0; idx < ${#lines[@]}; ++idx )); do - [[ ${lines[$idx]} == *"$expected"* ]] && return 0 - done - { local -ar single=( - 'substring' "$expected" - ) - local -ar may_be_multi=( - 'output' "$output" - ) - local -ir width="$( batslib_get_max_single_line_key_width \ - "${single[@]}" "${may_be_multi[@]}" )" - batslib_print_kv_single "$width" "${single[@]}" - batslib_print_kv_single_or_multi "$width" "${may_be_multi[@]}" - } | batslib_decorate 'no output line contains substring' \ - | fail - else - local -i idx - for (( idx = 0; idx < ${#lines[@]}; ++idx )); do - [[ ${lines[$idx]} == "$expected" ]] && return 0 - done - { local -ar single=( - 'line' "$expected" - ) - local -ar may_be_multi=( - 'output' "$output" - ) - local -ir width="$( batslib_get_max_single_line_key_width \ - "${single[@]}" "${may_be_multi[@]}" )" - batslib_print_kv_single "$width" "${single[@]}" - batslib_print_kv_single_or_multi "$width" "${may_be_multi[@]}" - } | batslib_decorate 'output does not contain line' \ - | fail - fi - fi -} - -# Fail and display details if the unexpected line is found in the output -# (default) or in a specific line of it. -# -# By default, the entire output is searched for the unexpected line. The -# unexpected line is matched against every element of `${lines[@]}'. If -# a match is found, the assertion fails. Details include the unexpected -# line, the index of the first match and `${lines[@]}' with the matching -# line highlighted if `${lines[@]}' is longer than one line. -# -# When `--index ' is specified, only the -th line is matched. -# If the unexpected line matches `${lines[]}', the assertion fails. -# Details include and the unexpected line. -# -# By default, literal matching is performed. A literal match fails if -# the unexpected string does not equal the matched string. -# -# Option `--partial' enables partial matching. A partial match fails if -# the unexpected substring is found in the target string. When used with -# `--index ', the unexpected substring is also displayed on -# failure. -# -# Option `--regexp' enables regular expression matching. A regular -# expression match fails if the extended regular expression matches the -# target string. When used with `--index ', the regular expression -# is also displayed on failure. An invalid regular expression causes an -# error to be displayed. -# -# It is an error to use partial and regular expression matching -# simultaneously. -# -# Mandatory arguments to long options are mandatory for short options -# too. -# -# Globals: -# output -# lines -# Options: -# -n, --index - match the -th line -# -p, --partial - partial matching -# -e, --regexp - extended regular expression matching -# Arguments: -# $1 - unexpected line -# Returns: -# 0 - match not found -# 1 - otherwise -# Outputs: -# STDERR - details, on failure -# error message, on error -# FIXME(ztombol): Display `${lines[@]}' instead of `$output'! -refute_line() { - local -i is_match_line=0 - local -i is_mode_partial=0 - local -i is_mode_regexp=0 - - # Handle options. - while (( $# > 0 )); do - case "$1" in - -n|--index) - if (( $# < 2 )) || ! [[ $2 =~ ^([0-9]|[1-9][0-9]+)$ ]]; then - echo "\`--index' requires an integer argument: \`$2'" \ - | batslib_decorate 'ERROR: refute_line' \ - | fail - return $? - fi - is_match_line=1 - local -ri idx="$2" - shift 2 - ;; - -p|--partial) is_mode_partial=1; shift ;; - -e|--regexp) is_mode_regexp=1; shift ;; - --) shift; break ;; - *) break ;; - esac - done - - if (( is_mode_partial )) && (( is_mode_regexp )); then - echo "\`--partial' and \`--regexp' are mutually exclusive" \ - | batslib_decorate 'ERROR: refute_line' \ - | fail - return $? - fi - - # Arguments. - local -r unexpected="$1" - - if (( is_mode_regexp == 1 )) && [[ '' =~ $unexpected ]] || (( $? == 2 )); then - echo "Invalid extended regular expression: \`$unexpected'" \ - | batslib_decorate 'ERROR: refute_line' \ - | fail - return $? - fi - - # Matching. - if (( is_match_line )); then - # Specific line. - if (( is_mode_regexp )); then - if [[ ${lines[$idx]} =~ $unexpected ]] || (( $? == 0 )); then - batslib_print_kv_single 6 \ - 'index' "$idx" \ - 'regexp' "$unexpected" \ - 'line' "${lines[$idx]}" \ - | batslib_decorate 'regular expression should not match line' \ - | fail - fi - elif (( is_mode_partial )); then - if [[ ${lines[$idx]} == *"$unexpected"* ]]; then - batslib_print_kv_single 9 \ - 'index' "$idx" \ - 'substring' "$unexpected" \ - 'line' "${lines[$idx]}" \ - | batslib_decorate 'line should not contain substring' \ - | fail - fi - else - if [[ ${lines[$idx]} == "$unexpected" ]]; then - batslib_print_kv_single 5 \ - 'index' "$idx" \ - 'line' "${lines[$idx]}" \ - | batslib_decorate 'line should differ' \ - | fail - fi - fi - else - # Line contained in output. - if (( is_mode_regexp )); then - local -i idx - for (( idx = 0; idx < ${#lines[@]}; ++idx )); do - if [[ ${lines[$idx]} =~ $unexpected ]]; then - { local -ar single=( - 'regexp' "$unexpected" - 'index' "$idx" - ) - local -a may_be_multi=( - 'output' "$output" - ) - local -ir width="$( batslib_get_max_single_line_key_width \ - "${single[@]}" "${may_be_multi[@]}" )" - batslib_print_kv_single "$width" "${single[@]}" - if batslib_is_single_line "${may_be_multi[1]}"; then - batslib_print_kv_single "$width" "${may_be_multi[@]}" - else - may_be_multi[1]="$( printf '%s' "${may_be_multi[1]}" \ - | batslib_prefix \ - | batslib_mark '>' "$idx" )" - batslib_print_kv_multi "${may_be_multi[@]}" - fi - } | batslib_decorate 'no line should match the regular expression' \ - | fail - return $? - fi - done - elif (( is_mode_partial )); then - local -i idx - for (( idx = 0; idx < ${#lines[@]}; ++idx )); do - if [[ ${lines[$idx]} == *"$unexpected"* ]]; then - { local -ar single=( - 'substring' "$unexpected" - 'index' "$idx" - ) - local -a may_be_multi=( - 'output' "$output" - ) - local -ir width="$( batslib_get_max_single_line_key_width \ - "${single[@]}" "${may_be_multi[@]}" )" - batslib_print_kv_single "$width" "${single[@]}" - if batslib_is_single_line "${may_be_multi[1]}"; then - batslib_print_kv_single "$width" "${may_be_multi[@]}" - else - may_be_multi[1]="$( printf '%s' "${may_be_multi[1]}" \ - | batslib_prefix \ - | batslib_mark '>' "$idx" )" - batslib_print_kv_multi "${may_be_multi[@]}" - fi - } | batslib_decorate 'no line should contain substring' \ - | fail - return $? - fi - done - else - local -i idx - for (( idx = 0; idx < ${#lines[@]}; ++idx )); do - if [[ ${lines[$idx]} == "$unexpected" ]]; then - { local -ar single=( - 'line' "$unexpected" - 'index' "$idx" - ) - local -a may_be_multi=( - 'output' "$output" - ) - local -ir width="$( batslib_get_max_single_line_key_width \ - "${single[@]}" "${may_be_multi[@]}" )" - batslib_print_kv_single "$width" "${single[@]}" - if batslib_is_single_line "${may_be_multi[1]}"; then - batslib_print_kv_single "$width" "${may_be_multi[@]}" - else - may_be_multi[1]="$( printf '%s' "${may_be_multi[1]}" \ - | batslib_prefix \ - | batslib_mark '>' "$idx" )" - batslib_print_kv_multi "${may_be_multi[@]}" - fi - } | batslib_decorate 'line should not be in output' \ - | fail - return $? - fi - done - fi - fi -} diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/.travis.yml b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/.travis.yml deleted file mode 100644 index 75721f28..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: bash -before_install: - - ./script/install-bats.sh -before_script: - - export PATH="${HOME}/.local/bin:${PATH}" -script: - - bats test diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/CHANGELOG.md b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/CHANGELOG.md deleted file mode 100644 index 3ac6fbcb..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/CHANGELOG.md +++ /dev/null @@ -1,37 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - - -## [0.2.0] - 2016-03-22 - -### Added - -- `npm` support -- Reporting arbitrary failures with `fail()` (moved from `bats-assert`) - -### Changed - -- Library renamed to `bats-support` - - -## 0.1.0 - 2016-02-16 - -### Added - -- Two-column key-value formatting with `batslib_print_kv_single()` -- Multi-line key-value formatting with `batslib_print_kv_multi()` -- Mixed formatting with `batslib_print_kv_single_or_multi()` -- Header and footer decoration with `batslib_decorate()` -- Prefixing lines with `batslib_prefix()` -- Marking lines with `batslib_mark()` -- Common output function `batslib_err()` -- Line counting with `batslib_count_lines()` -- Checking whether a text is one line long with - `batslib_is_single_line()` -- Determining key width for two-column and mixed formatting with - `batslib_get_max_single_line_key_width()` - - -[0.2.0]: https://github.com/ztombol/bats-support/compare/v0.1.0...v0.2.0 diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/LICENSE b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/LICENSE deleted file mode 100644 index 670154e3..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/LICENSE +++ /dev/null @@ -1,116 +0,0 @@ -CC0 1.0 Universal - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator and -subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for the -purpose of contributing to a commons of creative, cultural and scientific -works ("Commons") that the public can reliably and without fear of later -claims of infringement build upon, modify, incorporate in other works, reuse -and redistribute as freely as possible in any form whatsoever and for any -purposes, including without limitation commercial purposes. These owners may -contribute to the Commons to promote the ideal of a free culture and the -further production of creative, cultural and scientific works, or to gain -reputation or greater distribution for their Work in part through the use and -efforts of others. - -For these and/or other purposes and motivations, and without any expectation -of additional consideration or compensation, the person associating CC0 with a -Work (the "Affirmer"), to the extent that he or she is an owner of Copyright -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work -and publicly distribute the Work under its terms, with knowledge of his or her -Copyright and Related Rights in the Work and the meaning and intended legal -effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not limited -to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, communicate, - and translate a Work; - - ii. moral rights retained by the original author(s) and/or performer(s); - - iii. publicity and privacy rights pertaining to a person's image or likeness - depicted in a Work; - - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - - v. rights protecting the extraction, dissemination, use and reuse of data in - a Work; - - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation thereof, - including any amended or successor version of such directive); and - - vii. other similar, equivalent or corresponding rights throughout the world - based on applicable law or treaty, and any national implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention of, -applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and -unconditionally waives, abandons, and surrenders all of Affirmer's Copyright -and Related Rights and associated claims and causes of action, whether now -known or unknown (including existing as well as future claims and causes of -action), in the Work (i) in all territories worldwide, (ii) for the maximum -duration provided by applicable law or treaty (including future time -extensions), (iii) in any current or future medium and for any number of -copies, and (iv) for any purpose whatsoever, including without limitation -commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes -the Waiver for the benefit of each member of the public at large and to the -detriment of Affirmer's heirs and successors, fully intending that such Waiver -shall not be subject to revocation, rescission, cancellation, termination, or -any other legal or equitable action to disrupt the quiet enjoyment of the Work -by the public as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason be -judged legally invalid or ineffective under applicable law, then the Waiver -shall be preserved to the maximum extent permitted taking into account -Affirmer's express Statement of Purpose. In addition, to the extent the Waiver -is so judged Affirmer hereby grants to each affected person a royalty-free, -non transferable, non sublicensable, non exclusive, irrevocable and -unconditional license to exercise Affirmer's Copyright and Related Rights in -the Work (i) in all territories worldwide, (ii) for the maximum duration -provided by applicable law or treaty (including future time extensions), (iii) -in any current or future medium and for any number of copies, and (iv) for any -purpose whatsoever, including without limitation commercial, advertising or -promotional purposes (the "License"). The License shall be deemed effective as -of the date CC0 was applied by Affirmer to the Work. Should any part of the -License for any reason be judged legally invalid or ineffective under -applicable law, such partial invalidity or ineffectiveness shall not -invalidate the remainder of the License, and in such case Affirmer hereby -affirms that he or she will not (i) exercise any of his or her remaining -Copyright and Related Rights in the Work or (ii) assert any associated claims -and causes of action with respect to the Work, in either case contrary to -Affirmer's express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - - b. Affirmer offers the Work as-is and makes no representations or warranties - of any kind concerning the Work, express, implied, statutory or otherwise, - including without limitation warranties of title, merchantability, fitness - for a particular purpose, non infringement, or the absence of latent or - other defects, accuracy, or the present or absence of errors, whether or not - discoverable, all to the greatest extent permissible under applicable law. - - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without limitation - any person's Copyright and Related Rights in the Work. Further, Affirmer - disclaims responsibility for obtaining any necessary consents, permissions - or other rights required for any use of the Work. - - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to this - CC0 or use of the Work. - -For more information, please see - diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/README.md b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/README.md deleted file mode 100644 index 9b086b89..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/README.md +++ /dev/null @@ -1,128 +0,0 @@ -*__Important:__ `bats-core` has been renamed to `bats-support`. GitHub -automatically redirects all references, e.g. submodules and clones will -continue to work, but you are encouraged to [update][github-rename] -them. Version numbering continues where `bats-core` left off.* - -[github-rename]: https://help.github.com/articles/renaming-a-repository/ - -- - - - - - -# bats-support - -[![GitHub license](https://img.shields.io/badge/license-CC0-blue.svg)](https://raw.githubusercontent.com/ztombol/bats-support/master/LICENSE) -[![GitHub release](https://img.shields.io/github/release/ztombol/bats-support.svg)](https://github.com/ztombol/bats-support/releases/latest) -[![Build Status](https://travis-ci.org/ztombol/bats-support.svg?branch=master)](https://travis-ci.org/ztombol/bats-support) - -`bats-support` is a supporting library providing common functions to -test helper libraries written for [Bats][bats]. - -Features: -- [error reporting](#error-reporting) -- [output formatting](#output-formatting) - -See the [shared documentation][bats-docs] to learn how to install and -load this library. - -If you want to use this library in your own helpers or just want to -learn about its internals see the developer documentation in the [source -files](src). - - -## Error reporting - -### `fail` - -Display an error message and fail. This function provides a convenient -way to report failure in arbitrary situations. You can use it to -implement your own helpers when the ones available do not meet your -needs. Other functions use it internally as well. - -```bash -@test 'fail()' { - fail 'this test always fails' -} -``` - -The message can also be specified on the standard input. - -```bash -@test 'fail() with pipe' { - echo 'this test always fails' | fail -} -``` - -This function always fails and simply outputs the given message. - -``` -this test always fails -``` - - -## Output formatting - -Many test helpers need to produce human readable output. This library -provides a simple way to format simple messages and key value pairs, and -display them on the standard error. - - -### Simple message - -Simple messages without structure, e.g. one-line error messages, are -simply wrapped in a header and a footer to help them stand out. - -``` --- ERROR: assert_output -- -`--partial' and `--regexp' are mutually exclusive --- -``` - - -### Key-Value pairs - -Some helpers, e.g. [assertions][bats-assert], structure output as -key-value pairs. This library provides two ways to format them. - -When the value is one line long, a pair can be displayed in a columnar -fashion called ***two-column*** format. - -``` --- output differs -- -expected : want -actual : have --- -``` - -When the value is longer than one line, the key and value must be -displayed on separate lines. First, the key is displayed along with the -number of lines in the value. Then, the value, indented by two spaces -for added readability, starting on the next line. This is called -***multi-line*** format. - -``` --- command failed -- -status : 1 -output (2 lines): - Error! Something went terribly wrong! - Our engineers are panicking... \`>`;/ --- -``` - -Sometimes, for clarity, it is a good idea to display related values also -in this format, even if they are just one line long. - -``` --- output differs -- -expected (1 lines): - want -actual (3 lines): - have 1 - have 2 - have 3 --- -``` - - - -[bats]: https://github.com/sstephenson/bats -[bats-docs]: https://github.com/ztombol/bats-docs -[bats-assert]: https://github.com/ztombol/bats-assert diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/load.bash b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/load.bash deleted file mode 100644 index 0d4a5ac9..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/load.bash +++ /dev/null @@ -1,2 +0,0 @@ -source "$(dirname "${BASH_SOURCE[0]}")/src/output.bash" -source "$(dirname "${BASH_SOURCE[0]}")/src/error.bash" diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/package.json b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/package.json deleted file mode 100644 index ac1128dc..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "bats-support", - "version": "0.2.0", - "private": true -} diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/script/install-bats.sh b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/script/install-bats.sh deleted file mode 100755 index 4c3161a4..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/script/install-bats.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -o errexit -set -o xtrace - -git clone --depth 1 https://github.com/sstephenson/bats -cd bats && ./install.sh "${HOME}/.local" && cd .. && rm -rf bats diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/src/error.bash b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/src/error.bash deleted file mode 100644 index e5d97912..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/src/error.bash +++ /dev/null @@ -1,41 +0,0 @@ -# -# bats-support - Supporting library for Bats test helpers -# -# Written in 2016 by Zoltan Tombol -# -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any -# warranty. -# -# You should have received a copy of the CC0 Public Domain Dedication -# along with this software. If not, see -# . -# - -# -# error.bash -# ---------- -# -# Functions implementing error reporting. Used by public helper -# functions or test suits directly. -# - -# Fail and display a message. When no parameters are specified, the -# message is read from the standard input. Other functions use this to -# report failure. -# -# Globals: -# none -# Arguments: -# $@ - [=STDIN] message -# Returns: -# 1 - always -# Inputs: -# STDIN - [=$@] message -# Outputs: -# STDERR - message -fail() { - (( $# == 0 )) && batslib_err || batslib_err "$@" - return 1 -} diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/src/output.bash b/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/src/output.bash deleted file mode 100644 index c6cf6a6b..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/mods/bats-support/src/output.bash +++ /dev/null @@ -1,279 +0,0 @@ -# -# bats-support - Supporting library for Bats test helpers -# -# Written in 2016 by Zoltan Tombol -# -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any -# warranty. -# -# You should have received a copy of the CC0 Public Domain Dedication -# along with this software. If not, see -# . -# - -# -# output.bash -# ----------- -# -# Private functions implementing output formatting. Used by public -# helper functions. -# - -# Print a message to the standard error. When no parameters are -# specified, the message is read from the standard input. -# -# Globals: -# none -# Arguments: -# $@ - [=STDIN] message -# Returns: -# none -# Inputs: -# STDIN - [=$@] message -# Outputs: -# STDERR - message -batslib_err() { - { if (( $# > 0 )); then - echo "$@" - else - cat - - fi - } >&2 -} - -# Count the number of lines in the given string. -# -# TODO(ztombol): Fix tests and remove this note after #93 is resolved! -# NOTE: Due to a bug in Bats, `batslib_count_lines "$output"' does not -# give the same result as `${#lines[@]}' when the output contains -# empty lines. -# See PR #93 (https://github.com/sstephenson/bats/pull/93). -# -# Globals: -# none -# Arguments: -# $1 - string -# Returns: -# none -# Outputs: -# STDOUT - number of lines -batslib_count_lines() { - local -i n_lines=0 - local line - while IFS='' read -r line || [[ -n $line ]]; do - (( ++n_lines )) - done < <(printf '%s' "$1") - echo "$n_lines" -} - -# Determine whether all strings are single-line. -# -# Globals: -# none -# Arguments: -# $@ - strings -# Returns: -# 0 - all strings are single-line -# 1 - otherwise -batslib_is_single_line() { - for string in "$@"; do - (( $(batslib_count_lines "$string") > 1 )) && return 1 - done - return 0 -} - -# Determine the length of the longest key that has a single-line value. -# -# This function is useful in determining the correct width of the key -# column in two-column format when some keys may have multi-line values -# and thus should be excluded. -# -# Globals: -# none -# Arguments: -# $odd - key -# $even - value of the previous key -# Returns: -# none -# Outputs: -# STDOUT - length of longest key -batslib_get_max_single_line_key_width() { - local -i max_len=-1 - while (( $# != 0 )); do - local -i key_len="${#1}" - batslib_is_single_line "$2" && (( key_len > max_len )) && max_len="$key_len" - shift 2 - done - echo "$max_len" -} - -# Print key-value pairs in two-column format. -# -# Keys are displayed in the first column, and their corresponding values -# in the second. To evenly line up values, the key column is fixed-width -# and its width is specified with the first parameter (possibly computed -# using `batslib_get_max_single_line_key_width'). -# -# Globals: -# none -# Arguments: -# $1 - width of key column -# $even - key -# $odd - value of the previous key -# Returns: -# none -# Outputs: -# STDOUT - formatted key-value pairs -batslib_print_kv_single() { - local -ir col_width="$1"; shift - while (( $# != 0 )); do - printf '%-*s : %s\n' "$col_width" "$1" "$2" - shift 2 - done -} - -# Print key-value pairs in multi-line format. -# -# The key is displayed first with the number of lines of its -# corresponding value in parenthesis. Next, starting on the next line, -# the value is displayed. For better readability, it is recommended to -# indent values using `batslib_prefix'. -# -# Globals: -# none -# Arguments: -# $odd - key -# $even - value of the previous key -# Returns: -# none -# Outputs: -# STDOUT - formatted key-value pairs -batslib_print_kv_multi() { - while (( $# != 0 )); do - printf '%s (%d lines):\n' "$1" "$( batslib_count_lines "$2" )" - printf '%s\n' "$2" - shift 2 - done -} - -# Print all key-value pairs in either two-column or multi-line format -# depending on whether all values are single-line. -# -# If all values are single-line, print all pairs in two-column format -# with the specified key column width (identical to using -# `batslib_print_kv_single'). -# -# Otherwise, print all pairs in multi-line format after indenting values -# with two spaces for readability (identical to using `batslib_prefix' -# and `batslib_print_kv_multi') -# -# Globals: -# none -# Arguments: -# $1 - width of key column (for two-column format) -# $even - key -# $odd - value of the previous key -# Returns: -# none -# Outputs: -# STDOUT - formatted key-value pairs -batslib_print_kv_single_or_multi() { - local -ir width="$1"; shift - local -a pairs=( "$@" ) - - local -a values=() - local -i i - for (( i=1; i < ${#pairs[@]}; i+=2 )); do - values+=( "${pairs[$i]}" ) - done - - if batslib_is_single_line "${values[@]}"; then - batslib_print_kv_single "$width" "${pairs[@]}" - else - local -i i - for (( i=1; i < ${#pairs[@]}; i+=2 )); do - pairs[$i]="$( batslib_prefix < <(printf '%s' "${pairs[$i]}") )" - done - batslib_print_kv_multi "${pairs[@]}" - fi -} - -# Prefix each line read from the standard input with the given string. -# -# Globals: -# none -# Arguments: -# $1 - [= ] prefix string -# Returns: -# none -# Inputs: -# STDIN - lines -# Outputs: -# STDOUT - prefixed lines -batslib_prefix() { - local -r prefix="${1:- }" - local line - while IFS='' read -r line || [[ -n $line ]]; do - printf '%s%s\n' "$prefix" "$line" - done -} - -# Mark select lines of the text read from the standard input by -# overwriting their beginning with the given string. -# -# Usually the input is indented by a few spaces using `batslib_prefix' -# first. -# -# Globals: -# none -# Arguments: -# $1 - marking string -# $@ - indices (zero-based) of lines to mark -# Returns: -# none -# Inputs: -# STDIN - lines -# Outputs: -# STDOUT - lines after marking -batslib_mark() { - local -r symbol="$1"; shift - # Sort line numbers. - set -- $( sort -nu <<< "$( printf '%d\n' "$@" )" ) - - local line - local -i idx=0 - while IFS='' read -r line || [[ -n $line ]]; do - if (( ${1:--1} == idx )); then - printf '%s\n' "${symbol}${line:${#symbol}}" - shift - else - printf '%s\n' "$line" - fi - (( ++idx )) - done -} - -# Enclose the input text in header and footer lines. -# -# The header contains the given string as title. The output is preceded -# and followed by an additional newline to make it stand out more. -# -# Globals: -# none -# Arguments: -# $1 - title -# Returns: -# none -# Inputs: -# STDIN - text -# Outputs: -# STDOUT - decorated text -batslib_decorate() { - echo - echo "-- $1 --" - cat - - echo '--' - echo -} diff --git a/pkg/alpha.dagger.io/bats/tests/testfile/test.bats b/pkg/alpha.dagger.io/bats/tests/testfile/test.bats deleted file mode 100644 index a7dcfe33..00000000 --- a/pkg/alpha.dagger.io/bats/tests/testfile/test.bats +++ /dev/null @@ -1,12 +0,0 @@ -setup() { - load 'mods/bats-support/load' - load 'mods/bats-assert/load' -} - -@test "simple bats test" { - run echo "Hello world" - assert_success - - run cat /do/not/exist - assert_failure -} diff --git a/pkg/alpha.dagger.io/cue.mod/module.cue b/pkg/alpha.dagger.io/cue.mod/module.cue deleted file mode 100644 index 45cdb689..00000000 --- a/pkg/alpha.dagger.io/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "alpha.dagger.io" diff --git a/pkg/alpha.dagger.io/cue.mod/pkg/.gitignore b/pkg/alpha.dagger.io/cue.mod/pkg/.gitignore deleted file mode 100644 index 2d4dc1ae..00000000 --- a/pkg/alpha.dagger.io/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# generated by dagger -alpha.dagger.io -dagger.lock diff --git a/pkg/alpha.dagger.io/dagger/dagger.cue b/pkg/alpha.dagger.io/dagger/dagger.cue deleted file mode 100644 index 4ce15e66..00000000 --- a/pkg/alpha.dagger.io/dagger/dagger.cue +++ /dev/null @@ -1,39 +0,0 @@ -// Dagger core types -package dagger - -import ( - "alpha.dagger.io/dagger/op" - dagger_0_2 "dagger.io/dagger" -) - -// An artifact such as source code checkout, container image, binary archive... -// May be passed as user input, or computed by a buildkit pipeline -#Artifact: { - @dagger(artifact) - #up: [...op.#Op] - _ - ... -} - -// Dagger stream. Can be mounted as a UNIX socket. -#Stream: dagger_0_2.#Service - -// A reference to an external secret, for example: -// - A password -// - A SSH private key -// - An API token -// Secrets are never merged in the Cue tree. They can only be used -// by a special filesystem mount designed to minimize leak risk. -#Secret: dagger_0_2.#Secret - -#Input: { - @dagger(input) - _ - ... -} - -#Output: { - @dagger(output) - _ - ... -} diff --git a/pkg/alpha.dagger.io/dagger/op/op.cue b/pkg/alpha.dagger.io/dagger/op/op.cue deleted file mode 100644 index cf4d62c0..00000000 --- a/pkg/alpha.dagger.io/dagger/op/op.cue +++ /dev/null @@ -1,147 +0,0 @@ -// op: low-level operations for Dagger processing pipelines -package op - -// One operation in a pipeline -// -// FIXME: #Op does not current enforce the op spec at full resolution, to avoid -// FIXME: triggering performance issues. See https://github.com/dagger/dagger/issues/445 -// FIXME: To enforce the full #Op spec (see op_fullop.cue), run with "-t fullop" -#Op: { - do: string - ... -} - -// Export a value from fs state to cue -#Export: { - do: "export" - // Source path in the container - source: string - format: "json" | "yaml" | *"string" -} - -#Local: { - do: "local" - dir: string - include: [...string] - exclude: [...string] -} - -// FIXME: bring back load (more efficient than copy) - -#Load: { - do: "load" - from: _ -} - -#Subdir: { - do: "subdir" - dir: string -} - -#Workdir: { - do: "workdir" - path: string -} - -#Exec: { - do: "exec" - args: [...string] - env?: [string]: string - // `true` means also ignoring the mount cache volumes - always?: true | *false - dir: string | *"/" - // HACK: FIXME later [Performance related] - // mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _} - // https://github.com/dagger/dagger/issues/856 - mount: [string]: { - _ - ... - } - // Map of hostnames to ip - hosts?: [string]: string - // User to exec with (if left empty, will default to the set user in the image) - user?: string -} - -#DockerLogin: { - do: "docker-login" - target: string - username: string - // FIXME: should be a #Secret (circular import) - secret: _ @dagger(secret) -} - -#FetchContainer: { - do: "fetch-container" - ref: string -} - -#PushContainer: { - do: "push-container" - ref: string -} - -#SaveImage: { - do: "save-image" - tag: string - dest: string -} - -#FetchGit: { - do: "fetch-git" - remote: string - ref: string - keepGitDir?: bool - // FIXME: the two options are currently ignored until we support buildkit secrets - authToken?: _ @dagger(secret) - authHeader?: _ @dagger(secret) -} - -#FetchHTTP: { - do: "fetch-http" - url: string - checksum?: string - filename?: string - mode?: int | *0o644 - uid?: int - gid?: int -} - -#Copy: { - do: "copy" - from: _ - src: string | *"/" - dest: string | *"/" -} - -#DockerBuild: { - do: "docker-build" - // We accept either a context, a Dockerfile or both together - context?: _ - dockerfilePath?: string // path to the Dockerfile (defaults to "Dockerfile") - dockerfile?: string - - platforms?: [...string] - buildArg?: { - // FIXME: should be `[string]: string | #Secret` (circular import) - [string]: string | _ @dagger(secret) - } - label?: [string]: string - target?: string - hosts?: [string]: string -} - -#WriteFile: { - do: "write-file" - // FIXME: "contents" to follow english convention - content: string | bytes - dest: string - mode: int | *0o644 -} - -#Mkdir: { - do: "mkdir" - dir: *"/" | string - path: string - mode: int | *0o755 -} diff --git a/pkg/alpha.dagger.io/dagger/op/op_fullop.cue b/pkg/alpha.dagger.io/dagger/op/op_fullop.cue deleted file mode 100644 index 9c78855d..00000000 --- a/pkg/alpha.dagger.io/dagger/op/op_fullop.cue +++ /dev/null @@ -1,19 +0,0 @@ -@if(fullop) - -package op - -// Full resolution schema enforcing the complete op spec -#Op: (#Export | - #FetchContainer | - #PushContainer | - #FetchGit | - #FetchHTTP | - #Exec | - #Local | - #Copy | - #Load | - #Subdir | - #Workdir | - #WriteFile | - #Mkdir | - #DockerBuild) & {do: string} diff --git a/pkg/alpha.dagger.io/docker/command.cue b/pkg/alpha.dagger.io/docker/command.cue deleted file mode 100644 index 849b7f2d..00000000 --- a/pkg/alpha.dagger.io/docker/command.cue +++ /dev/null @@ -1,238 +0,0 @@ -package docker - -import ( - "strconv" - - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -// A container image that can run any docker command -#Command: { - ssh?: { - // ssh host - host: string @dagger(input) - - // ssh user - user: string @dagger(input) - - // ssh port - port: *22 | int @dagger(input) - - // private key - key: dagger.#Secret @dagger(input) - - // fingerprint - fingerprint?: string @dagger(input) - - // ssh key passphrase - keyPassphrase?: dagger.#Secret @dagger(input) - } - - // Connect via DOCKER_HOST, supports tcp:// - // TODO: Consider refactoring to support ssh:// & even file:// - host?: string @dagger(input) - - // Command to execute - command: string - - // Environment variables shared by all commands - env: { - [string]: string - } - - // Mount content from other artifacts - mount: [string]: from: dagger.#Artifact - - // Mount secrets - secret: [string]: dagger.#Secret - - // Mount persistent cache directories - cache: { - [string]: true - } - - // Mount temporary directories - tmpfs: { - [string]: true - } - - // Mount docker socket - socket?: dagger.#Stream @dagger(input) - - // Additional packages to install - package: { - [string]: true | false | string - } - - // Image registries - registries: [...{ - target?: string - username: string - secret: dagger.#Secret - }] - - // Copy contents from other artifacts - copy: [string]: from: dagger.#Artifact - - // Write file in the container - files: [string]: string - - // Setup docker client and then execute the user command - #code: #""" - # Setup ssh - if [ -n "$DOCKER_HOSTNAME" ]; then - export DOCKER_HOST="ssh://$DOCKER_USERNAME@$DOCKER_HOSTNAME:$DOCKER_PORT" - - # Start ssh-agent - eval $(ssh-agent) > /dev/null - - # Add key - if [ -f "/key" ]; then - message="$(ssh-keygen -y -f /key < /dev/null 2>&1)" || { - >&2 echo "$message" - exit 1 - } - - # Save key - ssh-add /key > /dev/null - if [ "$?" != 0 ]; then - exit 1 - fi - fi - - if [[ ! -z $FINGERPRINT ]]; then - mkdir -p "$HOME"/.ssh - - # Add user's fingerprint to known hosts - echo "$FINGERPRINT" >> "$HOME"/.ssh/known_hosts - else - # Add host to known hosts - ssh -i /key -o "UserKnownHostsFile "$HOME"/.ssh/known_hosts" -o "StrictHostKeyChecking accept-new" -p "$DOCKER_PORT" "$DOCKER_USERNAME"@"$DOCKER_HOSTNAME" true > /dev/null 2>&1 - fi - fi - - # Execute entrypoint - /bin/bash /entrypoint.sh - """# - - #up: [ - op.#Load & { - from: alpine.#Image & { - "package": { - package - bash: true - "openssh-client": true - "docker-cli": true - } - } - }, - - for registry in registries { - op.#Exec & { - args: ["/bin/bash", "-c", #""" - echo "$TARGET_HOST" | docker login --username "$DOCKER_USERNAME" --password-stdin "$(cat /password)" - """#, - ] - env: { - TARGET_HOST: registry.target - DOCKER_USERNAME: registry.username - } - mount: "/password": secret: registry.secret - } - }, - - for dest, content in files { - op.#WriteFile & { - "content": content - "dest": dest - } - }, - - for dest, src in copy { - op.#Copy & { - from: src.from - "dest": dest - } - }, - - if ssh.keyPassphrase != _|_ { - op.#WriteFile & { - content: #""" - #!/bin/bash - cat /keyPassphrase - """# - dest: "/get_keyPassphrase" - mode: 0o500 - } - }, - - // Write wrapper - op.#WriteFile & { - content: #code - dest: "/setup.sh" - }, - - // Write entrypoint - op.#WriteFile & { - content: command - dest: "/entrypoint.sh" - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/setup.sh", - ] - "env": { - env - if ssh != _|_ { - DOCKER_HOSTNAME: ssh.host - DOCKER_USERNAME: ssh.user - DOCKER_PORT: strconv.FormatInt(ssh.port, 10) - if ssh.keyPassphrase != _|_ { - SSH_ASKPASS: "/get_keyPassphrase" - DISPLAY: "1" - } - if ssh.fingerprint != _|_ { - FINGERPRINT: ssh.fingerprint - } - } - if host != _|_ && ssh == _|_ { - DOCKER_HOST: host - } - } - "mount": { - if ssh != _|_ { - if ssh.key != _|_ { - "/key": secret: ssh.key - } - if ssh.keyPassphrase != _|_ { - "/keyPassphrase": secret: ssh.keyPassphrase - } - } - if socket != _|_ { - "/var/run/docker.sock": stream: socket - } - for dest, o in mount { - "\(dest)": o - } - for dest, s in secret { - "\(dest)": secret: s - } - for dest, _ in cache { - "\(dest)": "cache" - } - for dest, _ in tmpfs { - "\(dest)": "tmpfs" - } - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/docker/compose/client.cue b/pkg/alpha.dagger.io/docker/compose/client.cue deleted file mode 100644 index 504462cf..00000000 --- a/pkg/alpha.dagger.io/docker/compose/client.cue +++ /dev/null @@ -1,16 +0,0 @@ -package compose - -import ( - "alpha.dagger.io/alpine" -) - -// A container image to run the docker-compose client -#Client: alpine.#Image & { - package: { - bash: true - jq: true - curl: true - "openssh-client": true - "docker-compose": true - } -} diff --git a/pkg/alpha.dagger.io/docker/compose/compose.cue b/pkg/alpha.dagger.io/docker/compose/compose.cue deleted file mode 100644 index 85d42052..00000000 --- a/pkg/alpha.dagger.io/docker/compose/compose.cue +++ /dev/null @@ -1,95 +0,0 @@ -// Docker-compose operations -package compose - -import ( - "strconv" - "alpha.dagger.io/dagger" - "alpha.dagger.io/docker" -) - -#App: { - ssh?: { - // ssh host - host: string @dagger(input) - - // ssh user - user: string @dagger(input) - - // ssh port - port: *22 | int @dagger(input) - - // private key - key: dagger.#Secret @dagger(input) - - // fingerprint - fingerprint?: string @dagger(input) - - // ssh key passphrase - keyPassphrase?: dagger.#Secret @dagger(input) - } - - // Mount local docker socket - socket?: dagger.#Stream & dagger.#Input - - // Accept either a contaxt, a docker-compose or both together - source?: dagger.#Artifact @dagger(input) - composeFile?: string @dagger(input) - - // App name (use as COMPOSE_PROJECT_NAME) - name: *"source" | string @dagger(input) - - // Image registries - registries: [...{ - target?: string - username: string - secret: dagger.#Secret - }] @dagger(input) - - #code: #""" - if [ -n "$DOCKER_HOSTNAME" ]; then - ssh -i /key -fNT -o "StreamLocalBindUnlink=yes" -L "$(pwd)"/docker.sock:/var/run/docker.sock -p "$DOCKER_PORT" "$DOCKER_USERNAME"@"$DOCKER_HOSTNAME" - export DOCKER_HOST="unix://$(pwd)/docker.sock" - fi - - # Extend session duration - echo "Host *\nServerAliveInterval 240" >> "$HOME"/.ssh/config - chmod 600 "$HOME"/.ssh/config - - # Move compose - if [ -d "$SOURCE_DIR" ]; then - if [ -f docker-compose.yaml ]; then - cp docker-compose.yaml "$SOURCE_DIR"/docker-compose.yaml - fi - cd "$SOURCE_DIR" - fi - - docker-compose build - docker-compose up -d - """# - - run: docker.#Command & { - if ssh != _|_ { - "ssh": ssh - } - if socket != _|_ { - "socket": socket - } - - command: #code - package: "docker-compose": true - "registries": registries - if source != _|_ { - copy: "/source": from: source - } - if composeFile != _|_ { - files: "/docker-compose.yaml": composeFile - } - env: { - COMPOSE_HTTP_TIMEOUT: strconv.FormatInt(200, 10) - COMPOSE_PROJECT_NAME: name - if source != _|_ { - SOURCE_DIR: "source" - } - } - } -} diff --git a/pkg/alpha.dagger.io/docker/compose/tests/cleanup.cue b/pkg/alpha.dagger.io/docker/compose/tests/cleanup.cue deleted file mode 100644 index 938abc88..00000000 --- a/pkg/alpha.dagger.io/docker/compose/tests/cleanup.cue +++ /dev/null @@ -1,93 +0,0 @@ -package compose - -import ( - "strconv" - - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -#CleanupCompose: { - // docker-compose up context - context: dagger.#Artifact - - // App name (use as COMPOSE_PROJECT_NAME) - name: *"source" | string - - ssh: { - // ssh host - host: string @dagger(input) - - // ssh user - user: string @dagger(input) - - // ssh port - port: *22 | int @dagger(input) - - // private key - key: dagger.#Secret @dagger(input) - - // fingerprint - fingerprint?: string @dagger(input) - - // ssh key passphrase - keyPassphrase?: dagger.#Secret @dagger(input) - } - - #code: #""" - # Export host - export DOCKER_HOST="unix://$(pwd)/docker.sock" - - # Start ssh agent - eval $(ssh-agent) > /dev/null - ssh-add /key > /dev/null - - ssh -i /key -o "StreamLocalBindUnlink=yes" -fNT -L "$(pwd)"/docker.sock:/var/run/docker.sock -p "$DOCKER_PORT" "$DOCKER_USERNAME"@"$DOCKER_HOSTNAME" || true - - # Down - if [ -d /source ]; then - cd /source - fi - - docker-compose down -v - """# - - #up: [ - op.#Load & {from: context}, - - op.#WriteFile & { - content: #code - dest: "/entrypoint.sh" - }, - - op.#Exec & { - always: true - args: [ - "/bin/sh", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - env: { - DOCKER_HOSTNAME: ssh.host - DOCKER_USERNAME: ssh.user - DOCKER_PORT: strconv.FormatInt(ssh.port, 10) - COMPOSE_PROJECT_NAME: name - if ssh.keyPassphrase != _|_ { - SSH_ASKPASS: "/get_passphrase" - DISPLAY: "1" - } - } - mount: { - if ssh.key != _|_ { - "/key": secret: ssh.key - } - if ssh.keyPassphrase != _|_ { - "/passphrase": secret: ssh.keyPassphrase - } - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/docker/compose/tests/compose.cue b/pkg/alpha.dagger.io/docker/compose/tests/compose.cue deleted file mode 100644 index dffa83f8..00000000 --- a/pkg/alpha.dagger.io/docker/compose/tests/compose.cue +++ /dev/null @@ -1,88 +0,0 @@ -package compose - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/docker" - "alpha.dagger.io/random" -) - -repo: dagger.#Artifact @dagger(input) - -TestSSH: { - key: dagger.#Secret @dagger(input) - host: string @dagger(input) - user: string @dagger(input) -} - -TestCompose: { - // Generate a random string. - // Seed is used to force buildkit execution and not simply use a previous generated string. - suffix: random.#String & {seed: "cmp"} - - name: "compose_test_\(suffix.out)" - - up: #App & { - ssh: { - key: TestSSH.key - host: TestSSH.host - user: TestSSH.user - } - source: repo - "name": name - } - - verify: docker.#Command & { - ssh: up.run.ssh - command: #""" - docker container ls | grep "\#(name)_api" | grep "Up" - """# - } - - cleanup: #CleanupCompose & { - context: up.run - "name": name - ssh: verify.ssh - } -} - -TestInlineCompose: { - // Generate a random string. - // Seed is used to force buildkit execution and not simply use a previous generated string. - suffix: random.#String & {seed: "cmp-inline"} - - name: "inline_test_\(suffix.out)" - - up: #App & { - ssh: { - key: TestSSH.key - host: TestSSH.host - user: TestSSH.user - } - source: repo - "name": name - composeFile: #""" - version: "3" - - services: - api-mix: - build: . - environment: - PORT: 7000 - ports: - - 7000 - """# - } - - verify: docker.#Command & { - ssh: up.run.ssh - command: #""" - docker container ls | grep "\#(name)_api-mix" | grep "Up" - """# - } - - cleanup: #CleanupCompose & { - context: up.run - "name": name - ssh: verify.ssh - } -} diff --git a/pkg/alpha.dagger.io/docker/compose/tests/testdata/Dockerfile b/pkg/alpha.dagger.io/docker/compose/tests/testdata/Dockerfile deleted file mode 100644 index 25d4c068..00000000 --- a/pkg/alpha.dagger.io/docker/compose/tests/testdata/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM node:12-alpine - -WORKDIR /app - -COPY package.json package.json - -RUN npm install - -COPY . . - -ENV PORT=8080 - -EXPOSE 8080 - -CMD ["npm", "start"] \ No newline at end of file diff --git a/pkg/alpha.dagger.io/docker/compose/tests/testdata/docker-compose.yaml b/pkg/alpha.dagger.io/docker/compose/tests/testdata/docker-compose.yaml deleted file mode 100644 index 9f110ad6..00000000 --- a/pkg/alpha.dagger.io/docker/compose/tests/testdata/docker-compose.yaml +++ /dev/null @@ -1,7 +0,0 @@ -version: "3" - -services: - api: - build: "" - ports: - - 8080 \ No newline at end of file diff --git a/pkg/alpha.dagger.io/docker/compose/tests/testdata/index.ts b/pkg/alpha.dagger.io/docker/compose/tests/testdata/index.ts deleted file mode 100644 index d37fe572..00000000 --- a/pkg/alpha.dagger.io/docker/compose/tests/testdata/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import express from "express"; -import { get } from "env-var"; - - -const app = express(); - -const port: number = get('PORT').required().asPortNumber(); - -app.get('/ping', (req, res) => { - res.status(200).send('pong') -}); - -app.listen(port, '0.0.0.0', () => console.log("Server listen on http://localhost:" + port)); \ No newline at end of file diff --git a/pkg/alpha.dagger.io/docker/compose/tests/testdata/package.json b/pkg/alpha.dagger.io/docker/compose/tests/testdata/package.json deleted file mode 100644 index c2be41f2..00000000 --- a/pkg/alpha.dagger.io/docker/compose/tests/testdata/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "test", - "version": "1.0.0", - "description": "A simple api", - "main": "index.ts", - "scripts": { - "build": "tsc", - "start": "ts-node index.ts", - "test": "test" - }, - "author": "Tom Chauveau", - "license": "ISC", - "devDependencies": { - "ts-node": "^8.9.1", - "typescript": "^3.8.3" - }, - "dependencies": { - "@types/express": "^4.17.6", - "env-var": "^6.1.1", - "express": "^4.17.1" - } -} diff --git a/pkg/alpha.dagger.io/docker/compose/tests/testdata/tsconfig.json b/pkg/alpha.dagger.io/docker/compose/tests/testdata/tsconfig.json deleted file mode 100644 index 98907427..00000000 --- a/pkg/alpha.dagger.io/docker/compose/tests/testdata/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "sourceMap": true, - "outDir": "dist", - "strict": true, - "lib": [ - "esnext", - "dom" - ], - "esModuleInterop": true - } -} diff --git a/pkg/alpha.dagger.io/docker/docker.cue b/pkg/alpha.dagger.io/docker/docker.cue deleted file mode 100644 index 3b288f5c..00000000 --- a/pkg/alpha.dagger.io/docker/docker.cue +++ /dev/null @@ -1,296 +0,0 @@ -// Docker container operations -package docker - -import ( - "strings" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -// Build a Docker image from source -#Build: { - // Build context - source: dagger.#Input & {dagger.#Artifact} - - // Dockerfile passed as a string - dockerfile: dagger.#Input & {*null | string} - - args?: [string]: string | dagger.#Secret - - #up: [ - op.#DockerBuild & { - context: source - if dockerfile != null { - "dockerfile": dockerfile - } - if args != _|_ { - buildArg: args - } - }, - ] - -} - -// Pull a docker container -#Pull: { - // Remote ref (example: "index.docker.io/alpine:latest") - from: dagger.#Input & {string} - - #up: [ - op.#FetchContainer & {ref: from}, - ] -} - -// Push a docker image to a remote registry -#Push: { - // Remote target (example: "index.docker.io/alpine:latest") - target: dagger.#Input & {string} - - // Image source - source: dagger.#Input & {dagger.#Artifact} - - // Registry auth - auth?: { - // Username - username: dagger.#Input & {string} - - // Password or secret - secret: dagger.#Input & {dagger.#Secret | string} - } - - push: #up: [ - op.#Load & {from: source}, - - if auth != _|_ { - op.#DockerLogin & { - "target": target - username: auth.username - secret: auth.secret - } - }, - - op.#PushContainer & {ref: target}, - - op.#Subdir & {dir: "/dagger"}, - ] - - // Image ref - ref: { - string - - #up: [ - op.#Load & {from: push}, - - op.#Export & { - source: "/image_ref" - }, - ] - } & dagger.#Output - - // Image digest - digest: { - string - - #up: [ - op.#Load & {from: push}, - - op.#Export & { - source: "/image_digest" - }, - ] - } & dagger.#Output -} - -// Load a docker image into a docker engine -#Load: { - // Connect to a remote SSH server - ssh?: { - // ssh host - host: dagger.#Input & {string} - - // ssh user - user: dagger.#Input & {string} - - // ssh port - port: dagger.#Input & {*22 | int} - - // private key - key: dagger.#Input & {dagger.#Secret} - - // fingerprint - fingerprint?: dagger.#Input & {string} - - // ssh key passphrase - keyPassphrase?: dagger.#Input & {dagger.#Secret} - } - - // Connect via DOCKER_HOST, supports tcp:// - // TODO: Consider refactoring to support ssh:// & even file:// - host?: string @dagger(input) - - // Mount local docker socket - socket?: dagger.#Stream & dagger.#Input - - // Name and optionally a tag in the 'name:tag' format - tag: dagger.#Input & {string} - - // Image source - source: dagger.#Input & {dagger.#Artifact} - - save: #up: [ - op.#Load & {from: source}, - - op.#SaveImage & { - "tag": tag - dest: "/image.tar" - }, - ] - - load: #Command & { - if ssh != _|_ { - "ssh": ssh - } - if host != _|_ && ssh == _|_ { - "host": host - } - if socket != _|_ { - "socket": socket - } - - copy: "/src": from: save - - command: "docker load -i /src/image.tar" - } - - // Image ID - id: { - string - - #up: [ - // HACK: force a dependency with `load` - op.#Load & {from: load}, - - op.#Load & {from: save}, - - op.#Export & { - source: "/dagger/image_id" - }, - ] - } & dagger.#Output -} - -#Run: { - // Connect to a remote SSH server - ssh?: { - // ssh host - host: dagger.#Input & {string} - - // ssh user - user: dagger.#Input & {string} - - // ssh port - port: dagger.#Input & {*22 | int} - - // private key - key: dagger.#Input & {dagger.#Secret} - - // fingerprint - fingerprint?: dagger.#Input & {string} - - // ssh key passphrase - keyPassphrase?: dagger.#Input & {dagger.#Secret} - } - - // Connect via DOCKER_HOST, supports tcp:// - // TODO: Consider refactoring to support ssh:// & even file:// - host?: string @dagger(input) - - // Mount local docker socket - socket?: dagger.#Stream & dagger.#Input - - // Image reference (e.g: nginx:alpine) - ref: dagger.#Input & {string} - - // Container name - name?: dagger.#Input & {string} - - // Custom Command overriding entrypoint of the Image - containerCommand?: dagger.#Input & {string} - - // Recreate container? - recreate: dagger.#Input & {bool | *true} - - // Image registry - registry?: { - target: string - username: string - secret: dagger.#Secret - } & dagger.#Input - - // local ports - ports?: [...string] - - #command: #""" - # Run detach container - OPTS="" - CMD="" - - if [ ! -z "$CONTAINER_NAME" ]; then - OPTS="$OPTS --name $CONTAINER_NAME" - docker inspect "$CONTAINER_NAME" >/dev/null && { - # Container already exists - if [ ! -z "$CONTAINER_RECREATE" ]; then - echo "Replacing container $CONTAINER_NAME" - docker stop "$CONTAINER_NAME" - docker rm "$CONTAINER_NAME" - else - echo "$CONTAINER_NAME already exists" - exit 0 - fi - } - fi - - if [ ! -z "$CONTAINER_PORTS" ]; then - OPTS="$OPTS -p $CONTAINER_PORTS" - fi - - if [ ! -z "$CONTAINER_CMD" ]; then - CMD="$CONTAINER_CMD" - fi - - docker container run -d $OPTS "$IMAGE_REF" $CMD - """# - - run: #Command & { - if ssh != _|_ { - "ssh": ssh - } - if host != _|_ && ssh == _|_ { - "host": host - } - if socket != _|_ { - "socket": socket - } - - command: #command - env: { - IMAGE_REF: ref - if name != _|_ { - CONTAINER_NAME: name - } - - if recreate { - CONTAINER_RECREATE: "true" - } - - if ports != _|_ { - CONTAINER_PORTS: strings.Join(ports, " -p ") - } - - if containerCommand != _|_ { - CONTAINER_CMD: containerCommand - } - - } - } -} diff --git a/pkg/alpha.dagger.io/docker/tests/build/dockerfile.cue b/pkg/alpha.dagger.io/docker/tests/build/dockerfile.cue deleted file mode 100644 index 7928dafe..00000000 --- a/pkg/alpha.dagger.io/docker/tests/build/dockerfile.cue +++ /dev/null @@ -1,84 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -TestSourceBuild: dagger.#Artifact @dagger(input) - -TestBuild: { - image: #Build & { - source: TestSourceBuild - } - - verify: #up: [ - op.#Load & { - from: image - }, - - op.#Exec & { - always: true - args: [ - "sh", "-c", """ - grep -q "test" /test.txt - """, - ] - }, - ] -} - -TestBuildWithArgs: { - image: #Build & { - dockerfile: """ - FROM alpine - ARG TEST - ENV TEST=$TEST - RUN echo "$TEST" > /test.txt - """ - source: "" - args: TEST: "test" - } - - verify: #up: [ - op.#Load & { - from: image - }, - - op.#Exec & { - always: true - args: [ - "sh", "-c", """ - grep -q "test" /test.txt - """, - ] - }, - ] -} - -TestSourceImageFromDockerfile: dagger.#Artifact @dagger(input) - -TestImageFromDockerfile: { - image: #Build & { - dockerfile: """ - FROM alpine - COPY test.txt /test.txt - """ - source: TestSourceImageFromDockerfile - } - - verify: #up: [ - op.#Load & { - from: image - }, - - op.#Exec & { - always: true - args: [ - "sh", "-c", """ - grep -q "test" /test.txt - """, - ] - }, - ] -} diff --git a/pkg/alpha.dagger.io/docker/tests/build/testdata/build/Dockerfile b/pkg/alpha.dagger.io/docker/tests/build/testdata/build/Dockerfile deleted file mode 100644 index 987ce9be..00000000 --- a/pkg/alpha.dagger.io/docker/tests/build/testdata/build/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM alpine -RUN echo test >> /test.txt \ No newline at end of file diff --git a/pkg/alpha.dagger.io/docker/tests/build/testdata/dockerfile/test.txt b/pkg/alpha.dagger.io/docker/tests/build/testdata/dockerfile/test.txt deleted file mode 100644 index 30d74d25..00000000 --- a/pkg/alpha.dagger.io/docker/tests/build/testdata/dockerfile/test.txt +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/pkg/alpha.dagger.io/docker/tests/command-host/command.cue b/pkg/alpha.dagger.io/docker/tests/command-host/command.cue deleted file mode 100644 index 043eb44c..00000000 --- a/pkg/alpha.dagger.io/docker/tests/command-host/command.cue +++ /dev/null @@ -1,13 +0,0 @@ -package docker - -TestConfig: { - host: string @dagger(input) -} - -TestHost: client: #Command & { - command: #""" - docker $CMD - """# - host: TestConfig.host - env: CMD: "version" -} diff --git a/pkg/alpha.dagger.io/docker/tests/command-ssh-key-passphrase/command.cue b/pkg/alpha.dagger.io/docker/tests/command-ssh-key-passphrase/command.cue deleted file mode 100644 index dab3694f..00000000 --- a/pkg/alpha.dagger.io/docker/tests/command-ssh-key-passphrase/command.cue +++ /dev/null @@ -1,25 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" -) - -TestConfig: { - host: string @dagger(input) - user: string @dagger(input) - key: dagger.#Secret @dagger(input) - keyPassphrase: dagger.#Secret @dagger(input) -} - -TestSSH: client: #Command & { - command: #""" - docker $CMD - """# - ssh: { - host: TestConfig.host - user: TestConfig.user - key: TestConfig.key - keyPassphrase: TestConfig.keyPassphrase - } - env: CMD: "version" -} diff --git a/pkg/alpha.dagger.io/docker/tests/command-ssh-wrong-key-passphrase/command.cue b/pkg/alpha.dagger.io/docker/tests/command-ssh-wrong-key-passphrase/command.cue deleted file mode 100644 index 096ee42e..00000000 --- a/pkg/alpha.dagger.io/docker/tests/command-ssh-wrong-key-passphrase/command.cue +++ /dev/null @@ -1,24 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" -) - -TestConfig: { - host: string @dagger(input) - user: string @dagger(input) - key: dagger.#Secret @dagger(input) - keyPassphrase: dagger.#Secret @dagger(input) -} - -TestSSH: client: #Command & { - command: #""" - docker version - """# - ssh: { - host: TestConfig.host - user: TestConfig.user - key: TestConfig.key - keyPassphrase: TestConfig.keyPassphrase - } -} diff --git a/pkg/alpha.dagger.io/docker/tests/command-ssh/command.cue b/pkg/alpha.dagger.io/docker/tests/command-ssh/command.cue deleted file mode 100644 index 97242ed0..00000000 --- a/pkg/alpha.dagger.io/docker/tests/command-ssh/command.cue +++ /dev/null @@ -1,26 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" -) - -TestConfig: { - host: dagger.#Input & {string} - user: dagger.#Input & {string} - key: dagger.#Input & {dagger.#Secret} -} - -TestPassword: dagger.#Input & {dagger.#Secret} - -TestSSH: client: #Command & { - command: #""" - docker $CMD && [ -f /run/secrets/password ] - """# - ssh: { - host: TestConfig.host - user: TestConfig.user - key: TestConfig.key - } - secret: "/run/secrets/password": TestPassword - env: CMD: "version" -} diff --git a/pkg/alpha.dagger.io/docker/tests/load/load.cue b/pkg/alpha.dagger.io/docker/tests/load/load.cue deleted file mode 100644 index bedd18d9..00000000 --- a/pkg/alpha.dagger.io/docker/tests/load/load.cue +++ /dev/null @@ -1,32 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/random" -) - -dockersocket: dagger.#Stream & dagger.#Input - -source: dagger.#Artifact & dagger.#Input - -TestLoad: { - suffix: random.#String & { - seed: "" - } - - image: #Build & { - "source": source - } - - load: #Load & { - tag: "daggerci-image-load-\(suffix.out)" - source: image - socket: dockersocket - } - - run: #Run & { - name: "daggerci-container-load-\(suffix.out)" - ref: load.id - socket: dockersocket - } -} diff --git a/pkg/alpha.dagger.io/docker/tests/load/testdata/Dockerfile b/pkg/alpha.dagger.io/docker/tests/load/testdata/Dockerfile deleted file mode 100644 index 987ce9be..00000000 --- a/pkg/alpha.dagger.io/docker/tests/load/testdata/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM alpine -RUN echo test >> /test.txt \ No newline at end of file diff --git a/pkg/alpha.dagger.io/docker/tests/pull/pull.cue b/pkg/alpha.dagger.io/docker/tests/pull/pull.cue deleted file mode 100644 index 0f4b0e81..00000000 --- a/pkg/alpha.dagger.io/docker/tests/pull/pull.cue +++ /dev/null @@ -1,25 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -ref: string @dagger(input) - -TestPull: { - pull: #Pull & {from: ref} - - check: #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - always: true - args: [ - "sh", "-c", """ - grep -q "test" /src/test.txt - """, - ] - mount: "/src": from: pull - }, - ] -} diff --git a/pkg/alpha.dagger.io/docker/tests/push-invalid-creds/push.cue b/pkg/alpha.dagger.io/docker/tests/push-invalid-creds/push.cue deleted file mode 100644 index 770810e0..00000000 --- a/pkg/alpha.dagger.io/docker/tests/push-invalid-creds/push.cue +++ /dev/null @@ -1,36 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/random" -) - -TestRegistry: { - username: dagger.#Input & {string} - secret: dagger.#Input & {dagger.#Secret} -} - -TestPush: { - // Generate a random string - // Seed is used to force buildkit execution and not simply use a previous generated string. - tag: random.#String & {seed: "docker push and pull should fail"} - - target: "daggerio/ci-test:\(tag.out)" - - image: #Build & { - dockerfile: """ - FROM alpine - RUN echo "test" > /test.txt - """ - source: "" - } - - push: #Push & { - "target": target - source: image - auth: { - username: TestRegistry.username - secret: TestRegistry.secret - } - } -} diff --git a/pkg/alpha.dagger.io/docker/tests/push-multi-registry/push.cue b/pkg/alpha.dagger.io/docker/tests/push-multi-registry/push.cue deleted file mode 100644 index f9228c56..00000000 --- a/pkg/alpha.dagger.io/docker/tests/push-multi-registry/push.cue +++ /dev/null @@ -1,65 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/aws" - "alpha.dagger.io/aws/ecr" - "alpha.dagger.io/dagger" - "alpha.dagger.io/random" -) - -// -// /!\ README /!\ -// The objective is to push an image on multiple registries to verify -// that we correctly handle that kind of configuration -// - -TestResources: { - // Generate a random string - // Seed is used to force buildkit execution and not simply use a previous generated string. - suffix: random.#String & {seed: "docker multi registry"} - - image: #Build & { - dockerfile: """ - FROM alpine - RUN echo "test" > /test.txt - """ - source: "" - } -} - -TestRemoteAWS: { - awsConfig: aws.#Config - - ecrCreds: ecr.#Credentials & { - config: awsConfig - } - - target: "125635003186.dkr.ecr.\(awsConfig.region).amazonaws.com/dagger-ci:test-ecr-\(TestResources.suffix.out)" - - remoteImg: #Push & { - "target": target - source: TestResources.image - auth: { - username: ecrCreds.username - secret: ecrCreds.secret - } - } -} - -TestRemoteDocker: { - dockerConfig: { - username: dagger.#Input & {string} - secret: dagger.#Input & {dagger.#Secret} - } - - target: "daggerio/ci-test:test-docker-\(TestResources.suffix.out)" - - remoteImg: #Push & { - "target": target - source: TestResources.image - auth: { - username: dockerConfig.username - secret: dockerConfig.secret - } - } -} diff --git a/pkg/alpha.dagger.io/docker/tests/push/push.cue b/pkg/alpha.dagger.io/docker/tests/push/push.cue deleted file mode 100644 index 5cfc6f9c..00000000 --- a/pkg/alpha.dagger.io/docker/tests/push/push.cue +++ /dev/null @@ -1,36 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/random" -) - -TestRegistry: { - username: dagger.#Input & {string} - secret: dagger.#Input & {dagger.#Secret} -} - -TestPush: { - // Generate a random string - // Seed is used to force buildkit execution and not simply use a previous generated string. - tag: random.#String & {seed: "docker push"} - - target: "daggerio/ci-test:\(tag.out)" - - image: #Build & { - dockerfile: """ - FROM alpine - RUN echo "test" > /test.txt - """ - source: "" - } - - push: #Push & { - "target": target - source: image - auth: { - username: TestRegistry.username - secret: TestRegistry.secret - } - } -} diff --git a/pkg/alpha.dagger.io/docker/tests/run-host/simple.cue b/pkg/alpha.dagger.io/docker/tests/run-host/simple.cue deleted file mode 100644 index 17a15f43..00000000 --- a/pkg/alpha.dagger.io/docker/tests/run-host/simple.cue +++ /dev/null @@ -1,21 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/random" -) - -TestConfig: { - host: string @dagger(input) -} - -TestHost: { - suffix: random.#String & { - seed: "docker-tcp-test" - } - - run: #Run & { - name: "daggerci-test-tcp-\(suffix.out)" - ref: "hello-world" - host: TestConfig.host - } -} diff --git a/pkg/alpha.dagger.io/docker/tests/run-local/local.cue b/pkg/alpha.dagger.io/docker/tests/run-local/local.cue deleted file mode 100644 index 8eb83866..00000000 --- a/pkg/alpha.dagger.io/docker/tests/run-local/local.cue +++ /dev/null @@ -1,18 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/random" -) - -dockersocket: dagger.#Stream & dagger.#Input - -suffix: random.#String & { - seed: "" -} - -run: #Run & { - name: "daggerci-test-local-\(suffix.out)" - ref: "hello-world" - socket: dockersocket -} diff --git a/pkg/alpha.dagger.io/docker/tests/run-ports/ports.cue b/pkg/alpha.dagger.io/docker/tests/run-ports/ports.cue deleted file mode 100644 index e820f085..00000000 --- a/pkg/alpha.dagger.io/docker/tests/run-ports/ports.cue +++ /dev/null @@ -1,19 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/random" -) - -dockersocket: dagger.#Stream & dagger.#Input - -suffix: random.#String & { - seed: "" -} - -run: #Run & { - name: "daggerci-test-ports-\(suffix.out)" - ref: "nginx" - socket: dockersocket - ports: ["8080:80"] -} diff --git a/pkg/alpha.dagger.io/docker/tests/run-ssh/simple.cue b/pkg/alpha.dagger.io/docker/tests/run-ssh/simple.cue deleted file mode 100644 index 386cf930..00000000 --- a/pkg/alpha.dagger.io/docker/tests/run-ssh/simple.cue +++ /dev/null @@ -1,29 +0,0 @@ -package docker - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/random" -) - -TestConfig: { - host: string @dagger(input) - user: string @dagger(input) - key: dagger.#Secret @dagger(input) -} - -TestSSH: { - suffix: random.#String & { - seed: "" - } - - run: #Run & { - name: "daggerci-test-ssh-\(suffix.out)" - ref: "hello-world" - - ssh: { - host: TestConfig.host - user: TestConfig.user - key: TestConfig.key - } - } -} diff --git a/pkg/alpha.dagger.io/gcp/cloudrun/cloudrun.cue b/pkg/alpha.dagger.io/gcp/cloudrun/cloudrun.cue deleted file mode 100644 index 041a1b5e..00000000 --- a/pkg/alpha.dagger.io/gcp/cloudrun/cloudrun.cue +++ /dev/null @@ -1,66 +0,0 @@ -package cloudrun - -import ( - "strings" - - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/gcp" -) - -// Service deploys a Cloud Run service based on provided GCR image -#Service: { - // GCP Config - config: gcp.#Config - - // Cloud Run service name - name: string @dagger(input) - - // GCR image ref - image: string @dagger(input) - - // Cloud Run platform - platform: *"managed" | string @dagger(input) - - // Cloud Run service exposed port - port: *"80" | string @dagger(input) - - // Cloud Run service environment variables - env: [string]: string - _envVars: [ for key, val in env {key + "=" + val}] - - #up: [ - op.#Load & { - from: gcp.#GCloud & { - "config": config - } - }, - - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - gcloud run deploy "$SERVICE_NAME" \ - --image "$IMAGE" \ - --region "$REGION" \ - --port "$PORT" \ - --platform "$PLATFORM" \ - --allow-unauthenticated \ - --set-env-vars "$ENV_VARS" - """#, - ] - env: { - SERVICE_NAME: name - PLATFORM: platform - REGION: config.region - IMAGE: image - PORT: port - ENV_VARS: strings.Join(_envVars, ",") - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/gcp/cloudrun/tests/cloudrun.cue b/pkg/alpha.dagger.io/gcp/cloudrun/tests/cloudrun.cue deleted file mode 100644 index a822051c..00000000 --- a/pkg/alpha.dagger.io/gcp/cloudrun/tests/cloudrun.cue +++ /dev/null @@ -1,18 +0,0 @@ -package cloudrun - -import ( - "alpha.dagger.io/gcp" - "alpha.dagger.io/gcp/cloudrun" -) - -TestConfig: gcpConfig: gcp.#Config - -TestCloudRun: deploy: cloudrun.#Service & { - config: TestConfig.gcpConfig - name: "todoapp" - image: "gcr.io/dagger-ci/todoapp:latest" - env: { - FOO: "foo" - BAR: "bar" - } -} diff --git a/pkg/alpha.dagger.io/gcp/gcloud.cue b/pkg/alpha.dagger.io/gcp/gcloud.cue deleted file mode 100644 index 1a3f2a20..00000000 --- a/pkg/alpha.dagger.io/gcp/gcloud.cue +++ /dev/null @@ -1,56 +0,0 @@ -package gcp - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -// Re-usable gcloud component -#GCloud: { - config: #Config - version: string | *"366.0.0" - package: [string]: string | bool - - #up: [ - op.#Load & { - from: alpine.#Image & { - "package": package - "package": bash: true - "package": python3: true - "package": jq: true - "package": curl: true - } - }, - - // Install the gcloud cli - op.#Exec & { - args: ["sh", "-c", - #""" - curl -sfL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-\#(version)-linux-x86_64.tar.gz | tar -C /usr/local -zx - ln -s /usr/local/google-cloud-sdk/bin/gcloud /usr/local/bin - ln -s /usr/local/google-cloud-sdk/bin/gsutil /usr/local/bin - """#, - ] - }, - - op.#Exec & { - args: ["gcloud", "-q", "auth", "activate-service-account", "--key-file=/service_key"] - mount: "/service_key": secret: config.serviceKey - }, - - op.#Exec & { - args: ["gcloud", "-q", "config", "set", "project", config.project] - }, - - if config.region != null { - op.#Exec & { - args: ["gcloud", "-q", "config", "set", "compute/region", config.region] - } - }, - if config.zone != null { - op.#Exec & { - args: ["gcloud", "-q", "config", "set", "compute/zone", config.zone] - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/gcp/gcp.cue b/pkg/alpha.dagger.io/gcp/gcp.cue deleted file mode 100644 index ab439e75..00000000 --- a/pkg/alpha.dagger.io/gcp/gcp.cue +++ /dev/null @@ -1,18 +0,0 @@ -// Google Cloud Platform -package gcp - -import ( - "alpha.dagger.io/dagger" -) - -// Base Google Cloud Config -#Config: { - // GCP region - region: dagger.#Input & {*null | string} - // GCP zone - zone: dagger.#Input & {*null | string} - // GCP project - project: dagger.#Input & {string} - // GCP service key - serviceKey: dagger.#Input & {dagger.#Secret} -} diff --git a/pkg/alpha.dagger.io/gcp/gcr/gcr.cue b/pkg/alpha.dagger.io/gcp/gcr/gcr.cue deleted file mode 100644 index deafcfaf..00000000 --- a/pkg/alpha.dagger.io/gcp/gcr/gcr.cue +++ /dev/null @@ -1,47 +0,0 @@ -// Google Container Registry -package gcr - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/gcp" -) - -// Credentials retriever for GCR -#Credentials: { - // GCP Config - config: gcp.#Config - - // GCR registry username - username: "oauth2accesstoken" @dagger(output) - - // GCR registry secret - secret: { - string - - #up: [ - op.#Load & { - from: gcp.#GCloud & { - "config": config - } - }, - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - printf $(gcloud auth print-access-token) > /token.txt - """#, - ] - }, - - op.#Export & { - source: "/token.txt" - }, - ] - } @dagger(output) -} diff --git a/pkg/alpha.dagger.io/gcp/gcr/tests/gcr.cue b/pkg/alpha.dagger.io/gcp/gcr/tests/gcr.cue deleted file mode 100644 index 9c2f3add..00000000 --- a/pkg/alpha.dagger.io/gcp/gcr/tests/gcr.cue +++ /dev/null @@ -1,86 +0,0 @@ -package main - -import ( - "alpha.dagger.io/gcp" - "alpha.dagger.io/gcp/gcr" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/random" -) - -TestConfig: gcpConfig: gcp.#Config - -TestGCR: { - suffix: random.#String & { - seed: "" - } - - repository: "gcr.io/dagger-ci/test" - tag: "test-gcr-\(suffix.out)" - - creds: gcr.#Credentials & { - config: TestConfig.gcpConfig - } - - push: { - ref: "\(repository):\(tag)" - - #up: [ - op.#DockerBuild & { - dockerfile: """ - FROM alpine - RUN echo \(suffix.out) > /test - """ - }, - - op.#DockerLogin & { - target: repository - username: creds.username - secret: creds.secret - }, - - op.#PushContainer & { - "ref": ref - }, - ] - } - - pull: #up: [ - op.#DockerLogin & { - target: push.ref - username: creds.username - secret: creds.secret - }, - - op.#FetchContainer & { - ref: push.ref - }, - ] - - verify: #up: [ - op.#Load & { - from: pull - }, - - op.#Exec & { - always: true - args: [ - "sh", "-c", "test $(cat test) = \(suffix.out)", - ] - }, - ] - - verifyBuild: #up: [ - op.#DockerLogin & { - target: push.ref - username: creds.username - secret: creds.secret - }, - - op.#DockerBuild & { - dockerfile: #""" - FROM \#(push.ref) - RUN test $(cat test) = \#(suffix.out) - """# - }, - ] -} diff --git a/pkg/alpha.dagger.io/gcp/gcs/gcs.cue b/pkg/alpha.dagger.io/gcp/gcs/gcs.cue deleted file mode 100644 index cbe2f3f4..00000000 --- a/pkg/alpha.dagger.io/gcp/gcs/gcs.cue +++ /dev/null @@ -1,82 +0,0 @@ -// Google Cloud Storage -package gcs - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/gcp" -) - -// GCS Bucket object(s) sync -#Object: { - - // GCP Config - config: gcp.#Config - - // Source Artifact to upload to GCS - source: dagger.#Artifact @dagger(input) - - // Target GCS URL (eg. gs:////) - target: string @dagger(input) - - // Delete files that already exist on remote destination - delete: *false | true @dagger(input) - - // Object content type - contentType: string | *"" @dagger(input) - - // Always write the object to GCS - always: *true | false @dagger(input) - - // URL of the uploaded GCS object - url: { - string - - #up: [ - op.#Load & { - from: gcp.#GCloud & { - "config": config - } - }, - - op.#Exec & { - if always { - always: true - } - env: { - TARGET: target - OPT_CONTENT_TYPE: contentType - if delete { - OPT_DELETE: "1" - } - } - - mount: "/source": from: source - - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - opts=("-r") - [ -n "$OPT_CONTENT_TYPE" ] && opts+="-h Content-Type:$OPT_CONTENT_TYPE" - [ -n "$OPT_DELETE" ] && opts+="-d" - gsutil rsync ${opts[@]} /source "$TARGET" - echo -n "$TARGET" \ - | sed -E 's=^gs://([^/]*)/=https://storage.cloud.google.com/\1/=' \ - > /url - """#, - - ] - }, - - op.#Export & { - source: "/url" - format: "string" - }, - ] - } @dagger(output) -} diff --git a/pkg/alpha.dagger.io/gcp/gcs/tests/gcs.cue b/pkg/alpha.dagger.io/gcp/gcs/tests/gcs.cue deleted file mode 100644 index 22530ce2..00000000 --- a/pkg/alpha.dagger.io/gcp/gcs/tests/gcs.cue +++ /dev/null @@ -1,43 +0,0 @@ -package gcs - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/gcp" - "alpha.dagger.io/random" -) - -TestConfig: { - gcpConfig: gcp.#Config - bucket: string @dagger(input) -} - -TestDirectory: dagger.#Artifact - -TestGCSObject: { - suffix: random.#String & { - seed: "gcs" - } - - target: "gs://\(TestConfig.bucket)/\(suffix.out)/" - - deploy: #Object & { - always: true - config: TestConfig.gcpConfig - source: TestDirectory - "target": target - } - - verifyFile: #VerifyGCS & { - config: TestConfig.gcpConfig - target: deploy.target - url: deploy.url - file: "dirFile.txt" - } - - verifyDir: #VerifyGCS & { - config: TestConfig.gcpConfig - target: deploy.target - url: deploy.url - file: "foo.txt" - } -} diff --git a/pkg/alpha.dagger.io/gcp/gcs/tests/testdata/bar/foo.txt b/pkg/alpha.dagger.io/gcp/gcs/tests/testdata/bar/foo.txt deleted file mode 100644 index 616e65a3..00000000 --- a/pkg/alpha.dagger.io/gcp/gcs/tests/testdata/bar/foo.txt +++ /dev/null @@ -1 +0,0 @@ -Test recursivity \ No newline at end of file diff --git a/pkg/alpha.dagger.io/gcp/gcs/tests/testdata/dirFile.txt b/pkg/alpha.dagger.io/gcp/gcs/tests/testdata/dirFile.txt deleted file mode 100644 index 590f5066..00000000 --- a/pkg/alpha.dagger.io/gcp/gcs/tests/testdata/dirFile.txt +++ /dev/null @@ -1 +0,0 @@ -Test directory \ No newline at end of file diff --git a/pkg/alpha.dagger.io/gcp/gcs/tests/verify.cue b/pkg/alpha.dagger.io/gcp/gcs/tests/verify.cue deleted file mode 100644 index a0f72695..00000000 --- a/pkg/alpha.dagger.io/gcp/gcs/tests/verify.cue +++ /dev/null @@ -1,89 +0,0 @@ -package gcs - -import ( - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/gcp" -) - -#List: { - // GCP Config - config: gcp.#Config - - // Target GCP URL (e.g. gs:////) - target: string - - // URL: dummy URL, used to force a dependency - url: string - - contents: { - string - - #up: [ - op.#Load & { - from: gcp.#GCloud & { - "config": config - } - }, - - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - gsutil ls -r \#(target) > /contents - """#, - ] - env: URL: url - }, - - op.#Export & { - source: "/contents" - format: "string" - }, - ] - } -} - -#VerifyGCS: { - file: string - config: gcp.#Config - target: string - url: string - - lists: #List & { - "config": config - "target": target - "url": url - } - - test: #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - } - }, - - op.#WriteFile & { - dest: "/test" - content: lists.contents - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - "grep -q \(file) /test", - ] - }, - ] -} diff --git a/pkg/alpha.dagger.io/gcp/gke/gke.cue b/pkg/alpha.dagger.io/gcp/gke/gke.cue deleted file mode 100644 index 640fd62e..00000000 --- a/pkg/alpha.dagger.io/gcp/gke/gke.cue +++ /dev/null @@ -1,85 +0,0 @@ -// Google Kubernetes Engine -package gke - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/gcp" -) - -// KubeConfig config outputs a valid kube-auth-config for kubectl client -#KubeConfig: { - // GCP Config - config: gcp.#Config - - // GKE cluster name - clusterName: string @dagger(input) - - // Kubectl version - version: *"v1.19.9" | string @dagger(input) - - // kubeconfig is the generated kube configuration file - kubeconfig: { - // FIXME There is a problem with dagger.#Secret type - string - - #up: [ - op.#Load & { - from: gcp.#GCloud & { - "config": config - } - }, - - op.#WriteFile & { - dest: "/entrypoint.sh" - content: #Code - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - env: { - GKE_CLUSTER: clusterName - KUBECTL_VERSION: version - } - mount: "/cache/bin": "cache" - }, - op.#Export & { - source: "/kubeconfig" - format: "string" - }, - ] - } @dagger(output) -} - -#Code: #""" - [ -e /cache/bin/kubectl ] || { - curl -sfL https://dl.k8s.io/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /cache/bin/kubectl \ - && chmod +x /cache/bin/kubectl - } - - export KUBECONFIG=/kubeconfig - export PATH="$PATH:/cache/bin" - - # Generate a kube configiration - gcloud -q container clusters get-credentials "$GKE_CLUSTER" - - # Figure out the kubernetes username - CONTEXT="$(kubectl config current-context)" - USER="$(kubectl config view -o json | \ - jq -r ".contexts[] | select(.name==\"$CONTEXT\") | .context.user")" - - # Grab a kubernetes access token - ACCESS_TOKEN="$(gcloud -q config config-helper --format json --min-expiry 1h | \ - jq -r .credential.access_token)" - - # Remove the user config and replace it with the token - kubectl config unset "users.${USER}" - kubectl config set-credentials "$USER" --token "$ACCESS_TOKEN" - """# diff --git a/pkg/alpha.dagger.io/gcp/gke/tests/gke.cue b/pkg/alpha.dagger.io/gcp/gke/tests/gke.cue deleted file mode 100644 index 2f1c6a9e..00000000 --- a/pkg/alpha.dagger.io/gcp/gke/tests/gke.cue +++ /dev/null @@ -1,32 +0,0 @@ -package gke - -import ( - "alpha.dagger.io/gcp" - "alpha.dagger.io/gcp/gke" - "alpha.dagger.io/kubernetes" - "alpha.dagger.io/dagger/op" -) - -TestConfig: gcpConfig: gcp.#Config - -TestCluster: gke.#KubeConfig & { - config: TestConfig.gcpConfig - clusterName: "test-cluster" -} - -TestGKE: #up: [ - op.#Load & { - from: kubernetes.#Kubectl - }, - - op.#WriteFile & { - dest: "/kubeconfig" - content: TestCluster.kubeconfig - }, - - op.#Exec & { - always: true - args: ["kubectl", "get", "nodes"] - env: KUBECONFIG: "/kubeconfig" - }, -] diff --git a/pkg/alpha.dagger.io/gcp/secretmanager/secrets.cue b/pkg/alpha.dagger.io/gcp/secretmanager/secrets.cue deleted file mode 100644 index 18a673c4..00000000 --- a/pkg/alpha.dagger.io/gcp/secretmanager/secrets.cue +++ /dev/null @@ -1,76 +0,0 @@ -// Google Cloud Secret Manager -package secretmanager - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/gcp" - "alpha.dagger.io/os" -) - -#Secrets: { - // GCP Config - config: gcp.#Config - - // Map of secrets - secrets: [name=string]: dagger.#Secret - - // Deploy encrypted secrets - deployment: os.#Container & { - image: gcp.#GCloud & {"config": config} - shell: path: "/bin/bash" - always: true - - for name, s in secrets { - secret: "/tmp/secrets/\(name)": s - } - - command: #""" - # Loop on all files, including hidden files - shopt -s dotglob - echo "{}" > /tmp/output.json - for FILE in /tmp/secrets/*; do - BOOL=0 # Boolean - gcloud secrets describe "${FILE##*/}" 2>/dev/null > /dev/null - status=$? - - # If secret not found - if [[ ! "${status}" -eq 0 ]]; then - (\ - RES="$(gcloud secrets create "${FILE##*/}" --replication-policy automatic --data-file "${FILE}" --format='value(name)' 2>&1 | sed -n '1!p')" \ - && cat <<< $(cat /tmp/output.json | jq ".|.\"${FILE##*/}\"=\"$RES\"") > /tmp/output.json \ - ) || (echo "Error while creating secret ${FILE##*/}" >&2 && exit 1) - BOOL=1 - else - (\ - RES="$(gcloud secrets versions add "${FILE##*/}" --data-file "${FILE}" --format='value(name)' 2>&1 | sed -n '1!p')" \ - && cat <<< $(cat /tmp/output.json | jq ".|.\"${FILE##*/}\"=\"$RES\"") > /tmp/output.json \ - ) || (echo "Error while updating secret ${FILE##*/}" >&2 && exit 1) - BOOL=1 - fi - if [ $BOOL -eq 0 ]; then - (\ - RES="$(gcloud secrets describe "${FILE##*/}" --format='value(name)' 2>&1)" \ - && cat <<< $(cat /tmp/output.json | jq ".|.\"${FILE##*/}\"=\"$RES\"") > /tmp/output.json \ - ) || (echo "Error while retrieving secret ${FILE##*/}" >&2 && exit 1) - fi - done - """# - } - - // dynamic references - references: { - [string]: string - } - - references: #up: [ - op.#Load & { - from: deployment - }, - - op.#Export & { - source: "/tmp/output.json" - format: "json" - }, - ] -} diff --git a/pkg/alpha.dagger.io/gcp/secretmanager/tests/secrets.cue b/pkg/alpha.dagger.io/gcp/secretmanager/tests/secrets.cue deleted file mode 100644 index c2e7ed12..00000000 --- a/pkg/alpha.dagger.io/gcp/secretmanager/tests/secrets.cue +++ /dev/null @@ -1,33 +0,0 @@ -package secretmanager - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/gcp" - "alpha.dagger.io/gcp/secretmanager" - "alpha.dagger.io/os" -) - -TestConfig: gcpConfig: gcp.#Config - -TestSecrets: { - secret: secretmanager.#Secrets & { - config: TestConfig.gcpConfig - secrets: { - databasePassword: dagger.#Secret @dagger(input) - } - } - - if len(secret.references) > 0 { - cleanup: os.#Container & { - image: gcp.#GCloud & { - config: TestConfig.gcpConfig - } - shell: path: "/bin/bash" - always: true - - command: #""" - gcloud -q secrets delete databasePassword - """# - } - } -} diff --git a/pkg/alpha.dagger.io/git/commit.cue b/pkg/alpha.dagger.io/git/commit.cue deleted file mode 100644 index 2b424a27..00000000 --- a/pkg/alpha.dagger.io/git/commit.cue +++ /dev/null @@ -1,89 +0,0 @@ -package git - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" -) - -// Commit & push to git repository -#Commit: { - // Git repository - repository: { - // Repository source code - source: dagger.#Artifact - - // Repository remote URL - remote: dagger.#Input & {string} - - // Authentication token (PAT or password) - authToken: dagger.#Input & {*null | dagger.#Secret} - - // Git branch - branch: dagger.#Input & {string} - } - - // Username - name: dagger.#Input & {string} - - // Email - email: dagger.#Input & {string} - - // Commit message - message: dagger.#Input & {string} - - // Content to commit - content: dagger.#Artifact - - // Force push options - force: dagger.#Input & {*false | bool} - - _ctr: os.#Container & { - image: #Image - command: #""" - # Move changes into repository - mv /input/content/* . - - # Commit changes - git add . - git -c user.name="$USER_NAME" -c user.email="$USER_EMAIL" commit -m "$COMMIT_MESSAGE" - - # Push - git push "$OPT_FORCE" -u "$GIT_REMOTE" HEAD:refs/heads/"$GIT_BRANCH" - - # Retrieve commit hash - git rev-parse --verify HEAD | tr -d '\n' > /commit.txt - """# - dir: "/input/repo" - mount: { - "/input/repo": from: repository.source - "/input/content": from: content - } - env: { - USER_NAME: name - USER_EMAIL: email - COMMIT_MESSAGE: message - GIT_BRANCH: repository.branch - GIT_REMOTE: repository.remote - if force { - OPT_FORCE: "-f" - } - - } - if repository.authToken != null { - env: GIT_ASKPASS: "/get_authToken" - files: "/get_authToken": { - content: "cat /secrets/authToken" - mode: 0o500 - } - secret: "/secrets/authToken": repository.authToken - } - } - - // Commit hash - hash: { - os.#File & { - from: _ctr - path: "/commit.txt" - } - }.contents & dagger.#Output -} diff --git a/pkg/alpha.dagger.io/git/git.cue b/pkg/alpha.dagger.io/git/git.cue deleted file mode 100644 index 9aa70e34..00000000 --- a/pkg/alpha.dagger.io/git/git.cue +++ /dev/null @@ -1,163 +0,0 @@ -// Git operations -package git - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -// A git repository -#Repository: { - // Git remote link - remote: dagger.#Input & {string} - - // Git ref: can be a commit, tag or branch. - // Example: "main" - ref: dagger.#Input & {string} - - // (optional) Subdirectory - subdir: dagger.#Input & {*null | string} - - // (optional) Keep .git directory - keepGitDir: *false | bool - - // (optional) Add Personal Access Token - authToken: dagger.#Input & {*null | dagger.#Secret} - - // (optional) Add OAuth Token - authHeader: dagger.#Input & {*null | dagger.#Secret} - - #up: [ - op.#Load & { - from: alpine.#Image & { - package: git: true - } - }, - op.#Copy & { - from: [ - op.#FetchGit & { - "remote": remote - "ref": ref - if (keepGitDir) { - keepGitDir: true - } - if (authToken != null) { - "authToken": authToken - } - if (authHeader != null) { - "authHeader": authHeader - } - }, - ] - dest: "/repository" - }, - op.#Exec & { - dir: "/repository" - args: [ - "/bin/sh", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - code=$(git rev-parse --is-inside-work-tree 2>&1) - ([ "$code" = "true" ] && git remote set-url origin "$REMOTE") || true - """#, - ] - env: REMOTE: remote - }, - op.#Subdir & { - dir: "/repository" - }, - if subdir != null { - op.#Subdir & { - dir: subdir - } - }, - ] -} - -// Get the name of the current checked out branch or tag -#CurrentBranch: { - // Git repository - repository: dagger.#Artifact @dagger(input) - - // Git branch name - name: { - string - - #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: git: true - } - }, - - op.#Exec & { - mount: "/repository": from: repository - dir: "/repository" - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - printf "$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match)" > /name.txt - """#, - ] - }, - - op.#Export & { - source: "/name.txt" - format: "string" - }, - ] - } @dagger(output) -} - -// List tags of a repository -#Tags: { - // Git repository - repository: dagger.#Artifact @dagger(input) - - // Repository tags - tags: { - [...string] - - #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: jq: true - package: git: true - } - }, - - op.#Exec & { - mount: "/repository": from: repository - dir: "/repository" - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - git tag -l | jq --raw-input --slurp 'split("\n") | map(select(. != ""))' > /tags.json - """#, - ] - }, - - op.#Export & { - source: "/tags.json" - format: "json" - }, - ] - } @dagger(output) -} diff --git a/pkg/alpha.dagger.io/git/image.cue b/pkg/alpha.dagger.io/git/image.cue deleted file mode 100644 index 38da5a78..00000000 --- a/pkg/alpha.dagger.io/git/image.cue +++ /dev/null @@ -1,9 +0,0 @@ -package git - -import ( - "alpha.dagger.io/alpine" -) - -#Image: alpine.#Image & { - package: git: true -} diff --git a/pkg/alpha.dagger.io/git/tests/commit/commit.cue b/pkg/alpha.dagger.io/git/tests/commit/commit.cue deleted file mode 100644 index 90908c5b..00000000 --- a/pkg/alpha.dagger.io/git/tests/commit/commit.cue +++ /dev/null @@ -1,79 +0,0 @@ -package git - -import ( - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" - "alpha.dagger.io/random" -) - -TestAuthToken: dagger.#Input & {dagger.#Secret} - -TestRemote: dagger.#Input & {*"https://github.com/dagger/test.git" | string} - -TestRepository: #Repository & { - remote: TestRemote - ref: "main" - keepGitDir: true - authToken: TestAuthToken -} - -TestData: { - random.#String & { - seed: "git-commit" - } -}.out - -TestFile: os.#Dir & { - from: os.#Container & { - image: alpine.#Image - command: #""" - mkdir -p /output - echo "$MESSAGE" >> /output/test.md - """# - env: MESSAGE: TestData - } - path: "/output" -} - -TestCommit: #Commit & { - repository: { - remote: TestRemote - authToken: TestAuthToken - source: TestRepository - branch: "ci/test-commit" - } - content: TestFile - message: "This is a commit from the CI to test the repository" - name: "Dagger CI" - email: "daggerci@dagger.io" - force: true -} - -TestCheck: { - _TestRepo: #Repository & { - remote: TestRemote - ref: "ci/test-commit" - keepGitDir: true - authToken: TestAuthToken - } - - _ctr: os.#Container & { - image: #Image - command: #""" - # Check commit - git rev-parse --verify HEAD | grep "$GIT_HASH" - - # Check file - echo -n "$EXPECTED_MESSAGE" >> expect.md - diff test.md expect.md - """# - dir: "/input/repo" - mount: "/input/repo": from: _TestRepo - env: { - EXPECTED_MESSAGE: TestData - // Force dependency with interpolation - GIT_HASH: "\(TestCommit.hash)" - } - } -} diff --git a/pkg/alpha.dagger.io/git/tests/git/git.cue b/pkg/alpha.dagger.io/git/tests/git/git.cue deleted file mode 100644 index a619e15d..00000000 --- a/pkg/alpha.dagger.io/git/tests/git/git.cue +++ /dev/null @@ -1,111 +0,0 @@ -package git - -import ( - "strings" - - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" -) - -repo: #Repository & { - remote: "https://github.com/blocklayerhq/acme-clothing.git" - ref: "master" - keepGitDir: true -} - -repoSubDir: #Repository & { - remote: "https://github.com/dagger/examples.git" - ref: "main" - subdir: "todoapp" - keepGitDir: true -} - -branch: #CurrentBranch & { - repository: repo -} - -tagsList: #Tags & { - repository: repo -} - -TestRepository: os.#Container & { - image: alpine.#Image & { - package: bash: true - package: git: true - } - mount: "/repo1": from: repo - dir: "/repo1" - command: """ - [ -d .git ] - """ -} - -TestSubRepository: os.#Container & { - image: alpine.#Image & { - package: bash: true - package: git: true - } - mount: "/repo1": from: repoSubDir - dir: "/repo1" - command: """ - [ -d src ] - """ -} - -TestCurrentBranch: os.#Container & { - image: alpine.#Image & { - package: bash: true - package: git: true - } - env: BRANCH_NAME: branch.name - command: """ - [ $BRANCH_NAME = "master" ] - """ -} - -TestCurrentTags: os.#Container & { - image: alpine.#Image & { - package: bash: true - package: git: true - } - env: TAGS: strings.Join([ for k, v in tagsList.tags {"\(k)=\(v)"}], "\n") - command: """ - [ $TAGS = "0=master" ] - """ -} - -// Test fetching a private repo -TestPAT: dagger.#Input & {dagger.#Secret} - -privateRepo: #Repository & { - remote: "https://github.com/dagger/dagger.git" - ref: "main" - keepGitDir: true - authToken: TestPAT -} - -TestPrivateRepository: os.#Container & { - image: alpine.#Image & { - package: bash: true - package: git: true - } - mount: "/repo1": from: privateRepo - dir: "/repo1" - command: """ - [ -d .git ] - """ -} - -TestReferenceFormat: os.#Container & { - image: alpine.#Image & { - package: bash: true - package: git: true - } - mount: "/repo1": from: privateRepo - dir: "/repo1" - command: """ - URL="$(git ls-remote --get-url origin)" - [[ "$URL" = "https://github.com/dagger/dagger.git" ]] - """ -} diff --git a/pkg/alpha.dagger.io/go/go.cue b/pkg/alpha.dagger.io/go/go.cue deleted file mode 100644 index 4928b7ee..00000000 --- a/pkg/alpha.dagger.io/go/go.cue +++ /dev/null @@ -1,135 +0,0 @@ -// Go build operations -package go - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/docker" - - "alpha.dagger.io/os" -) - -// A standalone go environment -#Container: { - - // Go version to use - version: *"1.16" | string @dagger(input) - - // Source code - source: dagger.#Artifact @dagger(input) - - os.#Container & { - env: CGO_ENABLED: "0" - - image: docker.#Pull & { - from: "docker.io/golang:\(version)-alpine" - } - - // Setup source dir - let srcPath = "/src" - mount: "\(srcPath)": from: source - dir: srcPath - - // Setup go cache - let cachePath = "/root/.cache/gocache" - cache: "\(cachePath)": true - env: GOMODCACHE: cachePath - } -} - -// Re-usable component for the Go compiler -#Go: { - // Go version to use - version: *"1.16" | string @dagger(input) - - // Arguments to the Go binary - args: [...string] @dagger(input) - - // Source Directory to build - source: dagger.#Artifact @dagger(input) - - // Environment variables - env: { - [string]: string @dagger(input) - } - - #up: [ - op.#FetchContainer & { - ref: "docker.io/golang:\(version)-alpine" - }, - op.#Exec & { - "args": ["go"] + args - - "env": env - "env": CGO_ENABLED: "0" - "env": GOMODCACHE: "/root/.cache/gocache" - - dir: "/src" - mount: "/src": from: source - - mount: "/root/.cache": "cache" - }, - ] -} - -// Go application builder -#Build: { - // Go version to use - version: *#Go.version | string @dagger(input) - - // Source Directory to build - source: dagger.#Artifact @dagger(input) - - // Packages to build - packages: *"." | string @dagger(input) - - // Target architecture - arch: *"amd64" | string @dagger(input) - - // Target OS - os: *"linux" | string @dagger(input) - - // Build tags to use for building - tags: *"" | string @dagger(input) - - // LDFLAGS to use for linking - ldflags: *"" | string @dagger(input) - - // Specify the targeted binary name - output: string @dagger(output) - - // Environment variables - env: { - [string]: string @dagger(input) - } - - #up: [ - op.#Copy & { - from: #Go & { - "version": version - "source": source - "env": env - args: ["build", "-v", "-tags", tags, "-ldflags", ldflags, "-o", output, packages] - } - src: output - dest: output - }, - ] -} - -#Test: { - // Go version to use - version: *#Go.version | string @dagger(input) - - // Source Directory to build - source: dagger.#Artifact @dagger(input) - - // Packages to test - packages: *"." | string @dagger(input) - - #Go & { - "version": version - "source": source - args: ["test", "-v", packages] - } -} diff --git a/pkg/alpha.dagger.io/go/tests/go.cue b/pkg/alpha.dagger.io/go/tests/go.cue deleted file mode 100644 index 705e40b7..00000000 --- a/pkg/alpha.dagger.io/go/tests/go.cue +++ /dev/null @@ -1,33 +0,0 @@ -package go - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger/op" -) - -TestData: dagger.#Artifact @dagger(input) - -TestGoBuild: { - build: #Build & { - source: TestData - output: "/bin/testbin" - } - - test: #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - args: [ - "sh", - "-ec", - """ - test "$(/bin/testbin)" = "hello world" - """, - ] - mount: "/bin/testbin": { - from: build - path: "/bin/testbin" - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/go/tests/testdata/go.mod b/pkg/alpha.dagger.io/go/tests/testdata/go.mod deleted file mode 100644 index c4133132..00000000 --- a/pkg/alpha.dagger.io/go/tests/testdata/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module main - -go 1.14 diff --git a/pkg/alpha.dagger.io/go/tests/testdata/main.go b/pkg/alpha.dagger.io/go/tests/testdata/main.go deleted file mode 100644 index c0481191..00000000 --- a/pkg/alpha.dagger.io/go/tests/testdata/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("hello world") -} diff --git a/pkg/alpha.dagger.io/graphql/graphql.cue b/pkg/alpha.dagger.io/graphql/graphql.cue deleted file mode 100644 index 60ad3faa..00000000 --- a/pkg/alpha.dagger.io/graphql/graphql.cue +++ /dev/null @@ -1,39 +0,0 @@ -package graphql - -import ( - "encoding/json" - - "alpha.dagger.io/dagger" - "alpha.dagger.io/http" -) - -#Query: { - // Contents of the graphql query - query: string - // graphql variables - variable: [key=string]: _ - // graphql url - url: string - //API Token - token: dagger.#Input & dagger.#Secret | *null - - post: http.#Post & { - "url": url - request: { - body: json.Marshal({ - "query": query - variables: json.Marshal(variable) - }) - header: "Content-Type": "application/json" - token: token - } - } - - payload: { - data: {...} - errors?: {...} - } - payload: json.Unmarshal(post.response.body) - data: payload.data @dagger(output) - errors?: payload.errors @dagger(output) -} diff --git a/pkg/alpha.dagger.io/graphql/tests/graphql.cue b/pkg/alpha.dagger.io/graphql/tests/graphql.cue deleted file mode 100644 index ead94ca8..00000000 --- a/pkg/alpha.dagger.io/graphql/tests/graphql.cue +++ /dev/null @@ -1,55 +0,0 @@ -package graphql - -import ( - "encoding/json" - - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger" - "alpha.dagger.io/docker" - "alpha.dagger.io/os" - "alpha.dagger.io/http" -) - -TestDockersocket: dagger.#Stream & dagger.#Input - -TestQuery: { - - run: docker.#Run & { - name: "graphql-faker" - ref: "apisguru/graphql-faker" - socket: TestDockersocket - ports: ["8080:9002"] - } - - // Waits for TestRun to finish initializing - Testhealth: http.#Wait & { - url: "http://localhost:8080/graphql?query={%7BallCompanies%20%7B%0A%20%20%20%20id%0A%20%20%7D%0A%7D}" - } - - queryWithoutToken: #Query & { - url: Testhealth.url - query: #""" - { - company(id: "NjExNjAwMjE5Nw==") { - id - } - } - """# - } - - testRaw: os.#Container & { - image: alpine.#Image & { - package: jq: true - } - env: STATUS: "\(queryWithoutToken.post.response.statusCode)" - shell: args: ["--noprofile", "--norc", "-eo", "pipefail", "-c"] - files: "/content.json": { - content: json.Marshal(queryWithoutToken.data) - mode: 0o500 - } - command: #""" - test "$STATUS" = "200" - test "$(cat /content.json | jq '.allCompanies | length')" -gt 1 - """# - } -} diff --git a/pkg/alpha.dagger.io/helpers.bash b/pkg/alpha.dagger.io/helpers.bash deleted file mode 100644 index 72461590..00000000 --- a/pkg/alpha.dagger.io/helpers.bash +++ /dev/null @@ -1,109 +0,0 @@ -common_setup() { - load 'node_modules/bats-support/load' - load 'node_modules/bats-assert/load' - - # Dagger Binary - # FIXME: `command -v` must be wrapped in a sub-bash, - # otherwise infinite recursion when DAGGER_BINARY is not set. - export DAGGER="${DAGGER_BINARY:-$(bash -c 'command -v dagger')}" - - # Set the project to the universe directory (so tests can run from anywhere) - UNIVERSE="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )" - DAGGER_PROJECT="$UNIVERSE" - export DAGGER_PROJECT - - # Force plain printing for error reporting - DAGGER_LOG_FORMAT="plain" - export DAGGER_LOG_FORMAT - - # Sandbox project. - DAGGER_SANDBOX="$(mktemp -d -t dagger-project-XXXXXX)" - export DAGGER_SANDBOX - dagger init --project "$DAGGER_SANDBOX" - - # allows the use of `sops` - SOPS_AGE_KEY_FILE=~/.config/dagger/keys.txt - export SOPS_AGE_KEY_FILE -} - -# dagger helper to execute the right binary -dagger() { - "${DAGGER}" "$@" -} - -# copy an environment from the current project to the sandbox. -# -# this is needed if the test requires altering inputs without dirtying the -# current environment. -# Usage: -# copy_to_sandbox myenv -# dagger input secret -w "$DAGGER_SANDBOX" -e myenv "temporary change" -# dagger up --project "$DAGGER_SANDBOX" -e myenv -# -# To use testdata directory in tests, add the package name as second flag -# Usage: -# copy_to_sandbox myenv mypackage -copy_to_sandbox() { - local name="$1" - local source="$DAGGER_PROJECT"/.dagger/env/"$name" - local target="$DAGGER_SANDBOX"/.dagger/env/"$name" - - cp -a "$source" "$target" - - if [ -d "$2" ]; then - local package="$2" - local source_package="$DAGGER_PROJECT"/"$package" - local target_package="$DAGGER_SANDBOX"/ - - cp -a "$source_package" "$target_package" - fi -} - -# Check if there is a localstack instance. -# -# This is needed to do docs test in the CI. -skip_unless_local_localstack() { - if [ "$(curl -s http://localhost:4566)" = '{"status": "running"}' ]; then - echo "Localstack available" - else - skip "Localstack not available" - fi -} - -# Check if there is a local kubernetes cluster. -# -# This is need to do kubernetes test in the CI. -skip_unless_local_kube() { - if [ -f ~/.kube/config ] && grep -q "127.0.0.1" ~/.kube/config &> /dev/null; then - echo "Kubernetes available" - else - skip "local kubernetes cluster not available" - fi -} - -# Check if there is a local endpoint. -# -# This is necessary to do test with endpoint. -# Usage: -# skip_unless_endpoint_available "localhost:8080" -skip_unless_endpoint_available() { - local endpoint="$1" - - curl "$endpoint" -} - -# Cleanup local Localstack instances -setup_localstack() { - if [ "$(curl -s http://localhost:4566)" = '{"status": "running"}' ] && \ - [ "$GITHUB_ACTIONS" != "true" ]; then - echo "Cleanup local LOCALSTACK" - - # S3 buckets cleanup - aws --endpoint-url=http://localhost:4566 s3 rm s3://dagger-ci || true - aws --endpoint-url=http://localhost:4566 s3 mb s3://dagger-ci || true - - # ECR repositories cleanup - aws --endpoint-url=http://localhost:4566 ecr delete-repository --repository-name dagger-ci || true - aws --endpoint-url=http://localhost:4566 ecr create-repository --repository-name dagger-ci || true - fi -} \ No newline at end of file diff --git a/pkg/alpha.dagger.io/http/http.cue b/pkg/alpha.dagger.io/http/http.cue deleted file mode 100644 index fd73668a..00000000 --- a/pkg/alpha.dagger.io/http/http.cue +++ /dev/null @@ -1,159 +0,0 @@ -package http - -import ( - "encoding/json" - "strconv" - - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/os" -) - -#Get: #Do & {method: "GET"} -#Post: #Do & {method: "POST"} -#Put: #Do & {method: "PUT"} -#Delete: #Do & {method: "DELETE"} -#Do: { - url: string - method: "GET" | "POST" | "PUT" | "DELETE" | "PATH" | "HEAD" - - request: { - body: string | *"" - header: [string]: string | [...string] - token: dagger.#Secret | *null - } - - ctr: os.#Container & { - image: alpine.#Image & { - package: curl: true - package: bash: true - package: jq: true - } - shell: path: "/bin/bash" - always: true - - env: { - METHOD: method - HEADERS: json.Marshal(request.header) - BODY: request.body - URL: url - } - if request.token != null { - secret: "/token": request.token - } - command: #""" - curlArgs=( - "$URL" - -L --fail --silent --show-error - --write-out "%{http_code}" - -X "$METHOD" - -o /response - ) - - [ -n "$BODY" ] && curlArgs+=("-d" "'$BODY'") - - headers="$(echo $HEADERS | jq -r 'to_entries | map(.key + ": " + (.value | tostring) + "\n") | add')" - while read h; do - curlArgs+=("-H" "'$h'") - done <<< "$headers" - if [ -e /token ]; then - curlArgs+=("-H" "Authorization: bearer $(cat /token)") - fi - curl "${curlArgs[@]}" > /status - """# - } - - statusCode: { - os.#File & { - from: ctr - path: "/status" - } - }.contents @dagger(output) - - body: { - os.#File & { - from: ctr - path: "/response" - } - }.contents @dagger(output) - - // Force os.#File exec before Atoi - response: { - "body": body - "statusCode": strconv.Atoi(statusCode) - } -} - -// URL listener -// Creates a dependency on URL -#Wait: { - // URL to listen - url: string - - // Waiting time between checks (sec.) - interval: int | *30 - - // Max amount of retries - retries: int | *3 - - // Max initialization time (sec.) - startPeriod: int | *0 - - // Time until timeout (sec.) - timeout: int | *30 - - // Env variables - env: [string]: string - - #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: curl: true - } - }, - op.#Exec & { - args: ["/bin/bash", "-c", - #""" - # (f: str -> int) - nb_retries=$(($NB_RETRIES+0)) - starting_period=$(($START_PERIOD+0)) - - status="0" - SECONDS=0 - # START_PERIOD implementation - while [ $SECONDS -lt $starting_period ]; do - status="$(curl --connect-timeout 1 -s -o /dev/null -w ''%{http_code}'' $HEALTH_URL)" - if [ "$status" == "200" ]; then - exit 0; - fi - sleep 1; - done - - # TIMEOUT, INTERVAL, INTERVAL implementation - for ((i=0;i/dev/null - test "$STATUS" = "200" - """# -} diff --git a/pkg/alpha.dagger.io/io/io.cue b/pkg/alpha.dagger.io/io/io.cue deleted file mode 100644 index a1fec92e..00000000 --- a/pkg/alpha.dagger.io/io/io.cue +++ /dev/null @@ -1,40 +0,0 @@ -// IO operations -package io - -// Standard interface for directory operations in cue -#Dir: { - read: tree: string - ... -} - -// Standard interface for file operations in cue -#File: { - #Reader - #Writer - ... -} - -// Standard ReadWriter interface -#ReadWriter: #Reader & #Writer - -// Standard Reader interface -#Reader: { - read: { - // FIXME: support different data schemas for different formats - format: "string" | "json" | "yaml" | "lines" - data: { - string - } - } - ... -} - -// Standard Writer interface -#Writer: { - write: *null | { - // FIXME: support writing in multiple formats - // FIXME: append - data: _ - } - ... -} diff --git a/pkg/alpha.dagger.io/java/maven/maven.cue b/pkg/alpha.dagger.io/java/maven/maven.cue deleted file mode 100644 index 59323d26..00000000 --- a/pkg/alpha.dagger.io/java/maven/maven.cue +++ /dev/null @@ -1,69 +0,0 @@ -// Maven is a build automation tool for Java -package maven - -import ( - "strings" - - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" - "alpha.dagger.io/os" -) - -// A Maven project -#Project: { - - // Application source code - source: dagger.#Artifact @dagger(input) - - // Extra alpine packages to install - package: { - [string]: true | false | string - } @dagger(input) - - // Environment variables - env: { - [string]: string - } @dagger(input) - - phases: [...string] | *["package"] @dagger(input) - goals: [...string] | *[] @dagger(input) - - // Optional arguments for the script - args: [...string] | *[] @dagger(input) - - // Build output directory - build: os.#Dir & { - from: ctr - path: "/build" - } @dagger(output) - - ctr: os.#Container & { - image: alpine.#Image & { - "package": package & { - bash: true - openjdk11: true - maven: true - } - } - shell: path: "/bin/bash" - command: """ - opts=( $(echo $MAVEN_ARGS) ) - mvn $MAVEN_GOALS $MAVEN_PHASES ${opts[@]} - result=$? - modules=$(mvn -Dexec.executable='pwd' -Dexec.args='${project.artifactId}' exec:exec -q) - for module in $modules;do - source=$(echo "$module/target" | tr -s /) - target=$(echo "/build/$module" | tr -s /) - mkdir -p $target;cp -a $source $target 2>/dev/null || : - done - exit $result - """ - "env": env & { - MAVEN_ARGS: strings.Join(args, "\n") - MAVEN_PHASES: strings.Join(phases, "\n") - MAVEN_GOALS: strings.Join(goals, "\n") - } - dir: "/" - copy: "/": from: source - } -} diff --git a/pkg/alpha.dagger.io/java/maven/tests/maven.cue b/pkg/alpha.dagger.io/java/maven/tests/maven.cue deleted file mode 100644 index ffc09b17..00000000 --- a/pkg/alpha.dagger.io/java/maven/tests/maven.cue +++ /dev/null @@ -1,43 +0,0 @@ -package maven - -import ( - "strings" - - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" - "alpha.dagger.io/os" -) - -TestData: dagger.#Artifact - -TestConfig: mavenOpts: strings.Join([ - "-client", - "-XX:+TieredCompilation", - "-XX:TieredStopAtLevel=1", - "-Xverify:none", - "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true", - "-Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss", -], " ") - -TestSpringBoot: { - project: #Project & { - source: TestData - - phases: ["install"] - - env: MAVEN_OPTS: TestConfig.mavenOpts - - args: ["--batch-mode"] - } - - test: os.#Container & { - image: alpine.#Image & { - package: bash: true - } - copy: "/build": from: project.build - command: """ - count=$(ls -1 /build/**/*.jar 2>/dev/null | wc -l) - test "$count" != "0" - """ - } -} diff --git a/pkg/alpha.dagger.io/java/maven/tests/testdata/.gitignore b/pkg/alpha.dagger.io/java/maven/tests/testdata/.gitignore deleted file mode 100644 index 549e00a2..00000000 --- a/pkg/alpha.dagger.io/java/maven/tests/testdata/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ diff --git a/pkg/alpha.dagger.io/java/maven/tests/testdata/pom.xml b/pkg/alpha.dagger.io/java/maven/tests/testdata/pom.xml deleted file mode 100644 index a4516bed..00000000 --- a/pkg/alpha.dagger.io/java/maven/tests/testdata/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.5.2 - - - io.dagger.maven - spring-boot-test - 0.0.1-SNAPSHOT - spring-boot-test - Dagger maven spring boot test - - 11 - - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/pkg/alpha.dagger.io/java/maven/tests/testdata/src/main/java/io/dagger/maven/springboottest/SpringBootTestApplication.java b/pkg/alpha.dagger.io/java/maven/tests/testdata/src/main/java/io/dagger/maven/springboottest/SpringBootTestApplication.java deleted file mode 100644 index 68b09e3e..00000000 --- a/pkg/alpha.dagger.io/java/maven/tests/testdata/src/main/java/io/dagger/maven/springboottest/SpringBootTestApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.dagger.maven.springboottest; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootTestApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootTestApplication.class, args); - } - -} diff --git a/pkg/alpha.dagger.io/java/maven/tests/testdata/src/main/resources/application.properties b/pkg/alpha.dagger.io/java/maven/tests/testdata/src/main/resources/application.properties deleted file mode 100644 index 8b137891..00000000 --- a/pkg/alpha.dagger.io/java/maven/tests/testdata/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ - diff --git a/pkg/alpha.dagger.io/java/maven/tests/testdata/src/test/java/io/dagger/maven/springboottest/SpringBootTestApplicationTests.java b/pkg/alpha.dagger.io/java/maven/tests/testdata/src/test/java/io/dagger/maven/springboottest/SpringBootTestApplicationTests.java deleted file mode 100644 index 6419b115..00000000 --- a/pkg/alpha.dagger.io/java/maven/tests/testdata/src/test/java/io/dagger/maven/springboottest/SpringBootTestApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.dagger.maven.springboottest; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class SpringBootTestApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/pkg/alpha.dagger.io/js/yarn/tests/testdata/package.json b/pkg/alpha.dagger.io/js/yarn/tests/testdata/package.json deleted file mode 100644 index 60c2e43d..00000000 --- a/pkg/alpha.dagger.io/js/yarn/tests/testdata/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "test", - "main": "index.js", - "license": { - "type": "Apache-2.0", - "url": "https://opensource.org/licenses/apache2.0.php" - }, - "scripts": { - "build": "mkdir -p ./build && echo output > ./build/test && touch .env && cp .env ./build/" - } -} diff --git a/pkg/alpha.dagger.io/js/yarn/tests/testdata2/package.json b/pkg/alpha.dagger.io/js/yarn/tests/testdata2/package.json deleted file mode 100644 index 94746735..00000000 --- a/pkg/alpha.dagger.io/js/yarn/tests/testdata2/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "test", - "main": "index.js", - "license": { - "type": "Apache-2.0", - "url": "https://opensource.org/licenses/apache2.0.php" - }, - "scripts": { - "build": "mkdir -p ./build && cp /.env ./build/env" - } - } - \ No newline at end of file diff --git a/pkg/alpha.dagger.io/js/yarn/tests/yarn.cue b/pkg/alpha.dagger.io/js/yarn/tests/yarn.cue deleted file mode 100644 index 9c7dc98f..00000000 --- a/pkg/alpha.dagger.io/js/yarn/tests/yarn.cue +++ /dev/null @@ -1,57 +0,0 @@ -package yarn - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" - "alpha.dagger.io/os" -) - -TestData: dagger.#Artifact - -TestReact: { - pkg: #Package & { - source: TestData - } - - test: os.#Container & { - image: alpine.#Image & { - package: bash: true - } - mount: "/build": from: pkg.build - command: """ - test "$(cat /build/test)" = "output" - """ - } -} - -TestData2: dagger.#Artifact - -TestSecretsAndFile: { - pkg: #Package & { - source: TestData2 - writeEnvFile: "/.env" - env: { - one: "one" - two: "two" - } - secrets: { - secretone: dagger.#Secret @dagger(input) - secretwo: dagger.#Secret @dagger(input) - } - } - - test: os.#Container & { - image: alpine.#Image & { - package: bash: true - } - shell: path: "/bin/bash" - mount: "/build": from: pkg.build - command: """ - content="$(cat /build/env)" - [[ "${content}" = *"SECRETONE="* ]] && \\ - [[ "${content}" = *"SECRETWO="* ]] && \\ - [[ "${content}" = *"ONE=one"* ]] && \\ - [[ "${content}" = *"TWO=two"* ]] - """ - } -} diff --git a/pkg/alpha.dagger.io/js/yarn/yarn.cue b/pkg/alpha.dagger.io/js/yarn/yarn.cue deleted file mode 100644 index 84b72fb1..00000000 --- a/pkg/alpha.dagger.io/js/yarn/yarn.cue +++ /dev/null @@ -1,100 +0,0 @@ -// Yarn is a package manager for Javascript applications -package yarn - -import ( - "strings" - - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" - "alpha.dagger.io/os" -) - -// A Yarn package -#Package: { - // Application source code - source: dagger.#Artifact @dagger(input) - - // Extra alpine packages to install - package: { - [string]: true | false | string - } @dagger(input) - - // working directory to use - cwd: *"." | string @dagger(input) - - // Environment variables - env: { - [string]: string - } @dagger(input) - - // Write the contents of `environment` to this file, - // in the "envfile" format - writeEnvFile: string | *"" @dagger(input) - - // Read build output from this directory - // (path must be relative to working directory) - buildDir: string | *"build" @dagger(input) - - // Run this yarn script - script: string | *"build" @dagger(input) - - // Optional arguments for the script - args: [...string] | *[] @dagger(input) - - // Secret variables - secrets: [string]: dagger.#Secret - - // Build output directory - build: os.#Dir & { - from: ctr - path: "/build" - } @dagger(output) - - ctr: os.#Container & { - image: alpine.#Image & { - "package": package & { - bash: true - yarn: true - } - } - shell: path: "/bin/bash" - command: """ - # Create $ENVFILE_NAME file if set - [ -n "$ENVFILE_NAME" ] && echo "$ENVFILE" > "$ENVFILE_NAME" - - # Safely export secrets, or prepend them to $ENVFILE_NAME if set - shopt -s dotglob - for FILE in /tmp/secrets/*; do - val=$(echo "${FILE##*/}" | tr '[:lower:]' '[:upper:]') # Collect name - path=$(cat "$FILE") # Collect value - # Prepend - [ -n "$ENVFILE_NAME" ] && echo "$val=$path"$'\n'"$(cat "$ENVFILE_NAME")" > "$ENVFILE_NAME" \\ - || export "$val"="$path" # Or export - done - - # Execute - yarn --cwd "$YARN_CWD" install --production false - - opts=( $(echo $YARN_ARGS) ) - yarn --cwd "$YARN_CWD" run "$YARN_BUILD_SCRIPT" ${opts[@]} - mv "$YARN_BUILD_DIRECTORY" /build - """ - "env": env & { - YARN_BUILD_SCRIPT: script - YARN_ARGS: strings.Join(args, "\n") - YARN_CACHE_FOLDER: "/cache/yarn" - YARN_CWD: cwd - YARN_BUILD_DIRECTORY: buildDir - if writeEnvFile != "" { - ENVFILE_NAME: writeEnvFile - ENVFILE: strings.Join([ for k, v in env {"\(k)=\(v)"}], "\n") - } - } - for name, s in secrets { - secret: "/tmp/secrets/\(name)": s - } - dir: "/src" - mount: "/src": from: source - cache: "/cache/yarn": true - } -} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/code.cue b/pkg/alpha.dagger.io/kubernetes/helm/code.cue deleted file mode 100644 index c32ebc0f..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/code.cue +++ /dev/null @@ -1,43 +0,0 @@ -package helm - -#code: #""" - # Add the repository - if [ -n "$HELM_REPO" ]; then - helm repo add repository "${HELM_REPO}" - helm repo update - fi - - # If the chart is a file, then it's the chart name - # If it's a directly, then it's the contents of the cart - if [ -f "/helm/chart" ]; then - HELM_CHART="repository/$(cat /helm/chart)" - else - HELM_CHART="/helm/chart" - fi - - OPTS="" - OPTS="$OPTS --timeout "$HELM_TIMEOUT"" - OPTS="$OPTS --namespace "$KUBE_NAMESPACE"" - [ "$HELM_WAIT" = "true" ] && OPTS="$OPTS --wait" - [ "$HELM_ATOMIC" = "true" ] && OPTS="$OPTS --atomic" - [ -f "/helm/values.yaml" ] && OPTS="$OPTS -f /helm/values.yaml" - - # Select the namespace - kubectl create namespace "$KUBE_NAMESPACE" || true - - case "$HELM_ACTION" in - install) - helm install $OPTS "$HELM_NAME" "$HELM_CHART" - ;; - upgrade) - helm upgrade $OPTS "$HELM_NAME" "$HELM_CHART" - ;; - installOrUpgrade) - helm upgrade $OPTS --install "$HELM_NAME" "$HELM_CHART" - ;; - *) - echo unsupported helm action "$HELM_ACTION" - exit 1 - ;; - esac - """# diff --git a/pkg/alpha.dagger.io/kubernetes/helm/helm.cue b/pkg/alpha.dagger.io/kubernetes/helm/helm.cue deleted file mode 100644 index 8c0a9beb..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/helm.cue +++ /dev/null @@ -1,143 +0,0 @@ -// Helm package manager -package helm - -import ( - "strconv" - - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/kubernetes" -) - -// Install a Helm chart -#Chart: { - - // Helm deployment name - name: dagger.#Input & {string} - - // Helm chart to install from source - chartSource: *null | dagger.#Artifact - - // Helm chart to install from repository - chart: dagger.#Input & {*null | string} - - // Helm chart repository - repository: dagger.#Input & {*null | string} - - // Helm values (either a YAML string or a Cue structure) - values: dagger.#Input & {*null | string} - - // Kubernetes Namespace to deploy to - namespace: dagger.#Input & {string} - - // Helm action to apply - action: dagger.#Input & {*"installOrUpgrade" | "install" | "upgrade"} - - // time to wait for any individual Kubernetes operation (like Jobs for hooks) - timeout: dagger.#Input & {string | *"5m"} - - // if set, will wait until all Pods, PVCs, Services, and minimum number of - // Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state - // before marking the release as successful. - // It will wait for as long as timeout - wait: dagger.#Input & {*true | bool} - - // if set, installation process purges chart on fail. - // The wait option will be set automatically if atomic is used - atomic: dagger.#Input & {*true | bool} - - // Kube config file - kubeconfig: dagger.#Input & {string | dagger.#Secret} - - // Helm version - version: dagger.#Input & {*"3.5.2" | string} - - // Kubectl version - kubectlVersion: dagger.#Input & {*"v1.19.9" | string} - - #up: [ - op.#Load & { - from: kubernetes.#Kubectl & { - version: kubectlVersion - } - }, - op.#Exec & { - env: HELM_VERSION: version - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - # Install Yarn - curl -sfL -S https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | \ - tar -zx -C /tmp && \ - mv /tmp/linux-amd64/helm /usr/local/bin && \ - chmod +x /usr/local/bin/helm - """#, - ] - }, - op.#Mkdir & { - path: "/helm" - }, - op.#WriteFile & { - dest: "/entrypoint.sh" - content: #code - }, - - if (kubeconfig & string) != _|_ { - op.#WriteFile & { - dest: "/kubeconfig" - content: kubeconfig - mode: 0o600 - } - }, - - if chart != null { - op.#WriteFile & { - dest: "/helm/chart" - content: chart - } - }, - if values != null { - op.#WriteFile & { - dest: "/helm/values.yaml" - content: values - } - }, - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - env: { - KUBECONFIG: "/kubeconfig" - KUBE_NAMESPACE: namespace - - if repository != null { - HELM_REPO: repository - } - HELM_NAME: name - HELM_ACTION: action - HELM_TIMEOUT: timeout - HELM_WAIT: strconv.FormatBool(wait) - HELM_ATOMIC: strconv.FormatBool(atomic) - } - mount: { - if chartSource != null && chart == null { - "/helm/chart": from: chartSource - } - if (kubeconfig & dagger.#Secret) != _|_ { - "/kubeconfig": secret: kubeconfig - } - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/helm.cue b/pkg/alpha.dagger.io/kubernetes/helm/tests/helm.cue deleted file mode 100644 index a1d5b916..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/helm.cue +++ /dev/null @@ -1,57 +0,0 @@ -package helm - -import ( - "alpha.dagger.io/random" - "alpha.dagger.io/dagger" -) - -// We assume that a kinD cluster is running locally -// To deploy a local KinD cluster, follow this link : https://kind.sigs.k8s.io/docs/user/quick-start/ -TestKubeconfig: dagger.#Input & {string} - -TestChartSource: dagger.#Input & {dagger.#Artifact} - -// Deploy user local chart -TestHelmSimpleChart: { - suffix: random.#String & { - seed: "simple" - length: 5 - } - - // Deploy chart - deploy: #Chart & { - name: "dagger-test-inline-\(suffix.out)" - namespace: "dagger-test" - kubeconfig: TestKubeconfig - chartSource: TestChartSource - } - - // Verify deployment - verify: #VerifyHelm & { - chartName: deploy.name - namespace: deploy.namespace - } -} - -// Deploy remote chart -TestHelmRepoChart: { - suffix: random.#String & { - seed: "repo" - length: 5 - } - - // Deploy remote chart - deploy: #Chart & { - name: "dagger-test-repository-\(suffix.out)" - namespace: "dagger-test" - kubeconfig: TestKubeconfig - repository: "https://charts.bitnami.com/bitnami" - chart: "redis" - } - - // Verify deployment - verify: #VerifyHelm & { - chartName: deploy.name - namespace: deploy.namespace - } -} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/.helmignore b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/Chart.yaml b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/Chart.yaml deleted file mode 100644 index 1613bff5..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v2 -name: mychart -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: 1.16.0 diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/NOTES.txt b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/NOTES.txt deleted file mode 100644 index 8b795a8a..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/NOTES.txt +++ /dev/null @@ -1,21 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "mychart.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "mychart.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "mychart.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mychart.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/_helpers.tpl b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/_helpers.tpl deleted file mode 100644 index 8479665d..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mychart.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mychart.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "mychart.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "mychart.labels" -}} -helm.sh/chart: {{ include "mychart.chart" . }} -{{ include "mychart.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "mychart.selectorLabels" -}} -app.kubernetes.io/name: {{ include "mychart.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mychart.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mychart.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/deployment.yaml b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/deployment.yaml deleted file mode 100644 index 38e698f8..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/deployment.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "mychart.fullname" . }} - labels: - {{- include "mychart.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "mychart.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "mychart.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "mychart.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 80 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/ingress.yaml b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/ingress.yaml deleted file mode 100644 index 76d277c0..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/ingress.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "mychart.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "mychart.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ . }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} -{{- end }} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/service.yaml b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/service.yaml deleted file mode 100644 index bdceb88f..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "mychart.fullname" . }} - labels: - {{- include "mychart.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "mychart.selectorLabels" . | nindent 4 }} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/serviceaccount.yaml b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/serviceaccount.yaml deleted file mode 100644 index 145e891e..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "mychart.serviceAccountName" . }} - labels: - {{- include "mychart.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end -}} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/tests/test-connection.yaml b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/tests/test-connection.yaml deleted file mode 100644 index 0bd46ef1..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "mychart.fullname" . }}-test-connection" - labels: - {{- include "mychart.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "mychart.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/values.yaml b/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/values.yaml deleted file mode 100644 index dbf4257e..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/testdata/mychart/values.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# Default values for mychart. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: nginx - pullPolicy: IfNotPresent - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/pkg/alpha.dagger.io/kubernetes/helm/tests/verify.cue b/pkg/alpha.dagger.io/kubernetes/helm/tests/verify.cue deleted file mode 100644 index f932dbff..00000000 --- a/pkg/alpha.dagger.io/kubernetes/helm/tests/verify.cue +++ /dev/null @@ -1,51 +0,0 @@ -package helm - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/kubernetes" -) - -#VerifyHelm: { - chartName: string - - namespace: string - - // Verify that pod exist - #getHelmPods: - """ - kubectl get pods --namespace "$KUBE_NAMESPACE" | grep "\(chartName)" - """ - - #up: [ - op.#Load & { - from: kubernetes.#Kubectl - }, - - op.#WriteFile & { - dest: "/getHelmPods.sh" - content: #getHelmPods - }, - - op.#WriteFile & { - dest: "/kubeconfig" - content: TestKubeconfig - mode: 0o600 - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/getHelmPods.sh", - ] - env: { - KUBECONFIG: "/kubeconfig" - KUBE_NAMESPACE: namespace - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/kubernetes/kubernetes.cue b/pkg/alpha.dagger.io/kubernetes/kubernetes.cue deleted file mode 100644 index e4d794c5..00000000 --- a/pkg/alpha.dagger.io/kubernetes/kubernetes.cue +++ /dev/null @@ -1,132 +0,0 @@ -// Kubernetes client operations -package kubernetes - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" -) - -// Kubectl client -#Kubectl: { - - // Kubectl version - version: dagger.#Input & {*"v1.19.9" | string} - - #code: #""" - [ -e /usr/local/bin/kubectl ] || { - curl -sfL https://dl.k8s.io/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \ - && chmod +x /usr/local/bin/kubectl - } - """# - - #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: jq: true - package: curl: true - } - }, - op.#WriteFile & { - dest: "/entrypoint.sh" - content: #code - }, - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - env: KUBECTL_VERSION: version - }, - ] -} - -// Apply Kubernetes resources -#Resources: { - - // Kubernetes config to deploy - source: dagger.#Input & {*null | dagger.#Artifact} - - // Kubernetes manifest to deploy inlined in a string - manifest: dagger.#Input & {*null | string} - - // Kubernetes manifest url to deploy remote configuration - url: dagger.#Input & {*null | string} - - // Kubernetes Namespace to deploy to - namespace: dagger.#Input & {*"default" | string} - - // Version of kubectl client - version: dagger.#Input & {*"v1.19.9" | string} - - // Kube config file - kubeconfig: dagger.#Input & {string | dagger.#Secret} - - #code: #""" - kubectl create namespace "$KUBE_NAMESPACE" > /dev/null 2>&1 || true - - if [ -d /source ] || [ -f /source ]; then - kubectl --namespace "$KUBE_NAMESPACE" apply -R -f /source - exit 0 - fi - - if [ -n "$DEPLOYMENT_URL" ]; then - kubectl --namespace "$KUBE_NAMESPACE" apply -R -f "$DEPLOYMENT_URL" - exit 0 - fi - """# - - #up: [ - op.#Load & { - from: #Kubectl & {"version": version} - }, - op.#WriteFile & { - dest: "/entrypoint.sh" - content: #code - }, - - if (kubeconfig & string) != _|_ { - op.#WriteFile & { - dest: "/kubeconfig" - content: kubeconfig - mode: 0o600 - } - }, - - if manifest != null { - op.#WriteFile & { - dest: "/source" - content: manifest - } - }, - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - env: { - KUBECONFIG: "/kubeconfig" - KUBE_NAMESPACE: namespace - if url != null { - DEPLOYMENT_URL: url - } - } - if manifest == null && source != null { - mount: "/source": from: source - } - if (kubeconfig & dagger.#Secret) != _|_ { - mount: "/kubeconfig": secret: kubeconfig - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/kubernetes/kustomize/kustomization.cue b/pkg/alpha.dagger.io/kubernetes/kustomize/kustomization.cue deleted file mode 100644 index ab90ad5e..00000000 --- a/pkg/alpha.dagger.io/kubernetes/kustomize/kustomization.cue +++ /dev/null @@ -1,99 +0,0 @@ -// Kustomize config management -package kustomize - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" -) - -#Kustomization: { - // Kustomize binary version - version: *"v3.8.7" | string @dagger(input) - - #code: #""" - [ -e /usr/local/bin/kubectl ] || { - curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash && mv kustomize /usr/local/bin - } - """# - - #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: jq: true - package: curl: true - } - }, - - op.#WriteFile & { - dest: "/entrypoint.sh" - content: #code - }, - - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - }, - ] -} - -// Apply a Kubernetes Kustomize folder -#Kustomize: { - // Kubernetes source - source: dagger.#Artifact @dagger(input) - - // Optional Kustomization file - kustomization: string @dagger(input) - - // Kustomize binary version - version: *"v3.8.7" | string @dagger(input) - - #code: #""" - cp /kustomization.yaml /source | true - mkdir -p /output - kustomize build /source >> /output/result.yaml - """# - - #up: [ - op.#Load & { - from: #Kustomization & {"version": version} - }, - - op.#WriteFile & { - dest: "/entrypoint.sh" - content: #code - }, - - if kustomization != _|_ { - op.#WriteFile & { - dest: "/kustomization.yaml" - content: kustomization - mode: 0o600 - } - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/entrypoint.sh", - ] - mount: "/source": from: source - }, - - op.#Subdir & { - dir: "/output" - }, - ] -} diff --git a/pkg/alpha.dagger.io/kubernetes/kustomize/tests/kustomize.cue b/pkg/alpha.dagger.io/kubernetes/kustomize/tests/kustomize.cue deleted file mode 100644 index f1f204be..00000000 --- a/pkg/alpha.dagger.io/kubernetes/kustomize/tests/kustomize.cue +++ /dev/null @@ -1,31 +0,0 @@ -package kustomize - -import ( - "encoding/yaml" - "alpha.dagger.io/dagger" -) - -TestKustomize: { - testdata: dagger.#Artifact - - // Run Kustomize - kustom: #Kustomize & { - source: testdata - kustomization: yaml.Marshal({ - resources: ["deployment.yaml", "pod.yaml"] - images: [{ - name: "nginx" - newTag: "v1" - }] - replicas: [{ - name: "nginx-deployment" - count: 2 - }] - }) - } - - // Verify kustomization generation - verify: #VerifyKustomize & { - source: kustom - } -} diff --git a/pkg/alpha.dagger.io/kubernetes/kustomize/tests/testdata/deployment.yaml b/pkg/alpha.dagger.io/kubernetes/kustomize/tests/testdata/deployment.yaml deleted file mode 100644 index e47d13ff..00000000 --- a/pkg/alpha.dagger.io/kubernetes/kustomize/tests/testdata/deployment.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-deployment - labels: - app: nginx-deployment -spec: - replicas: 1 - template: - metadata: - name: nginx-deployment - labels: - app: nginx-deployment - spec: - containers: - - name: nginx-deployment - image: nginx - imagePullPolicy: IfNotPresent - restartPolicy: Always - selector: - matchLabels: - app: nginx-deployment diff --git a/pkg/alpha.dagger.io/kubernetes/kustomize/tests/testdata/pod.yaml b/pkg/alpha.dagger.io/kubernetes/kustomize/tests/testdata/pod.yaml deleted file mode 100644 index 179e8199..00000000 --- a/pkg/alpha.dagger.io/kubernetes/kustomize/tests/testdata/pod.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: test-pod - labels: - app: test-pod -spec: - containers: - - name: test-pod - image: nginx - imagePullPolicy: IfNotPresent - restartPolicy: Always diff --git a/pkg/alpha.dagger.io/kubernetes/kustomize/tests/verify.cue b/pkg/alpha.dagger.io/kubernetes/kustomize/tests/verify.cue deleted file mode 100644 index 9349a277..00000000 --- a/pkg/alpha.dagger.io/kubernetes/kustomize/tests/verify.cue +++ /dev/null @@ -1,72 +0,0 @@ -package kustomize - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" -) - -#VerifyKustomize: { - source: dagger.#Artifact - - #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - } - }, - - // Check files - op.#Exec & { - always: true - args: [ - "sh", "-c", "test $(ls /source | wc -l) = 1", - ] - mount: "/source": from: source - }, - - // Check image tag kustomization - op.#Exec & { - always: true - args: [ - "sh", "-c", #""" - grep -q "\- image: nginx:v1" /source/result.yaml - """#, - ] - mount: "/source": from: source - }, - - // Check replicas kustomization - op.#Exec & { - always: true - args: [ - "sh", "-c", #""" - grep -q "replicas: 2" /source/result.yaml - """#, - ] - mount: "/source": from: source - }, - - // Check pod merge by kustomization - op.#Exec & { - always: true - args: [ - "sh", "-c", #""" - grep -q "kind: Pod" /source/result.yaml - """#, - ] - mount: "/source": from: source - }, - - // Check pod name - op.#Exec & { - always: true - args: [ - "sh", "-c", #""" - grep -q "name: test-pod" /source/result.yaml - """#, - ] - mount: "/source": from: source - }, - ] -} diff --git a/pkg/alpha.dagger.io/kubernetes/tests/kubernetes.cue b/pkg/alpha.dagger.io/kubernetes/tests/kubernetes.cue deleted file mode 100644 index d7362ac9..00000000 --- a/pkg/alpha.dagger.io/kubernetes/tests/kubernetes.cue +++ /dev/null @@ -1,61 +0,0 @@ -package kubernetes - -import ( - "encoding/yaml" - "alpha.dagger.io/random" -) - -// We assume that a kinD cluster is running locally -// To deploy a local KinD cluster, follow this link : https://kind.sigs.k8s.io/docs/user/quick-start/ -TestKubeconfig: string @dagger(input) - -TestKubeApply: { - suffix: random.#String & { - seed: "" - } - - // Pod spec - kubeSrc: { - apiVersion: "v1" - kind: "Pod" - metadata: name: "kube-test-\(suffix.out)" - spec: { - restartPolicy: "Never" - containers: [{ - name: "test" - image: "hello-world" - }] - } - } - - // Apply deployment - resources: #Resources & { - kubeconfig: TestKubeconfig - namespace: "dagger-test" - manifest: yaml.Marshal(kubeSrc) - } - - // Verify deployment - verify: #VerifyApply & { - podname: kubeSrc.metadata.name - namespace: resources.namespace - } -} - -TestLinkApply: { - // Podname from hello-world-pod - _podname: "hello-world" - - // Apply deployment - resources: #Resources & { - kubeconfig: TestKubeconfig - namespace: "dagger-test" - url: "https://gist.githubusercontent.com/grouville/04402633618f3289a633f652e9e4412c/raw/293fa6197b78ba3fad7200fa74b52c62ec8e6703/hello-world-pod.yaml" - } - - // Verify deployment - verify: #VerifyApply & { - podname: _podname - namespace: resources.namespace - } -} diff --git a/pkg/alpha.dagger.io/kubernetes/tests/verify.cue b/pkg/alpha.dagger.io/kubernetes/tests/verify.cue deleted file mode 100644 index c0cd3bd4..00000000 --- a/pkg/alpha.dagger.io/kubernetes/tests/verify.cue +++ /dev/null @@ -1,78 +0,0 @@ -package kubernetes - -import ( - "alpha.dagger.io/dagger/op" -) - -#VerifyApply: { - podname: string - - namespace: string - - // Verify that pod exist - #GetPods: - """ - kubectl get pods --namespace "$KUBE_NAMESPACE" \( podname ) - """ - - // Clear that pod for future test - #DeletePods: - """ - kubectl delete pods --namespace "$KUBE_NAMESPACE" \( podname ) - """ - - #up: [ - op.#Load & { - from: #Kubectl - }, - - op.#WriteFile & { - dest: "/kubeconfig" - content: TestKubeconfig - mode: 0o600 - }, - - op.#WriteFile & { - dest: "/getPods.sh" - content: #GetPods - }, - - // Check pods - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/getPods.sh", - ] - env: { - KUBECONFIG: "/kubeconfig" - KUBE_NAMESPACE: namespace - } - }, - - op.#WriteFile & { - dest: "/deletePods.sh" - content: #DeletePods - }, - - op.#Exec & { - always: true - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "/deletePods.sh", - ] - env: { - KUBECONFIG: "/kubeconfig" - KUBE_NAMESPACE: namespace - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/netlify/netlify.cue b/pkg/alpha.dagger.io/netlify/netlify.cue deleted file mode 100644 index 21ef3842..00000000 --- a/pkg/alpha.dagger.io/netlify/netlify.cue +++ /dev/null @@ -1,91 +0,0 @@ -// Netlify client operations -package netlify - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/alpine" - "alpha.dagger.io/os" -) - -// Netlify account credentials -#Account: { - // Use this Netlify account name - // (also referred to as "team" in the Netlify docs) - name: string | *"" @dagger(input) - - // Netlify authentication token - token: dagger.#Secret @dagger(input) -} - -// Netlify site -#Site: { - // Netlify account this site is attached to - account: #Account - - // Contents of the application to deploy - contents: dagger.#Artifact @dagger(input) - - // Deploy to this Netlify site - name: string @dagger(input) - - // Host the site at this address - customDomain?: string @dagger(input) - - // Create the Netlify site if it doesn't exist? - create: bool | *true @dagger(input) - - // Website url - url: { - os.#File & { - from: ctr - path: "/netlify/url" - } - }.contents @dagger(output) - - // Unique Deploy URL - deployUrl: { - os.#File & { - from: ctr - path: "/netlify/deployUrl" - } - }.contents @dagger(output) - - // Logs URL for this deployment - logsUrl: { - os.#File & { - from: ctr - path: "/netlify/logsUrl" - } - }.contents @dagger(output) - - ctr: os.#Container & { - image: alpine.#Image & { - package: { - bash: true - jq: true - curl: true - yarn: true - } - } - setup: [ - "yarn global add netlify-cli@8.6.21", - ] - // set in netlify.sh.cue - // FIXME: use embedding once cue supports it - command: _ - always: true - env: { - NETLIFY_SITE_NAME: name - if (create) { - NETLIFY_SITE_CREATE: "1" - } - if customDomain != _|_ { - NETLIFY_DOMAIN: customDomain - } - NETLIFY_ACCOUNT: account.name - } - dir: "/src" - mount: "/src": from: contents - secret: "/run/secrets/token": account.token - } -} diff --git a/pkg/alpha.dagger.io/netlify/netlify.sh.cue b/pkg/alpha.dagger.io/netlify/netlify.sh.cue deleted file mode 100644 index 702966e7..00000000 --- a/pkg/alpha.dagger.io/netlify/netlify.sh.cue +++ /dev/null @@ -1,56 +0,0 @@ -package netlify - -#Site: ctr: command: #""" - export NETLIFY_AUTH_TOKEN="$(cat /run/secrets/token)" - - create_site() { - url="https://api.netlify.com/api/v1/${NETLIFY_ACCOUNT:-}/sites" - - response=$(curl -s -S --fail-with-body -H "Authorization: Bearer $NETLIFY_AUTH_TOKEN" \ - -X POST -H "Content-Type: application/json" \ - $url \ - -d "{\"name\": \"${NETLIFY_SITE_NAME}\", \"custom_domain\": \"${NETLIFY_DOMAIN}\"}" -o body - ) - if [ $? -ne 0 ]; then - cat body >&2 - exit 1 - fi - - cat body | jq -r '.site_id' - } - - site_id=$(curl -s -S -f -H "Authorization: Bearer $NETLIFY_AUTH_TOKEN" \ - https://api.netlify.com/api/v1/sites\?filter\=all | \ - jq -r ".[] | select(.name==\"$NETLIFY_SITE_NAME\") | .id" \ - ) - if [ -z "$site_id" ] ; then - if [ "${NETLIFY_SITE_CREATE:-}" != 1 ]; then - echo "Site $NETLIFY_SITE_NAME does not exist" - exit 1 - fi - site_id=$(create_site) - if [ -z "$site_id" ]; then - echo "create site failed" - exit 1 - fi - fi - - netlify link --id "$site_id" - netlify build - - netlify deploy \ - --dir="$(pwd)" \ - --site="$site_id" \ - --prod \ - | tee /tmp/stdout - - url="$(cat /tmp/stdout | grep Website | grep -Eo 'https://[^ >]+' | head -1)" - deployUrl="$(cat /tmp/stdout | grep Unique | grep -Eo 'https://[^ >]+' | head -1)" - logsUrl="$(cat /tmp/stdout | grep Logs | grep -Eo 'https://[^ >]+' | head -1)" - - # Write output files - mkdir -p /netlify - printf "$url" > /netlify/url - printf "$deployUrl" > /netlify/deployUrl - printf "$logsUrl" > /netlify/logsUrl - """# diff --git a/pkg/alpha.dagger.io/netlify/tests/netlify.cue b/pkg/alpha.dagger.io/netlify/tests/netlify.cue deleted file mode 100644 index 48d761b6..00000000 --- a/pkg/alpha.dagger.io/netlify/tests/netlify.cue +++ /dev/null @@ -1,50 +0,0 @@ -package netlify - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" - "alpha.dagger.io/random" -) - -TestNetlify: { - data: random.#String & { - seed: "" - } - - // Generate a website containing the random number - html: #up: [ - op.#WriteFile & { - content: data.out - dest: "index.html" - }, - ] - - // Deploy to netlify - deploy: #Site & { - contents: html - name: "dagger-test" - } - - // Check if the deployed site has the random marker - check: #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: curl: true - } - }, - op.#Exec & { - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - test "$(curl \#(deploy.deployUrl))" = "\#(data.out)" - """#, - ] - }, - ] -} diff --git a/pkg/alpha.dagger.io/os/container.cue b/pkg/alpha.dagger.io/os/container.cue deleted file mode 100644 index 16d0b914..00000000 --- a/pkg/alpha.dagger.io/os/container.cue +++ /dev/null @@ -1,133 +0,0 @@ -package os - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - - "alpha.dagger.io/alpine" -) - -// Default image for basic use cases -// FIXME: should just be 'alpine.#Image'. -// referring to '#.up' is a workaround to a dagger engine bug. -// see https://github.com/dagger/dagger/issues/304 -#DefaultImage: alpine.#Image.#up - -// Built-in container implementation, using buildkit -#Container: { - - // Container image - image: dagger.#Artifact | *#DefaultImage - // { - // // Optionally fetch a remote image - // // eg. "index.docker.io/alpine" - // from: string - // image: #up: [op.#FetchContainer & { "ref": from }] - // } | {} - - // Independently cacheable setup commands - setup: [...string] - - // Command to execute - command: string | *"" - - // Environment variables shared by all commands - env: [string]: string - - // Directory in which the command is executed - dir: string | *"/" - - // If true, the command is never cached. - // (false by default). - always: true | *false - - // Copy contents from other artifacts - copy: [string]: from: dagger.#Artifact - - // Mount contents from other artifacts. - // Mount is active when executing `command`, but not `setup`. - mount: [string]: { - from: dagger.#Artifact - // FIXME: support source path - } - - // Safely mount secrets (in cleartext) as non-persistent files - secret: [string]: dagger.#Secret - - // Mount unix socket or windows npipes to the corresponding path - socket: [string]: dagger.#Stream - - // Write file in the container - files: [string]: { - content: string - mode: int | *0o644 - } - - // Mount persistent cache directories - cache: [string]: true - - // Mount temporary directories - tmpfs: [string]: true - - // Configure the shell which executes all commands. - shell: { - // Path of the shell to execute - path: string | *"/bin/sh" - // Arguments to pass to the shell prior to the command - args: [...string] | *["-c"] - } - - #up: [ - op.#Load & {from: image}, - // Copy volumes with type=copy - for dest, o in copy { - op.#Copy & { - "dest": dest - from: o.from - // FIXME: support source path - } - }, - // Execute setup commands, without volumes - for cmd in setup { - op.#Exec & { - args: [shell.path] + shell.args + [cmd] - "env": env - "dir": dir - } - }, - for dest, file in files { - op.#WriteFile & { - content: file.content - mode: file.mode - "dest": dest - } - }, - // Execute main command with volumes - if command != "" { - op.#Exec & { - args: [shell.path] + shell.args + [command] - "env": env - "dir": dir - "always": always - "mount": { - for dest, o in mount { - "\(dest)": o - // FIXME: support source path - } - for dest, s in secret { - "\(dest)": secret: s - } - for dest, _ in cache { - "\(dest)": "cache" - } - for dest, _ in tmpfs { - "\(dest)": "tmpfs" - } - for dest, s in socket { - "\(dest)": stream: s - } - } - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/os/dir.cue b/pkg/alpha.dagger.io/os/dir.cue deleted file mode 100644 index c5afe16b..00000000 --- a/pkg/alpha.dagger.io/os/dir.cue +++ /dev/null @@ -1,44 +0,0 @@ -package os - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -#Dir: { - from: dagger.#Artifact - path: string | *"/" - - #up: [ - op.#Load & {"from": from}, - op.#Subdir & { - dir: path - }, - ] -} - -#ReadDir: { - from: dagger.#Artifact - path: string - - // Read the tree structure (not file contents) - read: tree: { - string// FIXME: only raw 'find' output for now - #up: [ - op.#FetchContainer & { - ref: "alpine" // FIXME: use alpine or docker package - }, - op.#Exec & { - mount: "/data": "from": from - args: [ - "sh", "-c", - #"find /data | sed 's/^\/data//' > /export.txt"#, - ] - }, - op.#Export & { - source: "/export.txt" - format: "string" - }, - ] - } -} diff --git a/pkg/alpha.dagger.io/os/file.cue b/pkg/alpha.dagger.io/os/file.cue deleted file mode 100644 index 6a4fb49e..00000000 --- a/pkg/alpha.dagger.io/os/file.cue +++ /dev/null @@ -1,43 +0,0 @@ -// OS operations -package os - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -// Built-in file implementation, using buildkit -// A single file -#File: { - from: dagger.#Artifact | *[op.#Mkdir & {dir: "/", path: "/"}] - path: string - - // Optionally write data to the file - write: *null | { - data: string - // FIXME: append - // FIXME: create + mode - } - - // The contents of the file - // If a write operation is specified, it is applied first. - contents: { - string - - #up: [ - op.#Load & { - "from": from - }, - if write != null { - op.#WriteFile & { - dest: path - content: write.data - } - }, - op.#Export & { - source: path - format: "string" - }, - ] - } -} diff --git a/pkg/alpha.dagger.io/os/tests/container/container.cue b/pkg/alpha.dagger.io/os/tests/container/container.cue deleted file mode 100644 index df837179..00000000 --- a/pkg/alpha.dagger.io/os/tests/container/container.cue +++ /dev/null @@ -1,26 +0,0 @@ -package os - -import ( - "alpha.dagger.io/dagger" -) - -// Test secret mount -SimpleSecret: { - // 'encrypted' and 'cleartext' must be set from identical values - encrypted: dagger.#Secret @dagger(input) - cleartext: string @dagger(input) - - ctr: #Container & { - secret: "/secret-in": encrypted - command: "cat /secret-in > /secret-out" - } - - // Decrypted secret - decrypted: (#File & { - from: ctr - path: "/secret-out" - }).contents @dagger(output) - - // Assertion: decrypted value must match original cleartext - decrypted: cleartext -} diff --git a/pkg/alpha.dagger.io/os/tests/os/os.cue b/pkg/alpha.dagger.io/os/tests/os/os.cue deleted file mode 100644 index 3fb635cc..00000000 --- a/pkg/alpha.dagger.io/os/tests/os/os.cue +++ /dev/null @@ -1,25 +0,0 @@ -package os - -import ( - "alpha.dagger.io/alpine" -) - -// Write a file to an empty dir -EmptyDir: { - f: #File & { - path: "/foo.txt" - write: data: "hello world!" - } - f: contents: "hello world!" -} - -// Read from a pre-existing file -Read: { - f: #File & { - from: alpine.#Image & { - version: "3.15.0" - } - path: "/etc/alpine-release" - } - f: contents: "3.15.0\n" -} diff --git a/pkg/alpha.dagger.io/package.json b/pkg/alpha.dagger.io/package.json deleted file mode 100644 index 21469ef1..00000000 --- a/pkg/alpha.dagger.io/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "license": "Apache-2.0", - "scripts": { - "test": "bats --report-formatter junit --jobs 4 ." - }, - "devDependencies": { - "bats": "https://github.com/bats-core/bats-core#master", - "bats-assert": "https://github.com/bats-core/bats-assert", - "bats-support": "https://github.com/bats-core/bats-support" - } -} diff --git a/pkg/alpha.dagger.io/random/string.cue b/pkg/alpha.dagger.io/random/string.cue deleted file mode 100644 index 401c6d8b..00000000 --- a/pkg/alpha.dagger.io/random/string.cue +++ /dev/null @@ -1,61 +0,0 @@ -// Random generation utilities -package random - -import ( - "strconv" - - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger/op" -) - -// Generate a random string -#String: { - // Seed of the random string to generate. - // When using the same `seed`, the same random string will be generated - // because of caching. - // FIXME: this is necessary because of https://github.com/dagger/dagger/issues/591 - seed: string @dagger(input) - - // length of the string - length: *12 | number @dagger(input) - - // generated random string - out: { - string - - #up: [ - op.#Load & {from: alpine.#Image & { - package: python3: true - }}, - - op.#WriteFile & { - dest: "/entrypoint.py" - content: #""" - import random - import string - import os - - length = int(os.environ['LENGTH']) - letters = string.ascii_lowercase - - print ( ''.join(random.choice(letters) for i in range(length)) ) - """# - }, - - op.#Exec & { - args: ["sh", "-c", #""" - printf "$(python3 /entrypoint.py)" > /rand - """#, - ] - env: LENGTH: strconv.FormatInt(length, 10) - env: SEED: seed - - always: true - }, - - op.#Export & { - source: "/rand" - }, - ] - } @dagger(output) -} diff --git a/pkg/alpha.dagger.io/terraform/terraform.cue b/pkg/alpha.dagger.io/terraform/terraform.cue deleted file mode 100644 index 1e6ab939..00000000 --- a/pkg/alpha.dagger.io/terraform/terraform.cue +++ /dev/null @@ -1,75 +0,0 @@ -// Terraform operations -package terraform - -import ( - "encoding/json" - - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -// Terraform configuration -#Configuration: { - - // Terraform version - version: string | *"latest" @dagger(input) - - // Source configuration - source: dagger.#Artifact @dagger(input) - - tfvars?: { - ... - } - - // Environment variables - env: { - [string]: string @dagger(input) - } - - state: #up: [ - op.#FetchContainer & { - ref: "hashicorp/terraform:\(version)" - }, - - op.#Copy & { - from: source - dest: "/src" - }, - - if tfvars != _|_ { - op.#WriteFile & { - dest: "/src/terraform.tfvars.json" - content: json.Marshal(tfvars) - } - }, - - op.#Exec & { - args: ["terraform", "init"] - dir: "/src" - "env": env - }, - - op.#Exec & { - args: ["terraform", "apply", "-auto-approve"] - always: true - dir: "/src" - "env": env - }, - ] - - output: { - #up: [ - op.#Load & {from: state}, - op.#Exec & { - args: ["sh", "-c", "terraform output -json > /output.json"] - dir: "/src" - "env": env - }, - op.#Export & { - source: "/output.json" - format: "json" - }, - ] - ... - } @dagger(output) -} diff --git a/pkg/alpha.dagger.io/terraform/tests/terraform.cue b/pkg/alpha.dagger.io/terraform/tests/terraform.cue deleted file mode 100644 index c67c9527..00000000 --- a/pkg/alpha.dagger.io/terraform/tests/terraform.cue +++ /dev/null @@ -1,73 +0,0 @@ -package terraform - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -TestData: dagger.#Artifact @dagger(input) - -TestConfig: awsConfig: { - accessKey: dagger.#Secret @dagger(input) - secretKey: dagger.#Secret @dagger(input) - region: "us-east-2" -} - -#TestGetConfig: { - accessKey: dagger.#Secret - - secretKey: dagger.#Secret - - visibleAccessKey: string - - visibleSecretKey: string - - #up: [ - op.#Load & {from: alpine.#Image & { - package: { - bash: true - jq: true - } - }}, - - op.#Exec & { - always: true - args: ["/bin/bash", "-c", #""" - export ACCESS_KEY=$(cat /accessKey) - export SECRET_KEY=$(cat /secretKey) - - jq --arg key0 'visibleAccessKey' --arg value0 "$ACCESS_KEY" \ - --arg key1 'visibleSecretKey' --arg value1 "$SECRET_KEY" \ - '. | .[$key0]=$value0 | .[$key1]=$value1' <<< '{}' > /out - """#, - ] - mount: { - "/accessKey": secret: accessKey - "/secretKey": secret: secretKey - } - }, - - op.#Export & { - source: "/out" - format: "json" - }, - ] -} - -TestTerraform: { - config: #TestGetConfig & { - accessKey: TestConfig.awsConfig.accessKey - secretKey: TestConfig.awsConfig.secretKey - } - - apply: #Configuration & { - source: TestData - env: { - AWS_ACCESS_KEY_ID: config.visibleAccessKey - AWS_SECRET_ACCESS_KEY: config.visibleSecretKey - AWS_DEFAULT_REGION: TestConfig.awsConfig.region - AWS_REGION: TestConfig.awsConfig.region - } - } -} diff --git a/pkg/alpha.dagger.io/terraform/tests/testdata/test.tf b/pkg/alpha.dagger.io/terraform/tests/testdata/test.tf deleted file mode 100644 index 878484e2..00000000 --- a/pkg/alpha.dagger.io/terraform/tests/testdata/test.tf +++ /dev/null @@ -1,34 +0,0 @@ -terraform { - required_providers { - random = { - source = "hashicorp/random" - version = "3.1.0" - } - } - - backend "s3" { - bucket = "dagger-ci" - key = "terraform/tfstate" - region = "us-east-2" - } -} - -provider "random" { -} - -variable "input" { - type = string -} - -resource "random_integer" "test" { - min = 1 - max = 50 -} - -output "random" { - value = random_integer.test.result -} - -output "input" { - value = var.input -} diff --git a/pkg/alpha.dagger.io/trivy/image.cue b/pkg/alpha.dagger.io/trivy/image.cue deleted file mode 100644 index 63ca547a..00000000 --- a/pkg/alpha.dagger.io/trivy/image.cue +++ /dev/null @@ -1,64 +0,0 @@ -package trivy - -import ( - "encoding/json" - - "alpha.dagger.io/os" -) - -// Scan an Image -#Image: { - // Trivy configuration - config: #Config - - // Image source (AWS, GCP, Docker Hub, Self hosted) - source: string - - // Trivy Image arguments - args: [arg=string]: string - // Enforce args best practices - args: { - "--severity": *"HIGH,CRITICAL" | string - "--exit-code": *"1" | string - "--ignore-unfixed": *"" | string - "--format": *"table" | string - "--output": *"output" | string - } - - ctr: os.#Container & { - image: #CLI & { - "config": config - } - shell: { - path: "/bin/bash" - args: ["--noprofile", "--norc", "-eo", "pipefail", "-c"] - } - always: true - command: #""" - trivyArgs="$( - echo "$ARGS" | - jq -c ' - to_entries | - map(.key + " " + (.value | tostring) + " ") | - add - ')" - - # Remove suffix and prefix quotes if present - trivyArgs="${trivyArgs#\"}" - trivyArgs="${trivyArgs%\"}" - - trivy image $trivyArgs "$SOURCE" - echo -n "$SOURCE" > /ref - """# - env: ARGS: json.Marshal(args) - env: SOURCE: source - } - - // Reference analyzed - ref: { - os.#File & { - from: ctr - path: "/ref" - } - }.contents @dagger(output) -} diff --git a/pkg/alpha.dagger.io/trivy/tests/trivy.cue b/pkg/alpha.dagger.io/trivy/tests/trivy.cue deleted file mode 100644 index d449c9d4..00000000 --- a/pkg/alpha.dagger.io/trivy/tests/trivy.cue +++ /dev/null @@ -1,127 +0,0 @@ -package trivy - -import ( - "alpha.dagger.io/aws" - "alpha.dagger.io/aws/ecr" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/gcp" - "alpha.dagger.io/gcp/gcr" - "alpha.dagger.io/random" -) - -TestConfig: awsConfig: aws.#Config & { - region: "us-east-2" -} - -TestConfig: gcpConfig: gcp.#Config & { - project: "dagger-ci" - region: "us-west2-a" -} - -TestConfig: { - trivyNoAuth: #Config - - trivyBasicAuth: #Config & { - basicAuth: { - username: "guilaume1234" - password: dagger.#Input & {dagger.#Secret} - } - } - - trivyAWSAuth: #Config & { - awsAuth: TestConfig.awsConfig - } - - trivyGCPAuth: #Config & { - gcpAuth: TestConfig.gcpConfig - } -} - -TestSuffix: random.#String & { - seed: "" -} - -TestNoAuthClient: #Image & { - config: TestConfig.trivyNoAuth - source: "ubuntu:21.10" -} - -TestBasicAuthClient: #Image & { - config: TestConfig.trivyBasicAuth - source: "docker.io/guilaume1234/guillaume:latest" -} - -TestAWSClient: { - repository: "125635003186.dkr.ecr.\(TestConfig.awsConfig.region).amazonaws.com/dagger-ci" - tag: "test-ecr-\(TestSuffix.out)" - - creds: ecr.#Credentials & { - config: TestConfig.awsConfig - } - - push: { - ref: "\(repository):\(tag)" - - #up: [ - op.#DockerBuild & { - dockerfile: """ - FROM alpine - RUN echo \(TestSuffix.out) > /test - """ - }, - - op.#DockerLogin & { - target: repository - username: creds.username - secret: creds.secret - }, - - op.#PushContainer & { - "ref": ref - }, - ] - } - - verify: #Image & { - config: TestConfig.trivyAWSAuth - source: push.ref - } -} - -TestGCPClient: { - repository: "gcr.io/dagger-ci/test" - tag: "test-gcr-\(TestSuffix.out)" - - creds: gcr.#Credentials & { - config: TestConfig.gcpConfig - } - - push: { - ref: "\(repository):\(tag)" - - #up: [ - op.#DockerBuild & { - dockerfile: """ - FROM alpine - RUN echo \(TestSuffix.out) > /test - """ - }, - - op.#DockerLogin & { - target: repository - username: creds.username - secret: creds.secret - }, - - op.#PushContainer & { - "ref": ref - }, - ] - } - - verify: #Image & { - config: TestConfig.trivyGCPAuth - source: push.ref - } -} diff --git a/pkg/alpha.dagger.io/trivy/trivy.cue b/pkg/alpha.dagger.io/trivy/trivy.cue deleted file mode 100644 index 37ab30ad..00000000 --- a/pkg/alpha.dagger.io/trivy/trivy.cue +++ /dev/null @@ -1,128 +0,0 @@ -package trivy - -import ( - "strconv" - - "alpha.dagger.io/alpine" - "alpha.dagger.io/aws" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/gcp" -) - -// Set Trivy download source -// - AWS -// - GCP -// - Docker Hub -// - Self Hosted - -// Trivy Configuration -#Config: { - // Docker Hub / Self hosted registry auth - basicAuth: { - // Username - username: dagger.#Input & {string} - - // Password - password: dagger.#Input & {dagger.#Secret} - - // No SSL connection - noSSL: *false | bool - } | *null - - // AWS ECR auth - awsAuth: aws.#Config | *null - - // GCP auth - gcpAuth: gcp.#Config | *null -} - -// Re-usable CLI component -#CLI: { - config: #Config - - #up: [ - if config.awsAuth == null && config.gcpAuth == null { - op.#Load & { - from: alpine.#Image & { - package: bash: true - package: curl: true - package: jq: true - } - } - }, - if config.awsAuth != null && config.gcpAuth == null { - op.#Load & { - from: aws.#CLI & { - "config": config.awsAuth - } - } - }, - if config.awsAuth == null && config.gcpAuth != null { - op.#Load & { - from: gcp.#GCloud & { - "config": config.gcpAuth - } - } - }, - op.#Exec & { - args: ["sh", "-c", - #""" - curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.18.3 && - chmod +x /usr/local/bin/trivy - """#, - ] - }, - // config.basicAuth case - if config.basicAuth != null && config.awsAuth == null && config.gcpAuth == null { - op.#Exec & { - args: ["/bin/bash", "-c", - #""" - # Rename - mv /usr/local/bin/trivy /usr/local/bin/trivy-dagger - - # Build root of executable script - echo '#!/bin/bash'$'\n' > /usr/local/bin/trivy - - # Construct env string from env vars - envs=() - [ -n "$TRIVY_USERNAME" ] && envs+=("TRIVY_USERNAME=$TRIVY_USERNAME") - [ -n "$TRIVY_NON_SSL" ] && envs+=("TRIVY_NON_SSL=$TRIVY_NON_SSL") - - # Append secret to env string - [ -n "$(cat /password)" ] && envs+=("TRIVY_PASSWORD=$(cat /password)") - - # Append full command - echo "${envs[@]}" '/usr/local/bin/trivy-dagger "$@"' >> /usr/local/bin/trivy - - # Make it executable - chmod +x /usr/local/bin/trivy - """#, - ] - env: TRIVY_USERNAME: config.basicAuth.username - env: TRIVY_NON_SSL: strconv.FormatBool(config.basicAuth.noSSL) - mount: "/password": secret: config.basicAuth.password - } - }, - // config.gcpAuth case - if config.basicAuth == null && config.awsAuth == null && config.gcpAuth != null { - op.#Exec & { - args: ["/bin/bash", "-c", - #""" - # Rename - mv /usr/local/bin/trivy /usr/local/bin/trivy-dagger - - # Build root of executable script - echo '#!/bin/bash'$'\n' > /usr/local/bin/trivy - - # Append full command - echo "TRIVY_USERNAME=''" "GOOGLE_APPLICATION_CREDENTIALS=/service_key" '/usr/local/bin/trivy-dagger "$@"' >> /usr/local/bin/trivy - - # Make it executable - chmod +x /usr/local/bin/trivy - """#, - ] - } - }, - ] -} diff --git a/pkg/alpha.dagger.io/universe.bats b/pkg/alpha.dagger.io/universe.bats deleted file mode 100644 index 5bd8a0ec..00000000 --- a/pkg/alpha.dagger.io/universe.bats +++ /dev/null @@ -1,292 +0,0 @@ -# Instead of setup, this runs only once -setup_file() { - load 'helpers' - - setup_localstack -} - -setup() { - load 'helpers' - - common_setup -} - -@test "cue-sanity-check" { - skip "Docs generation already validates the cue code of the library - disabled to avoid duplication" - dagger -e sanity-check up -} - -@test "os" { - dagger -e os up -} - -@test "go" { - dagger -e go up -} - -@test "http" { - dagger -e http up - CONTAINER=$(docker container ls -q --filter "name=daggerci-test-wait-*") - docker stop "$CONTAINER" && docker rm "$CONTAINER" -} - -@test "js/yarn" { - dagger -e js-yarn up -} - -@test "java/maven" { - dagger -e java-maven up -} - -@test "alpine" { - dagger -e alpine up -} - -@test "netlify" { - dagger -e netlify up -} - -@test "git" { - # Fetch repo - dagger -e git-repo up - - # Commit & push - dagger -e git-commit up -} - -@test "os.#Container" { - dagger -e os-container up -} - -@test "aws: ecr" { - dagger -e aws-ecr up -} - -@test "aws: ecr/localstack" { - skip_unless_local_localstack - - dagger -e aws-ecr-localstack up -} - -@test "aws: s3" { - dagger -e aws-s3 up -} - -@test "aws: s3/localstack" { - skip_unless_local_localstack - - dagger -e aws-s3-localstack up -} - -@test "aws: eks" { - skip "Temporary skip until porting to localstack" - dagger -e aws-eks up -} - -@test "docker run: local" { - dagger -e docker-run-local up -} - -@test "docker run: ports" { - dagger -e docker-run-ports up - CONTAINER=$(docker container ls -q --filter "name=daggerci-test-ports-*") - SECONDS=0 - while [[ "$(docker inspect --format '{{json .State.Status }}' todoapp | grep -m 1 'running')" != "running" && $SECONDS -lt 45 ]]; do sleep 1 ; done - run curl -f -LI http://localhost:8080 - assert_output --partial '200 OK' - docker stop "$CONTAINER" && docker rm "$CONTAINER" -} - -@test "docker build" { - dagger -e docker-build up -} - -@test "docker push and pull" { - # Push image - dagger -e docker-push up - - # Get image reference - dagger -e docker-pull input text ref "$(dagger -e docker-push query -c TestPush.push.ref | tr -d '\n' | tr -d '\"')" - - # Pull image - dagger -e docker-pull up -} - -@test "docker push: multi registry" { - run dagger -e docker-push-multi-registry up -} - -@test "docker push: invalid credential" { - # Push image (SHOULD FAIL) - run dagger -e docker-push-invalid-creds up - assert_failure -} - -@test "docker command: ssh" { - dagger -e docker-command-ssh up -} - -@test "docker command: ssh with key passphrase" { - dagger -e docker-command-ssh-key-passphrase up -} - -@test "docker command: ssh with wrong key passphrase" { - run dagger -e docker-command-ssh-wrong-key-passphrase up - assert_failure -} - -@test "docker load" { - dagger -e docker-load up -} - -@test "docker compose" { - dagger -e docker-compose up -} - -@test "docker run: ssh" { - dagger -e docker-run-ssh up -} - -@test "kubernetes: deployment" { - skip_unless_local_kube - - # Copy deployment to sandbox - copy_to_sandbox kubernetes-deployment kubernetes - - # Query - dagger --project "$DAGGER_SANDBOX" -e kubernetes-deployment query - - # Set kubeconfig - dagger --project "$DAGGER_SANDBOX" -e kubernetes-deployment input text TestKubeconfig -f "$HOME"/.kube/config - - dagger --project "$DAGGER_SANDBOX" -e kubernetes-deployment up - - # Unset kubeconfig - dagger --project "$DAGGER_SANDBOX" -e kubernetes-deployment input unset TestKubeconfig -} - -@test "kubernetes: kustomize" { - dagger -e kubernetes-kustomize up -} - -@test "kubernetes: helm" { - skip_unless_local_kube - - # Copy deployment to sandbox - copy_to_sandbox kubernetes-helm kubernetes - - # Set kubeconfig - dagger --project "$DAGGER_SANDBOX" -e kubernetes-helm input text TestKubeconfig -f "$HOME"/.kube/config - - dagger --project "$DAGGER_SANDBOX" -e kubernetes-helm up - - # Unset kubeconfig - dagger --project "$DAGGER_SANDBOX" -e kubernetes-helm input unset TestKubeconfig -} - -@test "google cloud: gcr" { - dagger -e google-gcr up -} - -@test "google cloud: gcs" { - dagger -e google-gcs up -} - -@test "google cloud: gke" { - dagger -e google-gke up -} - -@test "google cloud: secretmanager" { - run dagger -e google-secretmanager up - assert_success - - # ensure the secret has been created - run dagger query -e google-secretmanager TestSecrets.secret.references.databasePassword -f text - assert_success - assert_output --regexp '^projects\/[0-9]+\/secrets\/databasePassword' -} - -@test "google cloud: cloudrun" { - dagger -e google-cloudrun up -} - -@test "terraform" { - # it must fail because of a missing var - run dagger -e terraform up - assert_failure - - # Copy deployment to sandbox - copy_to_sandbox terraform terraform - - # Add the var and try again - run dagger --project "$DAGGER_SANDBOX" -e terraform input text TestTerraform.apply.tfvars.input "42" - run dagger --project "$DAGGER_SANDBOX" -e terraform up - assert_success - - # ensure the tfvar was passed correctly - run dagger --project "$DAGGER_SANDBOX" query -e terraform TestTerraform.apply.output.input.value -f text - assert_success - assert_output "42" - - # ensure the random value is always the same - # this proves we're effectively using the s3 backend - run dagger --project "$DAGGER_SANDBOX" query -e terraform TestTerraform.apply.output.random.value -f json - assert_success - assert_output "36" - - # Unset input - run dagger --project "$DAGGER_SANDBOX" -e terraform input unset TestTerraform.apply.tfvars.input - assert_success -} - -@test "azure-resourcegroup" { - skip "Azure CI infra not implemented yet - manually tested and working" - #dagger -e azure-resourcegroup up -} - -@test "azure-storage" { - skip "Azure CI infra not implemented yet - manually tested and working" - #dagger -e azure-storage up -} - -@test "argocd" { - skip_unless_local_kube - - # Deploy argoCD infra - dagger -e argocd-infra input text TestKubeconfig -f "$HOME"/.kube/config - dagger -e argocd-infra up - - # Wait for infra to be ready - kubectl -n argocd wait --for=condition=available deployment -l "app.kubernetes.io/part-of=argocd" --timeout=100s - - # Forward port - # We need to kill subprocess to avoid infinity loop - kubectl port-forward svc/argocd-server -n argocd 8080:443 >/dev/null 2>/dev/null & - sleep 3 || (pkill kubectl && exit 1) - - # Run test - dagger -e argocd input secret TestConfig.argocdConfig.basicAuth.password "$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)" || (pkill kubectl && exit 1) - dagger -e argocd up || (pkill kubectl && exit 1) - dagger -e argocd input unset TestConfig.argocdConfig.basicAuth.password || (pkill kubectl && exit 1) - - # Kill Pid - pgrep kubectl && pkill kubectl - - # Check output - run dagger -e argocd query TestArgoCDStatus.status.outputs.health -f json - assert_success - assert_output "\"Healthy\"" -} - -@test "azure-stapp" { - skip "Azure CI infra not implemented yet - manually tested and working" - #dagger -e azure-stapp up -} - -@test "trivy" { - dagger -e trivy up -} - -@test "bats" { - dagger -e bats up -} diff --git a/pkg/alpha.dagger.io/yarn.lock b/pkg/alpha.dagger.io/yarn.lock deleted file mode 100644 index dd3bdb72..00000000 --- a/pkg/alpha.dagger.io/yarn.lock +++ /dev/null @@ -1,15 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"bats-assert@https://github.com/bats-core/bats-assert": - version "2.0.0" - resolved "https://github.com/bats-core/bats-assert#4bdd58d3fbcdce3209033d44d884e87add1d8405" - -"bats-support@https://github.com/bats-core/bats-support": - version "0.3.0" - resolved "https://github.com/bats-core/bats-support#d140a65044b2d6810381935ae7f0c94c7023c8c3" - -"bats@https://github.com/bats-core/bats-core#master": - version "1.5.0" - resolved "https://github.com/bats-core/bats-core#172580d2ce19ee33780b5f1df817bbddced43789" diff --git a/pkg/pkg.go b/pkg/pkg.go index cd11e84d..92d4cb9f 100644 --- a/pkg/pkg.go +++ b/pkg/pkg.go @@ -17,17 +17,15 @@ import ( var ( // FS contains the filesystem of the stdlib. - //go:embed alpha.dagger.io dagger.io universe.dagger.io + //go:embed dagger.io universe.dagger.io FS embed.FS ) var ( - AlphaModule = "alpha.dagger.io" DaggerModule = "dagger.io" UniverseModule = "universe.dagger.io" modules = []string{ - AlphaModule, DaggerModule, UniverseModule, } diff --git a/tests/cli.bats b/tests/cli.bats deleted file mode 100644 index aad00418..00000000 --- a/tests/cli.bats +++ /dev/null @@ -1,477 +0,0 @@ -setup() { - load 'helpers' - - common_setup -} - -@test "dagger init" { - run "$DAGGER" init - assert_success - - run "$DAGGER" list - assert_success - refute_output - - run "$DAGGER" init - assert_failure -} - -@test "dagger new" { - run "$DAGGER" new "test" - assert_failure - - run "$DAGGER" init - assert_success - - run "$DAGGER" list - assert_success - refute_output - - run "$DAGGER" new "test" - assert_success - - run "$DAGGER" list - assert_success - assert_output --partial "test" - - run "$DAGGER" new "test" - assert_failure -} - -# create different environments from the same module -@test "dagger new: modules" { - "$DAGGER" init - - cp -a "$TESTDIR"/cli/input/simple/* "$DAGGER_PROJECT" - - "$DAGGER" new "a" - "$DAGGER" new "b" - - "$DAGGER" input -e "a" text "input" "a" - "$DAGGER" input -e "b" text "input" "b" - - "$DAGGER" up -e "a" - "$DAGGER" up -e "b" - - run "$DAGGER" query -l error -e "a" input -f text - assert_success - assert_output "a" - - run "$DAGGER" query -l error -e "b" input -f text - assert_success - assert_output "b" - - # run ls -la "$DAGGER_PROJECT" - # assert_failure -} - -# create different environments from the same module, -# using different packages. -@test "dagger new: packages" { - "$DAGGER" init - - cp -a "$TESTDIR"/cli/packages/* "$DAGGER_PROJECT" - - "$DAGGER" new "a" --package alpha.dagger.io/test/a - "$DAGGER" new "b" --package alpha.dagger.io/test/b - - "$DAGGER" up -e "a" - "$DAGGER" up -e "b" - - run "$DAGGER" query -l error -e "a" exp -f text - assert_success - assert_output "a" - - run "$DAGGER" query -l error -e "b" exp -f text - assert_success - assert_output "b" -} - -@test "dagger query" { - "$DAGGER" init - - dagger_new_with_plan simple "$TESTDIR"/cli/simple - - run "$DAGGER" query -l error -e "simple" - assert_success - assert_output '{ - "bar": "another value", - "foo": "value" -}' - # concrete should fail at this point since we haven't up'd - run "$DAGGER" query -e "simple" -c - assert_failure - - # target - run "$DAGGER" -l error query -e "simple" foo - assert_success - assert_output '"value"' - - # ensure computed values show up - "$DAGGER" up -e "simple" - run "$DAGGER" -l error query -e "simple" - assert_success - assert_output --partial '"computed": "test"' - - # concrete should now work - "$DAGGER" query -e "simple" -c - - # --no-computed should yield the same result as before - run "$DAGGER" query -l error --no-computed -e "simple" - assert_success - assert_output '{ - "bar": "another value", - "foo": "value" -}' - - # --no-plan should give us only the computed values - run "$DAGGER" query -l error --no-plan -e "simple" - assert_success - assert_output '{ - "computed": "test" -}' -} - -@test "dagger input text" { - "$DAGGER" init - - dagger_new_with_plan input "$TESTDIR"/cli/input/simple - - # wrong input type - run "$DAGGER" input -e "input" secret "input" "my input" - assert_failure - - # invalid input - run "$DAGGER" input -e "input" secret "input.notexist" "my input" - assert_failure - - # simple input - "$DAGGER" input -e "input" text "input" "my input" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" input - assert_success - assert_output '"my input"' - - # unset simple input - "$DAGGER" input -e "input" unset "input" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" input - assert_success - assert_output 'null' - - # nested input - "$DAGGER" input -e "input" text "nested.input" "nested input" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" nested - assert_success - assert_output '{ - "input": "nested input" -}' - - # unset nested input - "$DAGGER" input -e "input" unset "nested.input" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" nested - assert_success - assert_output 'null' - - # file input - "$DAGGER" input -e "input" text "input" -f "$TESTDIR"/cli/input/simple/testdata/input.txt - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" input - assert_success - assert_output '"from file\n"' - - # unset file input - "$DAGGER" input -e "input" unset "input" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" input - assert_success - assert_output 'null' - - # invalid file - run "$DAGGER" input -e "input" text "input" -f "$TESTDIR"/cli/input/simple/testdata/notexist - assert_failure - - # stdin input - echo -n "from stdin" | "$DAGGER" input -e "input" text "input" -f - - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" input - assert_success - assert_output '"from stdin"' - - # unset stdin input - "$DAGGER" input -e "input" unset "input" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" input - assert_success - assert_output 'null' -} - -@test "dagger input json" { - "$DAGGER" init - - dagger_new_with_plan input "$TESTDIR"/cli/input/simple - - # simple json - "$DAGGER" input -e "input" json "structured" '{"a": "foo", "b": 42}' - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" structured - assert_success - assert_output '{ - "a": "foo", - "b": 42 -}' - - # unset simple json - "$DAGGER" input -e "input" unset "structured" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" structured - assert_success - assert_output 'null' - - # json from file - "$DAGGER" input -e "input" json "structured" -f "$TESTDIR"/cli/input/simple/testdata/input.json - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" structured - assert_success - assert_output '{ - "a": "from file", - "b": 42 -}' - - # unset json from file - "$DAGGER" input -e "input" unset "structured" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" structured - assert_success - assert_output 'null' -} - -@test "dagger input yaml" { - "$DAGGER" init - - dagger_new_with_plan input "$TESTDIR"/cli/input/simple - - # simple yaml - "$DAGGER" input -e "input" yaml "structured" '{"a": "foo", "b": 42}' - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" structured - assert_success - assert_output '{ - "a": "foo", - "b": 42 -}' - - # unset simple yaml - "$DAGGER" input -e "input" unset "structured" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" structured - assert_success - assert_output 'null' - - # yaml from file - "$DAGGER" input -e "input" yaml "structured" -f "$TESTDIR"/cli/input/simple/testdata/input.yaml - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" structured - assert_success - assert_output '{ - "a": "from file", - "b": 42 -}' - - # unset yaml from file - "$DAGGER" input -e "input" unset "structured" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" structured - assert_success - assert_output 'null' -} - -@test "dagger input dir" { - "$DAGGER" init - - dagger_new_with_plan input "$TESTDIR"/cli/input/artifact - - # input dir outside the project - run "$DAGGER" input -e "input" dir "source" /tmp - assert_failure - - # input dir inside the project - cp -R "$TESTDIR"/cli/input/artifact/testdata/ "$DAGGER_PROJECT"/testdata - "$DAGGER" input -e "input" dir "source" "$DAGGER_PROJECT"/testdata - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" - assert_success - assert_output '{ - "bar": "thisisatest\n", - "foo": "bar", - "source": {} -}' - - # unset dir - "$DAGGER" input -e "input" unset "source" - "$DAGGER" up -e "input" - run "$DAGGER" -l error query -e "input" - assert_success - assert_output '{ - "foo": "bar" -}' - - run "$DAGGER" input dir src xxx -e "input" - assert_failure - assert_output --partial "dir doesn't exist" -} - -@test "dagger input dir: ignore .dagger" { - "$DAGGER" init - - dagger_new_with_plan input "$TESTDIR"/cli/input/ignore - - run [ -d "$TESTDIR"/cli/input/ignore/testdata/.dagger ] - assert_success - - cp -R "$TESTDIR"/cli/input/ignore/testdata/ "$DAGGER_PROJECT"/testdata - "$DAGGER" input -e "input" dir "source" "$DAGGER_PROJECT"/testdata - "$DAGGER" up -e "input" - assert_success -} - -@test "dagger input git" { - "$DAGGER" init - - ## Test simple input git - dagger_new_with_plan "input-simple-git" "$TESTDIR"/cli/input/artifact - - # input git - "$DAGGER" -e "input-simple-git" input list - "$DAGGER" -e "input-simple-git" input git source "https://github.com/samalba/dagger-test-simple" - "$DAGGER" -e "input-simple-git" input list - "$DAGGER" -e "input-simple-git" up --no-cache - run "$DAGGER" -l error query -e "input-simple-git" - assert_output '{ - "bar": "testgit\n", - "foo": "bar", - "source": {} -}' - - # unset input git - "$DAGGER" input -e "input-simple-git" unset "source" - "$DAGGER" up -e "input-simple-git" - run "$DAGGER" -l error query -e "input-simple-git" - assert_output '{ - "foo": "bar" -}' - - ## Test input git with subdir - dagger_new_with_plan "input-subdir-git" "$TESTDIR"/cli/input/git - - # input git - "$DAGGER" -e "input-subdir-git" input git TestRepo "https://github.com/dagger/examples" "main" "todoapp" - - # Assert success (test is directly in the cue file) - "$DAGGER" -e "input-subdir-git" up -} - -@test "dagger input bool" { - "$DAGGER" init - - ## Test simple input git - dagger_new_with_plan "input-simple-bool" "$TESTDIR"/cli/input/bool - - # input git - "$DAGGER" -e "input-simple-bool" input list --show-optional - run "$DAGGER" -e "input-simple-bool" query first - assert_output 'false' - run "$DAGGER" -e "input-simple-bool" query second - assert_output '{}' - - "$DAGGER" -e "input-simple-bool" input bool first true - run "$DAGGER" -e "input-simple-bool" query first - assert_output 'true' - run "$DAGGER" -e "input-simple-bool" query second - assert_output 'true' - - "$DAGGER" -e "input-simple-bool" input bool first false - run "$DAGGER" -e "input-simple-bool" query first - assert_output 'false' - run "$DAGGER" -e "input-simple-bool" query second - assert_output '{}' - - run "$DAGGER" -e "input-simple-bool" input bool first Anything - assert_failure -} - -@test "dagger input list" { - "$DAGGER" init - - dagger_new_with_plan list "$TESTDIR"/cli/input/list - "$DAGGER" input text cfg.str "foobar" -e "list" - - out="$("$DAGGER" input list -e "list")" - outOpt="$("$DAGGER" input list --show-optional -e "list")" - outAll="$("$DAGGER" input list --all -e "list")" - - #note: this is the recommended way to use pipes with bats - run bash -c "echo \"$out\" | grep awsConfig.accessKey | grep 'dagger.#Secret' | grep false | grep 'AWS access key'" - assert_success - - run bash -c "echo \"$out\" | grep cfgInline.source | grep 'dagger.#Artifact' | grep false | grep 'source dir'" - assert_success - - run bash -c "echo \"$outOpt\" | grep awsConfig.accessKey | grep 'dagger.#Secret' | grep 'AWS access key'" - assert_success - - run bash -c "echo \"$outOpt\" | grep cfgInline.source | grep 'dagger.#Artifact' | grep false | grep 'source dir'" - assert_success - - run bash -c "echo \"$outAll\" | grep cfg2" - assert_failure - - run bash -c "echo \"$out\" | grep cfgInline.strDef | grep '*yolo | string' | grep false" - assert_failure - - run bash -c "echo \"$outOpt\" | grep cfgInline.strDef | grep '*yolo | string' | grep false" - assert_success - - run bash -c "echo \"$out\" | grep cfg.num" - assert_failure - - run bash -c "echo \"$outOpt\" | grep cfg.num" - assert_failure - - run bash -c "echo \"$outAll\" | grep cfg.num | grep 21 | grep -v int" - assert_success - - run bash -c "echo \"$outOpt\" | grep cfg.strSet" - assert_failure - - run bash -c "echo \"$outAll\" | grep cfg.strSet | grep pipo" - assert_success -} - -@test "dagger output list" { - "$DAGGER" init - - dagger_new_with_plan list "$TESTDIR"/cli/output/list - - out="$("$DAGGER" output list -e "list")" - - run bash -c "echo \"$out\" | grep cfgInline.url | grep 'http://this.is.a.test/' | grep 'test url description'" - assert_success - - run bash -c "echo \"$out\" | grep cfg.url | grep 'http://this.is.a.test/' | grep 'test url description'" - assert_success - - run bash -c "echo \"$out\" | grep cfg2.url | grep 'http://this.is.a.test/' | grep 'test url description'" - assert_success - - run bash -c "echo \"$out\" | grep cfg.foo | grep '*42 | int'" - assert_success - - run bash -c "echo \"$out\" | grep cfg2.bar | grep 'dagger.#Artifact'" - assert_success - - run bash -c "echo \"$out\" | grep cfg2.str | grep 'string'" - assert_success -} diff --git a/tests/cli/input/artifact/main.cue b/tests/cli/input/artifact/main.cue deleted file mode 100644 index e9423a0a..00000000 --- a/tests/cli/input/artifact/main.cue +++ /dev/null @@ -1,25 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/dagger" -) - -source: dagger.#Artifact -foo: "bar" - -bar: { - string - - #up: [ - op.#FetchContainer & {ref: "busybox"}, - op.#Exec & { - args: ["cp", "/source/testfile", "/out"] - mount: "/source": from: source - }, - op.#Export & { - format: "string" - source: "/out" - }, - ] -} diff --git a/tests/cli/input/artifact/testdata/testfile b/tests/cli/input/artifact/testdata/testfile deleted file mode 100644 index 20495ffb..00000000 --- a/tests/cli/input/artifact/testdata/testfile +++ /dev/null @@ -1 +0,0 @@ -thisisatest diff --git a/tests/cli/input/bool/main.cue b/tests/cli/input/bool/main.cue deleted file mode 100644 index f89e9a1c..00000000 --- a/tests/cli/input/bool/main.cue +++ /dev/null @@ -1,11 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger" -) - -first: dagger.#Input & {bool | *false} - -if first == true { - second: true -} diff --git a/tests/cli/input/git/main.cue b/tests/cli/input/git/main.cue deleted file mode 100644 index bbdad7a8..00000000 --- a/tests/cli/input/git/main.cue +++ /dev/null @@ -1,18 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" -) - -// Input https://github.com/dagger/examples/tree/main/todoapp -TestRepo: dagger.#Input & {dagger.#Artifact} - -// Check README.md -TestFolder: os.#Container & { - always: true - command: #""" - grep -q "Todo APP" /input/repo/README.md - """# - mount: "/input/repo": from: TestRepo -} diff --git a/tests/cli/input/ignore/main.cue b/tests/cli/input/ignore/main.cue deleted file mode 100644 index f08eb7d7..00000000 --- a/tests/cli/input/ignore/main.cue +++ /dev/null @@ -1,20 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/dagger" -) - -source: dagger.#Artifact - -#up: [ - op.#FetchContainer & {ref: "busybox"}, - op.#Exec & { - args: ["sh", "-c", """ - set -exu - [ -f /source/testfile ] - [ ! -d /source/.dagger ] - """] - mount: "/source": from: source - }, -] diff --git a/tests/cli/input/ignore/testdata/.dagger/foo b/tests/cli/input/ignore/testdata/.dagger/foo deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/cli/input/ignore/testdata/testfile b/tests/cli/input/ignore/testdata/testfile deleted file mode 100644 index 20495ffb..00000000 --- a/tests/cli/input/ignore/testdata/testfile +++ /dev/null @@ -1 +0,0 @@ -thisisatest diff --git a/tests/cli/input/list/main.cue b/tests/cli/input/list/main.cue deleted file mode 100644 index 01ec455c..00000000 --- a/tests/cli/input/list/main.cue +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/aws" -) - -awsConfig: aws.#Config & { - // force region - region: "us-east-1" -} - -#A: { - // source dir - source: dagger.#Artifact @dagger(input) - sourceNotInput: dagger.#Artifact - - // a secret - key: dagger.#Secret @dagger(input) - keyNotInput: dagger.#Secret - - // a string - str: string @dagger(input) - strSet: "pipo" @dagger(input) - strDef: *"yolo" | string @dagger(input) - - // a number - num: int | *42 @dagger(input) - numNotInput: int - - // aws config - cfg: awsConfig -} - -cfgInline: { - #A -} - -cfg: #A & { - // force this key - num: 21 -} - -cfg2: cfg diff --git a/tests/cli/input/simple/main.cue b/tests/cli/input/simple/main.cue deleted file mode 100644 index 347631ff..00000000 --- a/tests/cli/input/simple/main.cue +++ /dev/null @@ -1,10 +0,0 @@ -package testing - -input: string - -nested: input: string - -structured: { - a: string - b: int -} diff --git a/tests/cli/input/simple/testdata/input.json b/tests/cli/input/simple/testdata/input.json deleted file mode 100644 index 9e84fe81..00000000 --- a/tests/cli/input/simple/testdata/input.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "a": "from file", - "b": 42 -} diff --git a/tests/cli/input/simple/testdata/input.txt b/tests/cli/input/simple/testdata/input.txt deleted file mode 100644 index 8098d258..00000000 --- a/tests/cli/input/simple/testdata/input.txt +++ /dev/null @@ -1 +0,0 @@ -from file diff --git a/tests/cli/input/simple/testdata/input.yaml b/tests/cli/input/simple/testdata/input.yaml deleted file mode 100644 index 5d0b1ae1..00000000 --- a/tests/cli/input/simple/testdata/input.yaml +++ /dev/null @@ -1,2 +0,0 @@ -a: "from file" -b: 42 diff --git a/tests/cli/output/list/main.cue b/tests/cli/output/list/main.cue deleted file mode 100644 index 95cabedc..00000000 --- a/tests/cli/output/list/main.cue +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "alpha.dagger.io/dagger" -) - -#A: { - // a string - str: string @dagger(output) - strSet: "pipo" @dagger(input) - strDef: *"yolo" | string @dagger(input) - - // test url description - url: "http://this.is.a.test/" @dagger(output) - url2: url - foo: int | *42 @dagger(output) - - bar: dagger.#Artifact @dagger(output) -} - -cfgInline: { - #A -} - -cfg: #A -cfg2: cfg diff --git a/tests/cli/packages/a/main.cue b/tests/cli/packages/a/main.cue deleted file mode 100644 index 01440d18..00000000 --- a/tests/cli/packages/a/main.cue +++ /dev/null @@ -1,19 +0,0 @@ -package a - -import "alpha.dagger.io/dagger/op" - -exp: { - string - #up: [ - op.#FetchContainer & {ref: "busybox"}, - op.#Exec & { - args: ["sh", "-c", """ - printf a > /export - """] - }, - op.#Export & { - source: "/export" - format: "string" - }, - ] -} diff --git a/tests/cli/packages/b/main.cue b/tests/cli/packages/b/main.cue deleted file mode 100644 index a8c337ff..00000000 --- a/tests/cli/packages/b/main.cue +++ /dev/null @@ -1,19 +0,0 @@ -package b - -import "alpha.dagger.io/dagger/op" - -exp: { - string - #up: [ - op.#FetchContainer & {ref: "busybox"}, - op.#Exec & { - args: ["sh", "-c", """ - printf b > /export - """] - }, - op.#Export & { - source: "/export" - format: "string" - }, - ] -} diff --git a/tests/cli/packages/cue.mod/module.cue b/tests/cli/packages/cue.mod/module.cue deleted file mode 100644 index c0728a77..00000000 --- a/tests/cli/packages/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "alpha.dagger.io/test" diff --git a/tests/cli/simple/main.cue b/tests/cli/simple/main.cue deleted file mode 100644 index 672beced..00000000 --- a/tests/cli/simple/main.cue +++ /dev/null @@ -1,21 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -foo: "value" -bar: "another value" -computed: { - string - #up: [ - op.#FetchContainer & {ref: "busybox"}, - op.#Exec & { - args: ["sh", "-c", """ - printf test > /export - """] - }, - op.#Export & { - source: "/export" - format: "string" - }, - ] -} diff --git a/tests/core.bats b/tests/core.bats deleted file mode 100644 index b0aba9bb..00000000 --- a/tests/core.bats +++ /dev/null @@ -1,151 +0,0 @@ -# Test core Dagger features & types - -setup() { - load 'helpers' - - common_setup -} - -# This file combines 2 types of tests: -# old-style tests: use 'dagger compute' -# new-style tests: use 'dagger up' -# -# For new tests, please adopt new-style. -# NOTE: you will need to 'unset DAGGER_PROJECT' -# at the beginning of each new-style test. - -@test "core: inputs & outputs" { - dagger init - - dagger_new_with_plan test-core "$TESTDIR"/core/inputs-outputs - - # List available inputs - run dagger -e test-core input list --show-optional - assert_success - assert_output --partial 'name' - assert_output --partial 'dir' - - # Set dir input - dagger -e test-core input dir dir "$DAGGER_PROJECT" - - # Set text input - dagger -e test-core input text name Bob - run dagger -e test-core up - assert_success - assert_output --partial 'Hello, Bob!' - - run dagger -e test-core output list - assert_success - assert_output --partial 'message "Hello, Bob!"' - - # Unset text input - dagger -e test-core input unset name - run dagger -e test-core up - assert_success - assert_output --partial 'Hello, world!' -} - - -@test "core: simple" { - run "$DAGGER" compute "$TESTDIR"/core/compute/invalid/string - assert_failure - - run "$DAGGER" compute "$TESTDIR"/core/compute/invalid/bool - assert_failure - - run "$DAGGER" compute "$TESTDIR"/core/compute/invalid/int - assert_failure - - run "$DAGGER" compute "$TESTDIR"/core/compute/invalid/struct - assert_failure - - run "$DAGGER" compute "$TESTDIR"/core/compute/success/noop - assert_success - assert_line '{"empty":{}}' - - run "$DAGGER" compute "$TESTDIR"/core/compute/success/simple - assert_success - assert_line '{}' - - run "$DAGGER" compute "$TESTDIR"/core/compute/success/overload/flat - assert_success - - run "$DAGGER" compute "$TESTDIR"/core/compute/success/overload/wrapped - assert_success - - run "$DAGGER" compute "$TESTDIR"/core/compute/success/exec-nocache - assert_success -} - -@test "core: dependencies" { - run "$DAGGER" compute "$TESTDIR"/core/dependencies/simple - assert_success - assert_line '{"A":{"result":"from A"},"B":{"result":"dependency from A"}}' - - run "$DAGGER" compute "$TESTDIR"/core/dependencies/interpolation - assert_success - assert_line '{"A":{"result":"from A"},"B":{"result":"dependency from A"}}' - - run "$DAGGER" compute "$TESTDIR"/core/dependencies/unmarshal - assert_success - assert_line '{"A":"{\"hello\": \"world\"}\n","B":{"result":"unmarshalled.hello=world"},"unmarshalled":{"hello":"world"}}' -} - -@test "core: secrets" { - # secrets used as environment variables must fail - run "$DAGGER" compute "$TESTDIR"/core/secrets/invalid/env - assert_failure - assert_line --partial "conflicting values" - - # strings passed as secrets must fail - run "$DAGGER" compute "$TESTDIR"/core/secrets/invalid/string - assert_failure - - # Setting a text input for a secret value should fail - run "$DAGGER" compute --input-string 'mySecret=SecretValue' "$TESTDIR"/core/secrets/simple - assert_failure - - # Now test with an actual secret and make sure it works - "$DAGGER" init - dagger_new_with_plan secrets "$TESTDIR"/core/secrets/simple - "$DAGGER" input secret mySecret SecretValue - run "$DAGGER" up - assert_success -} - -@test "core: stream" { - dagger init - - dagger_new_with_plan test-stream "$TESTDIR"/core/stream - - # Set dir input - "$DAGGER" input socket dockersocket /var/run/docker.sock - - "$DAGGER" up -} - -@test "core: platform config" { - dagger init - - # Test for amd64 platform - dagger_new_with_plan test-amd "$TESTDIR"/core/platform-config "linux/amd64" - - # Set arch expected value - "$DAGGER" -e test-amd input text targetArch "x86_64" - - # Up amd - "$DAGGER" -e test-amd up --no-cache - - # Test for amd64 platform - dagger_new_with_plan test-arm "$TESTDIR"/core/platform-config "linux/arm64" - - # Set arch expected value - "$DAGGER" -e test-arm input text targetArch "aarch64" - - # Up arm - "$DAGGER" -e test-arm up --no-cache -} - -@test "core: exclude" { - "$DAGGER" up --project "$TESTDIR"/core/exclude -} diff --git a/tests/core/compute/invalid/bool/cue.mod/module.cue b/tests/core/compute/invalid/bool/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/invalid/bool/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/invalid/bool/cue.mod/pkg/.gitignore b/tests/core/compute/invalid/bool/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/invalid/bool/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/invalid/bool/main.cue b/tests/core/compute/invalid/bool/main.cue deleted file mode 100644 index a6a4e782..00000000 --- a/tests/core/compute/invalid/bool/main.cue +++ /dev/null @@ -1,3 +0,0 @@ -package testing - -#up: true diff --git a/tests/core/compute/invalid/int/cue.mod/module.cue b/tests/core/compute/invalid/int/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/invalid/int/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/invalid/int/cue.mod/pkg/.gitignore b/tests/core/compute/invalid/int/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/invalid/int/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/invalid/int/main.cue b/tests/core/compute/invalid/int/main.cue deleted file mode 100644 index 4539e0ae..00000000 --- a/tests/core/compute/invalid/int/main.cue +++ /dev/null @@ -1,3 +0,0 @@ -package testing - -#up: 123 diff --git a/tests/core/compute/invalid/string/cue.mod/module.cue b/tests/core/compute/invalid/string/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/invalid/string/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/invalid/string/cue.mod/pkg/.gitignore b/tests/core/compute/invalid/string/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/invalid/string/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/invalid/string/main.cue b/tests/core/compute/invalid/string/main.cue deleted file mode 100644 index 5590b999..00000000 --- a/tests/core/compute/invalid/string/main.cue +++ /dev/null @@ -1,3 +0,0 @@ -package testing - -#up: "whatever" diff --git a/tests/core/compute/invalid/struct/cue.mod/module.cue b/tests/core/compute/invalid/struct/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/invalid/struct/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/invalid/struct/cue.mod/pkg/.gitignore b/tests/core/compute/invalid/struct/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/invalid/struct/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/invalid/struct/main.cue b/tests/core/compute/invalid/struct/main.cue deleted file mode 100644 index 7d900376..00000000 --- a/tests/core/compute/invalid/struct/main.cue +++ /dev/null @@ -1,3 +0,0 @@ -package testing - -#up: whatever: "wrong" diff --git a/tests/core/compute/success/exec-nocache/cue.mod/module.cue b/tests/core/compute/success/exec-nocache/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/success/exec-nocache/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/success/exec-nocache/cue.mod/pkg/.gitignore b/tests/core/compute/success/exec-nocache/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/success/exec-nocache/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/success/exec-nocache/main.cue b/tests/core/compute/success/exec-nocache/main.cue deleted file mode 100644 index 6609cdbd..00000000 --- a/tests/core/compute/success/exec-nocache/main.cue +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger/op" -) - -rand: { - string - - #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - always: true - args: ["sh", "-c", """ - tr -dc A-Za-z0-9 /id - """] - }, - op.#Export & {source: "/id"}, - ] -} - -// If rand is executed twice, cue won't validate -ref1: rand -ref2: ref1 diff --git a/tests/core/compute/success/noop/cue.mod/module.cue b/tests/core/compute/success/noop/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/success/noop/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/success/noop/cue.mod/pkg/.gitignore b/tests/core/compute/success/noop/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/success/noop/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/success/noop/main.cue b/tests/core/compute/success/noop/main.cue deleted file mode 100644 index 9c5590fa..00000000 --- a/tests/core/compute/success/noop/main.cue +++ /dev/null @@ -1,6 +0,0 @@ -package testing - -// no-op, should not error -empty: { - #up: [] -} diff --git a/tests/core/compute/success/overload/flat/cue.mod/module.cue b/tests/core/compute/success/overload/flat/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/success/overload/flat/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/success/overload/flat/cue.mod/pkg/.gitignore b/tests/core/compute/success/overload/flat/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/success/overload/flat/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/success/overload/flat/main.cue b/tests/core/compute/success/overload/flat/main.cue deleted file mode 100644 index 8fd9e6ab..00000000 --- a/tests/core/compute/success/overload/flat/main.cue +++ /dev/null @@ -1,19 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -new_prop: "lala" -#new_def: "lala" - -new_prop_too: string -#new_def_too: string - -#up: [ - op.#FetchContainer & { - ref: "busybox" - }, - op.#Exec & { - args: ["true"] - dir: "/" - }, -] diff --git a/tests/core/compute/success/overload/wrapped/cue.mod/module.cue b/tests/core/compute/success/overload/wrapped/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/success/overload/wrapped/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/success/overload/wrapped/cue.mod/pkg/.gitignore b/tests/core/compute/success/overload/wrapped/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/success/overload/wrapped/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/success/overload/wrapped/main.cue b/tests/core/compute/success/overload/wrapped/main.cue deleted file mode 100644 index 76256287..00000000 --- a/tests/core/compute/success/overload/wrapped/main.cue +++ /dev/null @@ -1,21 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -foo: { - new_prop: "lala" - #new_def: "lala" - - new_prop_too: string - #new_def_too: string - - #up: [ - op.#FetchContainer & { - ref: "busybox" - }, - op.#Exec & { - args: ["true"] - dir: "/" - }, - ] -} diff --git a/tests/core/compute/success/simple/cue.mod/module.cue b/tests/core/compute/success/simple/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/compute/success/simple/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/compute/success/simple/cue.mod/pkg/.gitignore b/tests/core/compute/success/simple/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/compute/success/simple/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/compute/success/simple/main.cue b/tests/core/compute/success/simple/main.cue deleted file mode 100644 index 165f52bf..00000000 --- a/tests/core/compute/success/simple/main.cue +++ /dev/null @@ -1,13 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "busybox" - }, - op.#Exec & { - args: ["true"] - dir: "/" - }, -] diff --git a/tests/core/dependencies/interpolation/cue.mod/module.cue b/tests/core/dependencies/interpolation/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/dependencies/interpolation/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/dependencies/interpolation/cue.mod/pkg/.gitignore b/tests/core/dependencies/interpolation/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/dependencies/interpolation/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/dependencies/interpolation/main.cue b/tests/core/dependencies/interpolation/main.cue deleted file mode 100644 index 1931c28d..00000000 --- a/tests/core/dependencies/interpolation/main.cue +++ /dev/null @@ -1,47 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -A: { - result: string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo '{"result": "from A"}' > /tmp/out - """, - ] - dir: "/" - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} - -B: { - result: string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo "{\\"result\\": \\"dependency \(A.result)\\"}" > /tmp/out - """, - ] - dir: "/" - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} diff --git a/tests/core/dependencies/simple/cue.mod/module.cue b/tests/core/dependencies/simple/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/dependencies/simple/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/dependencies/simple/cue.mod/pkg/.gitignore b/tests/core/dependencies/simple/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/dependencies/simple/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/dependencies/simple/main.cue b/tests/core/dependencies/simple/main.cue deleted file mode 100644 index a1cb264e..00000000 --- a/tests/core/dependencies/simple/main.cue +++ /dev/null @@ -1,47 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -A: { - result: string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo '{"result": "from A"}' > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} - -B: { - result: string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - env: DATA: A.result - args: ["sh", "-c", """ - echo "{\\"result\\": \\"dependency $DATA\\"}" > /tmp/out - """, - ] - dir: "/" - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} diff --git a/tests/core/dependencies/unmarshal/cue.mod/module.cue b/tests/core/dependencies/unmarshal/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/dependencies/unmarshal/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/dependencies/unmarshal/cue.mod/pkg/.gitignore b/tests/core/dependencies/unmarshal/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/dependencies/unmarshal/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/dependencies/unmarshal/main.cue b/tests/core/dependencies/unmarshal/main.cue deleted file mode 100644 index f69f0e76..00000000 --- a/tests/core/dependencies/unmarshal/main.cue +++ /dev/null @@ -1,52 +0,0 @@ -package testing - -import ( - "encoding/json" - "alpha.dagger.io/dagger/op" -) - -A: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo '{"hello": "world"}' > /tmp/out - """, - ] - dir: "/" - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "string" - }, - ] -} - -unmarshalled: json.Unmarshal(A) - -B: { - result: string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo "{\\"result\\": \\"unmarshalled.hello=\(unmarshalled.hello)\\"}" > /tmp/out - """, - ] - dir: "/" - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} diff --git a/tests/core/exclude/.dagger/env/default/.gitignore b/tests/core/exclude/.dagger/env/default/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/tests/core/exclude/.dagger/env/default/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/tests/core/exclude/.dagger/env/default/plan/cue.mod/module.cue b/tests/core/exclude/.dagger/env/default/plan/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/exclude/.dagger/env/default/plan/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/exclude/.dagger/env/default/plan/cue.mod/pkg/.gitignore b/tests/core/exclude/.dagger/env/default/plan/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/core/exclude/.dagger/env/default/plan/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/core/exclude/.dagger/env/default/plan/main.cue b/tests/core/exclude/.dagger/env/default/plan/main.cue deleted file mode 100644 index 682e4316..00000000 --- a/tests/core/exclude/.dagger/env/default/plan/main.cue +++ /dev/null @@ -1,41 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/alpine" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -TestData: dagger.#Artifact - -_expected: """ - /src/b.txt - - /src/foo: - bar.txt - - """ - -TestIgnore: { - string - #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - args: ["sh", "-c", "ls /src/* > /out.txt"] - mount: "/src": from: TestData - }, - op.#Export & {source: "/out.txt"}, - op.#Exec & { - args: [ - "sh", - "-ec", - """ - cat > /test.txt << EOF - \(_expected) - EOF - test "$(cat /out.txt)" = "$(cat /test.txt)" - """, - ] - }, - ] -} diff --git a/tests/core/exclude/.dagger/env/default/values.yaml b/tests/core/exclude/.dagger/env/default/values.yaml deleted file mode 100644 index d0eee2cd..00000000 --- a/tests/core/exclude/.dagger/env/default/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ -plan: - module: .dagger/env/default/plan -name: default -inputs: - TestData: - dir: - path: ./testdata - exclude: - - a.txt - - '*/*.json' -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArcmRHMFByQkZSdGhteHhm - T2pSWW1UcU5LaFJabFJORllydFk3UkVsSHhVCndQZWNUKzVOeUovTTdCR3FmUXpO - c29GQXhpZkxwSmoweWxqZG1CMkcrRGcKLS0tIDhRMTVSc3NXSWIxSm55TGkwT1E1 - L0NzY0RIMWNkc3k2WStOUGg4SndNRm8Kk7QSP/8spn1Set08VejVW9k4ZwBFqR0T - Ff/N73yNvo633hrfEJtTkhA/aZYyG9bPJy9s9vRDoNFkdTLSFcYX5g== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-15T16:27:05Z" - mac: ENC[AES256_GCM,data:XQyAun4JVQxzV9eqte3dpQb8YP9ylWhnW5gLB3avpOZks/CVUN4Ewgob5tA4FB5S4x1Syk/D8ts32nQoEd0HUkdqTMjnGjcXdNiH/iT+k+LrVX30uAZ3JLXmzBfP9WnfJXlKVYaWXWSokiQJmYjXtmotr9rMl7rQeixGZfYcsns=,iv:LyfYlgbiiTh1oapa/h7FUGjd8xGlrD0M9+bxkP5HT6A=,tag:bhw5k2/4zGCxC0nnV4zwDw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/tests/core/exclude/testdata/a.txt b/tests/core/exclude/testdata/a.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/core/exclude/testdata/b.txt b/tests/core/exclude/testdata/b.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/core/exclude/testdata/foo/bar.txt b/tests/core/exclude/testdata/foo/bar.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/core/exclude/testdata/foo/cow.json b/tests/core/exclude/testdata/foo/cow.json deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/core/inputs-outputs/test-core.cue b/tests/core/inputs-outputs/test-core.cue deleted file mode 100644 index c15e75a5..00000000 --- a/tests/core/inputs-outputs/test-core.cue +++ /dev/null @@ -1,15 +0,0 @@ -package testcore - -import ( - "alpha.dagger.io/dagger" -) - -name: dagger.#Input & { - string | *"world" -} - -message: dagger.#Output & "Hello, \(name)!" - -dir: dagger.#Input & dagger.#Artifact - -samedir: dagger.#Output & dir diff --git a/tests/core/platform-config/platform-config.cue b/tests/core/platform-config/platform-config.cue deleted file mode 100644 index 42d79eba..00000000 --- a/tests/core/platform-config/platform-config.cue +++ /dev/null @@ -1,58 +0,0 @@ -package main - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/dagger" -) - -targetArch: dagger.#Input & {string} - -TestFetch: #up: [ - op.#FetchContainer & { - ref: "docker.io/alpine" - }, - - op.#Exec & { - args: ["/bin/sh", "-c", "echo $(uname -a) >> /platform.txt"] - always: true - }, - - op.#Exec & { - args: ["/bin/sh", "-c", """ - cat /platform.txt | grep "$TARGET_ARCH" - """] - env: TARGET_ARCH: targetArch - }, -] - -TestBuild: #up: [ - op.#DockerBuild & { - dockerfile: """ - FROM alpine - - RUN echo $(uname -a) > /platform.txt - """ - }, - - op.#Exec & { - args: ["/bin/sh", "-c", """ - cat /platform.txt | grep "$TARGET_ARCH" - """] - env: TARGET_ARCH: targetArch - }, -] - -TestLoad: #up: [ - op.#Load & { - from: TestBuild - }, - - // Compare arch - op.#Exec & { - args: ["/bin/sh", "-c", "diff /build/platform.txt /fetch/platform.txt"] - mount: { - "/build": from: TestBuild - "/fetch": from: TestFetch - } - }, -] diff --git a/tests/core/secrets/invalid/env/cue.mod/module.cue b/tests/core/secrets/invalid/env/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/secrets/invalid/env/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/secrets/invalid/env/cue.mod/pkg/.gitignore b/tests/core/secrets/invalid/env/cue.mod/pkg/.gitignore deleted file mode 100644 index 7280417b..00000000 --- a/tests/core/secrets/invalid/env/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# dagger universe -alpha.dagger.io -dagger.io -universe.dagger.io diff --git a/tests/core/secrets/invalid/env/env.cue b/tests/core/secrets/invalid/env/env.cue deleted file mode 100644 index 08a2dcda..00000000 --- a/tests/core/secrets/invalid/env/env.cue +++ /dev/null @@ -1,21 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -mySecret: dagger.#Secret - -TestSecrets: #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - } - }, - - op.#Exec & { - env: foo: mySecret - }, -] diff --git a/tests/core/secrets/invalid/string/cue.mod/module.cue b/tests/core/secrets/invalid/string/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/secrets/invalid/string/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/secrets/invalid/string/cue.mod/pkg/.gitignore b/tests/core/secrets/invalid/string/cue.mod/pkg/.gitignore deleted file mode 100644 index 7280417b..00000000 --- a/tests/core/secrets/invalid/string/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# dagger universe -alpha.dagger.io -dagger.io -universe.dagger.io diff --git a/tests/core/secrets/invalid/string/string.cue b/tests/core/secrets/invalid/string/string.cue deleted file mode 100644 index 1e976641..00000000 --- a/tests/core/secrets/invalid/string/string.cue +++ /dev/null @@ -1,21 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -mySecret: dagger.#Secret - -TestString: #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - } - }, - - op.#Exec & { - mount: "/secret": secret: mySecret - args: ["true"] - }, -] diff --git a/tests/core/secrets/simple/cue.mod/module.cue b/tests/core/secrets/simple/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/core/secrets/simple/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/core/secrets/simple/cue.mod/pkg/.gitignore b/tests/core/secrets/simple/cue.mod/pkg/.gitignore deleted file mode 100644 index 7280417b..00000000 --- a/tests/core/secrets/simple/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# dagger universe -alpha.dagger.io -dagger.io -universe.dagger.io diff --git a/tests/core/secrets/simple/simple.cue b/tests/core/secrets/simple/simple.cue deleted file mode 100644 index 2abfbf4a..00000000 --- a/tests/core/secrets/simple/simple.cue +++ /dev/null @@ -1,32 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -mySecret: dagger.#Secret - -TestSecrets: #up: [ - op.#Load & { - from: alpine.#Image & { - package: bash: true - } - }, - - op.#Exec & { - mount: "/secret": secret: mySecret - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - test "$(cat /secret)" = "SecretValue" - """#, - ] - }, -] diff --git a/tests/core/stream/main.cue b/tests/core/stream/main.cue deleted file mode 100644 index dc77480a..00000000 --- a/tests/core/stream/main.cue +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" -) - -dockersocket: dagger.#Stream & dagger.#Input - -TestDockerSocket: #up: [ - op.#Load & { - from: alpine.#Image & { - package: "docker-cli": true - } - }, - - op.#Exec & { - always: true - mount: "/var/run/docker.sock": stream: dockersocket - args: ["docker", "info"] - }, -] diff --git a/tests/ops.bats b/tests/ops.bats deleted file mode 100644 index ab839a57..00000000 --- a/tests/ops.bats +++ /dev/null @@ -1,243 +0,0 @@ -setup() { - load 'helpers' - - common_setup -} - -@test "op.#Load" { - run "$DAGGER" compute "$TESTDIR"/ops/load/valid/component - assert_success - assert_line '{"TestComponent":{},"TestComponentLoad":"lol","TestNestedLoad":"lol"}' - - run "$DAGGER" compute "$TESTDIR"/ops/load/valid/script - assert_success - - run "$DAGGER" compute "$TESTDIR"/ops/load/invalid/cache - assert_failure -} - -@test "op.#Mount" { - # tmpfs - run "$DAGGER" compute "$TESTDIR"/ops/mounts/valid/tmpfs - assert_line '{"TestMountTmpfs":"ok"}' - assert_success - - # cache - run "$DAGGER" compute "$TESTDIR"/ops/mounts/valid/cache - assert_success - - # component - run "$DAGGER" compute "$TESTDIR"/ops/mounts/valid/component - assert_success - assert_line '{"test":"hello world"}' - - # Invalid mount path - run "$DAGGER" compute "$TESTDIR"/ops/mounts/valid/script - assert_failure -} - -@test "op.#Copy" { - run "$DAGGER" compute "$TESTDIR"/ops/copy/valid/component - assert_success - assert_line '{"TestComponent":{},"TestComponentCopy":"lol","TestNestedCopy":"lol"}' - - run "$DAGGER" compute "$TESTDIR"/ops/copy/valid/script - assert_success - - run "$DAGGER" compute "$TESTDIR"/ops/copy/invalid/cache - assert_failure -} - -@test "op.#Local" { - skip "There are no local tests right now" -} - -@test "op.#FetchContainer" { - # non existent container image" - run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/nonexistent/image - assert_failure - - # non existent container tag - run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/nonexistent/tag - assert_failure - - # non existent container digest - run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/nonexistent/digest - assert_failure - - # valid containers - run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/exist - assert_success - - # missing ref - # FIXME: distinguish missing inputs from incorrect config - # run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/invalid - # assert_failure - - # non existent container image with valid digest - # FIXME https://github.com/blocklayerhq/dagger/issues/32 - # run "$DAGGER" compute "$TESTDIR"/ops/fetch-container/nonexistent/image-with-valid-digest - # assert_failure -} - -@test "op.#PushContainer" { - dagger_new_with_env "$TESTDIR"/ops/push-container/ - run "$DAGGER" up -e push-container - assert_success -} - -@test "op.#FetchGit" { - run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/exist - assert_success - - run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/nonexistent/remote - assert_failure - - run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/nonexistent/ref - assert_failure - - run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/nonexistent/bork - assert_failure - - run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/gitdir - assert_success - - dagger_new_with_env "$TESTDIR"/ops/fetch-git/private-repo - run "$DAGGER" up -e op-fetch-git - assert_success - - # FIXME: distinguish missing inputs from incorrect config - # run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/invalid - # assert_failure -} - -@test "op.#FetchHTTP" { - run "$DAGGER" compute "$TESTDIR"/ops/fetch-http/exist - assert_success - - run "$DAGGER" compute "$TESTDIR"/ops/fetch-http/nonexistent - assert_failure -} - -@test "op.#Exec" { - run "$DAGGER" compute "$TESTDIR"/ops/exec/invalid - assert_failure - - run "$DAGGER" compute "$TESTDIR"/ops/exec/error - assert_failure - - run "$DAGGER" compute "$TESTDIR"/ops/exec/simple - assert_success - - # XXX should run twice and test that the string "always output" is visible with DOCKER_OUTPUT=1 - # Alternatively, use export, but this would test multiple things then... - run "$DAGGER" compute "$TESTDIR"/ops/exec/always - assert_success - - run "$DAGGER" compute "$TESTDIR"/ops/exec/env/invalid - assert_failure - - run "$DAGGER" compute "$TESTDIR"/ops/exec/env/valid - assert_success - - run "$DAGGER" compute --input-string 'bar=overlay environment' "$TESTDIR"/ops/exec/env/overlay - assert_success - - run "$DAGGER" compute "$TESTDIR"/ops/exec/dir/doesnotexist - assert_success - - run "$DAGGER" compute "$TESTDIR"/ops/exec/dir/exist - assert_success - - - run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/non_concrete_referenced - assert_success - assert_line '{"hello":"world"}' - - # NOTE: the exec is meant to fail - and we test that as a way to confirm it has been executed - run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/non_concrete_not_referenced - assert_failure - - # package with optional def, not referenced, should be executed - run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/with_pkg_def - assert_success - - # script with optional prop, not referenced, should be executed - run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/with_pkg_optional - assert_success - - # FIXME https://github.com/blocklayerhq/dagger/issues/74 - # run "$DAGGER" compute "$TESTDIR"/ops/exec/exit_code - # assert_failure # --exit=123 - - # script with non-optional prop, not referenced, should be executed - run "$DAGGER" compute "$TESTDIR"/ops/exec/undefined/with_pkg_mandatory - assert_success -} - -@test "op.#Export" { - run "$DAGGER" compute "$TESTDIR"/ops/export/json - assert_success - assert_line '{"TestExportList":["milk","pumpkin pie","eggs","juice"],"TestExportMap":{"something":"something"},"TestExportScalar":true}' - - run "$DAGGER" compute "$TESTDIR"/ops/export/string - assert_success - assert_line '{"TestExportString":"something"}' - - run "$DAGGER" compute "$TESTDIR"/ops/export/withvalidation - assert_success - assert_line '{"TestExportStringValidation":"something"}' - - run "$DAGGER" compute "$TESTDIR"/ops/export/concurrency - assert_success - assert_line '{"TestExportConcurrency1":"lol1","TestExportConcurrency10":"lol10","TestExportConcurrency2":"lol2","TestExportConcurrency3":"lol3","TestExportConcurrency4":"lol4","TestExportConcurrency5":"lol5","TestExportConcurrency6":"lol6","TestExportConcurrency7":"lol7","TestExportConcurrency8":"lol8","TestExportConcurrency9":"lol9"}' - - # does not pass additional validation - run "$DAGGER" compute "$TESTDIR"/ops/export/invalid/validation - assert_failure - - # invalid format - run "$DAGGER" compute "$TESTDIR"/ops/export/invalid/format - assert_failure - - # invalid path - run "$DAGGER" compute "$TESTDIR"/ops/export/invalid/path - assert_failure - - run "$DAGGER" compute "$TESTDIR"/ops/export/float - assert_success - assert_line '{"TestExportFloat":-123.5}' - - run "$DAGGER" compute "$TESTDIR"/ops/export/yaml - assert_success - assert_line '{"TestExportList":["milk","pumpkin pie","eggs","juice"],"TestExportMap":{"something":"something"},"TestExportScalar":true}' - - run "$DAGGER" compute "$TESTDIR"/ops/export/bool - assert_success - assert_line '{"TestExportBool":true}' - - run "$DAGGER" compute "$TESTDIR"/ops/export/number - assert_success - assert_line '{"TestExportNumber":-123.5}' -} - -@test "op.#Subdir" { - run "$DAGGER" compute "$TESTDIR"/ops/subdir/valid/simple - assert_success - assert_line '{"TestSimpleSubdir":"world"}' - - run "$DAGGER" compute "$TESTDIR"/ops/subdir/valid/container - assert_success - assert_line '{"TestSubdirMount":"world"}' - - run "$DAGGER" compute "$TESTDIR"/ops/subdir/invalid/exec - assert_failure - - run "$DAGGER" compute "$TESTDIR"/ops/subdir/invalid/path - assert_failure -} - -@test "op.#DockerBuild" { - run "$DAGGER" compute --input-dir TestData="$TESTDIR"/ops/dockerbuild/testdata "$TESTDIR"/ops/dockerbuild - assert_success -} diff --git a/tests/ops/copy/invalid/cache/cue.mod/module.cue b/tests/ops/copy/invalid/cache/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/copy/invalid/cache/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/copy/invalid/cache/cue.mod/pkg/.gitignore b/tests/ops/copy/invalid/cache/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/copy/invalid/cache/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/copy/invalid/cache/main.cue b/tests/ops/copy/invalid/cache/main.cue deleted file mode 100644 index 8fef0a56..00000000 --- a/tests/ops/copy/invalid/cache/main.cue +++ /dev/null @@ -1,49 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestCacheCopyLoadAlpine: { - string - - #up: [ - op.#FetchContainer & { - ref: "busybox" - }, - op.#Copy & { - from: [ - op.#FetchContainer & { - ref: "alpine" - }, - ] - src: "/etc/issue" - dest: "/" - }, - op.#Export & { - source: "/issue" - format: "string" - }, - ] -} - -TestCacheCopy: { - string - - #up: [ - op.#FetchContainer & { - ref: "busybox" - }, - op.#Copy & { - from: [ - op.#FetchContainer & { - ref: "busybox" - }, - ] - src: "/etc/issue" - dest: "/" - }, - op.#Export & { - source: "/issue" - format: "string" - }, - ] -} diff --git a/tests/ops/copy/valid/component/cue.mod/module.cue b/tests/ops/copy/valid/component/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/copy/valid/component/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/copy/valid/component/cue.mod/pkg/.gitignore b/tests/ops/copy/valid/component/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/copy/valid/component/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/copy/valid/component/main.cue b/tests/ops/copy/valid/component/main.cue deleted file mode 100644 index 6af0f5d6..00000000 --- a/tests/ops/copy/valid/component/main.cue +++ /dev/null @@ -1,61 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestComponent: #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - printf lol > /id - """] - }, -] - -TestComponentCopy: { - string - - #up: [ - op.#FetchContainer & { - ref: "busybox" - }, - op.#Copy & { - from: TestComponent - src: "/id" - dest: "/" - }, - op.#Export & { - source: "/id" - format: "string" - }, - ] -} - -TestNestedCopy: { - string - - #up: [ - op.#FetchContainer & { - ref: "busybox" - }, - op.#Copy & { - from: #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - printf lol > /id - """] - }, - ] - src: "/id" - dest: "/" - }, - op.#Export & { - source: "/id" - format: "string" - }, - ] -} diff --git a/tests/ops/copy/valid/script/cue.mod/module.cue b/tests/ops/copy/valid/script/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/copy/valid/script/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/copy/valid/script/cue.mod/pkg/.gitignore b/tests/ops/copy/valid/script/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/copy/valid/script/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/copy/valid/script/main.cue b/tests/ops/copy/valid/script/main.cue deleted file mode 100644 index fe85ac53..00000000 --- a/tests/ops/copy/valid/script/main.cue +++ /dev/null @@ -1,26 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestScriptCopy: { - string - - #up: [ - op.#FetchContainer & { - ref: "busybox" - }, - op.#Copy & { - from: [ - op.#FetchContainer & { - ref: "alpine" - }, - ] - src: "/etc/issue" - dest: "/" - }, - op.#Export & { - source: "/issue" - format: "string" - }, - ] -} diff --git a/tests/ops/dockerbuild/cue.mod/module.cue b/tests/ops/dockerbuild/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/dockerbuild/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/dockerbuild/cue.mod/pkg/.gitignore b/tests/ops/dockerbuild/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/dockerbuild/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/dockerbuild/main.cue b/tests/ops/dockerbuild/main.cue deleted file mode 100644 index 3f1fb7f0..00000000 --- a/tests/ops/dockerbuild/main.cue +++ /dev/null @@ -1,122 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -// Set to `--input-dir=./tests/dockerbuild/testdata` -TestData: dagger.#Artifact - -TestInlinedDockerfile: #up: [ - op.#DockerBuild & { - dockerfile: """ - FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d - RUN echo hello world - """ - }, -] - -TestOpChaining: #up: [ - op.#DockerBuild & { - dockerfile: """ - FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d - RUN echo foobar > /output - """ - }, - op.#Exec & { - args: ["sh", "-c", "test $(cat /output) = foobar"] - }, -] - -TestBuildContext: #up: [ - op.#DockerBuild & { - context: TestData - }, - op.#Exec & { - args: ["sh", "-c", "test $(cat /dir/foo) = foobar"] - }, -] - -TestBuildContextAndDockerfile: #up: [ - op.#DockerBuild & { - context: TestData - dockerfile: """ - FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d - COPY foo /override - """ - }, - op.#Exec & { - args: ["sh", "-c", "test $(cat /override) = foobar"] - }, -] - -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" - """#] - }, -] diff --git a/tests/ops/dockerbuild/testdata/Dockerfile b/tests/ops/dockerbuild/testdata/Dockerfile deleted file mode 100644 index 6c3408cd..00000000 --- a/tests/ops/dockerbuild/testdata/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d -COPY . /dir -RUN test $(cat /dir/foo) = foobar diff --git a/tests/ops/dockerbuild/testdata/dockerfilepath/Dockerfile.custom b/tests/ops/dockerbuild/testdata/dockerfilepath/Dockerfile.custom deleted file mode 100644 index d3a60705..00000000 --- a/tests/ops/dockerbuild/testdata/dockerfilepath/Dockerfile.custom +++ /dev/null @@ -1,2 +0,0 @@ -FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d -RUN echo dockerfilePath > /test diff --git a/tests/ops/dockerbuild/testdata/foo b/tests/ops/dockerbuild/testdata/foo deleted file mode 100644 index 323fae03..00000000 --- a/tests/ops/dockerbuild/testdata/foo +++ /dev/null @@ -1 +0,0 @@ -foobar diff --git a/tests/ops/exec/always/cue.mod/module.cue b/tests/ops/exec/always/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/always/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/always/cue.mod/pkg/.gitignore b/tests/ops/exec/always/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/always/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/always/main.cue b/tests/ops/exec/always/main.cue deleted file mode 100644 index 6305ee94..00000000 --- a/tests/ops/exec/always/main.cue +++ /dev/null @@ -1,13 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["echo", "always output"] - always: true - }, -] diff --git a/tests/ops/exec/dir/doesnotexist/cue.mod/module.cue b/tests/ops/exec/dir/doesnotexist/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/dir/doesnotexist/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/dir/doesnotexist/cue.mod/pkg/.gitignore b/tests/ops/exec/dir/doesnotexist/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/dir/doesnotexist/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/dir/doesnotexist/main.cue b/tests/ops/exec/dir/doesnotexist/main.cue deleted file mode 100644 index d96a40be..00000000 --- a/tests/ops/exec/dir/doesnotexist/main.cue +++ /dev/null @@ -1,16 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo "pwd is: $(pwd)" - [ "$(pwd)" == "/thisisnonexistent" ] || exit 1 - """] - dir: "/thisisnonexistent" - }, -] diff --git a/tests/ops/exec/dir/exist/cue.mod/module.cue b/tests/ops/exec/dir/exist/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/dir/exist/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/dir/exist/cue.mod/pkg/.gitignore b/tests/ops/exec/dir/exist/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/dir/exist/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/dir/exist/main.cue b/tests/ops/exec/dir/exist/main.cue deleted file mode 100644 index 26bed476..00000000 --- a/tests/ops/exec/dir/exist/main.cue +++ /dev/null @@ -1,16 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo "pwd is: $(pwd)" - [ "$(pwd)" == "/etc" ] || exit 1 - """] - dir: "/etc" - }, -] diff --git a/tests/ops/exec/env/invalid/cue.mod/module.cue b/tests/ops/exec/env/invalid/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/env/invalid/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/env/invalid/cue.mod/pkg/.gitignore b/tests/ops/exec/env/invalid/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/env/invalid/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/env/invalid/main.cue b/tests/ops/exec/env/invalid/main.cue deleted file mode 100644 index 6b79d5e4..00000000 --- a/tests/ops/exec/env/invalid/main.cue +++ /dev/null @@ -1,15 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", #""" - echo "$foo" - """#] - env: foo: lala: "lala" - }, -] diff --git a/tests/ops/exec/env/overlay/cue.mod/module.cue b/tests/ops/exec/env/overlay/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/env/overlay/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/env/overlay/cue.mod/pkg/.gitignore b/tests/ops/exec/env/overlay/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/env/overlay/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/env/overlay/main.cue b/tests/ops/exec/env/overlay/main.cue deleted file mode 100644 index 92367318..00000000 --- a/tests/ops/exec/env/overlay/main.cue +++ /dev/null @@ -1,18 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -bar: string - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo "foo: $foo" - [ "$foo" == "overlay environment" ] || exit 1 - """] - env: foo: bar - }, -] diff --git a/tests/ops/exec/env/valid/cue.mod/module.cue b/tests/ops/exec/env/valid/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/env/valid/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/env/valid/cue.mod/pkg/.gitignore b/tests/ops/exec/env/valid/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/env/valid/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/env/valid/main.cue b/tests/ops/exec/env/valid/main.cue deleted file mode 100644 index a6af1699..00000000 --- a/tests/ops/exec/env/valid/main.cue +++ /dev/null @@ -1,16 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - do: "fetch-container" - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - [ "$foo" == "output environment" ] || exit 1 - """] - env: foo: "output environment" - }, -] diff --git a/tests/ops/exec/error/cue.mod/module.cue b/tests/ops/exec/error/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/error/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/error/cue.mod/pkg/.gitignore b/tests/ops/exec/error/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/error/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/error/main.cue b/tests/ops/exec/error/main.cue deleted file mode 100644 index 4fa7b8ee..00000000 --- a/tests/ops/exec/error/main.cue +++ /dev/null @@ -1,12 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["erroringout"] - }, -] diff --git a/tests/ops/exec/exit_code/main.cue b/tests/ops/exec/exit_code/main.cue deleted file mode 100644 index 23a6a8a0..00000000 --- a/tests/ops/exec/exit_code/main.cue +++ /dev/null @@ -1,12 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", "exit 123"] - }, -] diff --git a/tests/ops/exec/invalid/cue.mod/module.cue b/tests/ops/exec/invalid/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/invalid/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/invalid/cue.mod/pkg/.gitignore b/tests/ops/exec/invalid/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/invalid/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/invalid/main.cue b/tests/ops/exec/invalid/main.cue deleted file mode 100644 index 8a271fcd..00000000 --- a/tests/ops/exec/invalid/main.cue +++ /dev/null @@ -1,11 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - }, -] diff --git a/tests/ops/exec/simple/cue.mod/module.cue b/tests/ops/exec/simple/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/simple/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/simple/cue.mod/pkg/.gitignore b/tests/ops/exec/simple/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/simple/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/simple/main.cue b/tests/ops/exec/simple/main.cue deleted file mode 100644 index bf9c9400..00000000 --- a/tests/ops/exec/simple/main.cue +++ /dev/null @@ -1,12 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["echo", "simple output"] - }, -] diff --git a/tests/ops/exec/undefined/non_concrete_not_referenced/cue.mod/module.cue b/tests/ops/exec/undefined/non_concrete_not_referenced/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/undefined/non_concrete_not_referenced/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/undefined/non_concrete_not_referenced/cue.mod/pkg/.gitignore b/tests/ops/exec/undefined/non_concrete_not_referenced/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/undefined/non_concrete_not_referenced/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/undefined/non_concrete_not_referenced/main.cue b/tests/ops/exec/undefined/non_concrete_not_referenced/main.cue deleted file mode 100644 index ad4952b8..00000000 --- a/tests/ops/exec/undefined/non_concrete_not_referenced/main.cue +++ /dev/null @@ -1,20 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -hello: "world" -bar: string - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - dir: "/" - args: ["sh", "-c", """ - echo \(hello) - echo "This test SHOULD fail, because this script SHOULD execute, since bar is not referenced" - exit 1 - """] - }, -] diff --git a/tests/ops/exec/undefined/non_concrete_referenced/cue.mod/module.cue b/tests/ops/exec/undefined/non_concrete_referenced/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/exec/undefined/non_concrete_referenced/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/exec/undefined/non_concrete_referenced/cue.mod/pkg/.gitignore b/tests/ops/exec/undefined/non_concrete_referenced/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/undefined/non_concrete_referenced/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/undefined/non_concrete_referenced/main.cue b/tests/ops/exec/undefined/non_concrete_referenced/main.cue deleted file mode 100644 index 62c9a255..00000000 --- a/tests/ops/exec/undefined/non_concrete_referenced/main.cue +++ /dev/null @@ -1,20 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -hello: "world" -bar: string - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - dir: "/" - args: ["sh", "-c", """ - echo \(bar) - echo "This test SHOULD succeed, because this is never going to be executed, as \(bar) is not concrete" - exit 1 - """] - }, -] diff --git a/tests/ops/exec/undefined/with_pkg_def/cue.mod/module.cue b/tests/ops/exec/undefined/with_pkg_def/cue.mod/module.cue deleted file mode 100644 index 25575c7c..00000000 --- a/tests/ops/exec/undefined/with_pkg_def/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "test.dagger.io/testing" diff --git a/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/.gitignore b/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/test.dagger.io/def/main.cue b/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/test.dagger.io/def/main.cue deleted file mode 100644 index 2221be30..00000000 --- a/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/test.dagger.io/def/main.cue +++ /dev/null @@ -1,16 +0,0 @@ -package def - -import "alpha.dagger.io/dagger/op" - -#dang: string - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo success - """] - }, -] diff --git a/tests/ops/exec/undefined/with_pkg_def/main.cue b/tests/ops/exec/undefined/with_pkg_def/main.cue deleted file mode 100644 index 052c25f9..00000000 --- a/tests/ops/exec/undefined/with_pkg_def/main.cue +++ /dev/null @@ -1,12 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger/op" - "test.dagger.io/def" -) - -#up: [ - op.#Load & { - from: def - }, -] diff --git a/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/module.cue b/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/module.cue deleted file mode 100644 index 25575c7c..00000000 --- a/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "test.dagger.io/testing" diff --git a/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/.gitignore b/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/test.dagger.io/nonoptional/main.cue b/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/test.dagger.io/nonoptional/main.cue deleted file mode 100644 index 1b3443f2..00000000 --- a/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/test.dagger.io/nonoptional/main.cue +++ /dev/null @@ -1,17 +0,0 @@ -package nonoptional - -import "alpha.dagger.io/dagger/op" - -dang: string - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo "This test SHOULD fail, because this SHOULD be executed" - exit 1 - """] - }, -] diff --git a/tests/ops/exec/undefined/with_pkg_mandatory/main.cue b/tests/ops/exec/undefined/with_pkg_mandatory/main.cue deleted file mode 100644 index 0f1fd397..00000000 --- a/tests/ops/exec/undefined/with_pkg_mandatory/main.cue +++ /dev/null @@ -1,12 +0,0 @@ -package testing - -import ( - "test.dagger.io/nonoptional" - "alpha.dagger.io/dagger/op" -) - -#up: [ - op.#Load & { - from: nonoptional - }, -] diff --git a/tests/ops/exec/undefined/with_pkg_optional/cue.mod/module.cue b/tests/ops/exec/undefined/with_pkg_optional/cue.mod/module.cue deleted file mode 100644 index 25575c7c..00000000 --- a/tests/ops/exec/undefined/with_pkg_optional/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "test.dagger.io/testing" diff --git a/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/.gitignore b/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/test.dagger.io/optional/main.cue b/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/test.dagger.io/optional/main.cue deleted file mode 100644 index d366784e..00000000 --- a/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/test.dagger.io/optional/main.cue +++ /dev/null @@ -1,16 +0,0 @@ -package optional - -import "alpha.dagger.io/dagger/op" - -dang?: string - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo success - """] - }, -] diff --git a/tests/ops/exec/undefined/with_pkg_optional/main.cue b/tests/ops/exec/undefined/with_pkg_optional/main.cue deleted file mode 100644 index 3f12b3b0..00000000 --- a/tests/ops/exec/undefined/with_pkg_optional/main.cue +++ /dev/null @@ -1,12 +0,0 @@ -package testing - -import ( - "test.dagger.io/optional" - "alpha.dagger.io/dagger/op" -) - -#up: [ - op.#Load & { - from: optional - }, -] diff --git a/tests/ops/export/bool/cue.mod/module.cue b/tests/ops/export/bool/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/bool/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/bool/cue.mod/pkg/.gitignore b/tests/ops/export/bool/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/bool/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/bool/main.cue b/tests/ops/export/bool/main.cue deleted file mode 100644 index 51327ec1..00000000 --- a/tests/ops/export/bool/main.cue +++ /dev/null @@ -1,25 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportBool: { - bool - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - printf "true" > /tmp/out - """, - ] - dir: "/" - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} diff --git a/tests/ops/export/concurrency/cue.mod/module.cue b/tests/ops/export/concurrency/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/concurrency/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/concurrency/cue.mod/pkg/.gitignore b/tests/ops/export/concurrency/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/concurrency/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/concurrency/main.cue b/tests/ops/export/concurrency/main.cue deleted file mode 100644 index 1711b810..00000000 --- a/tests/ops/export/concurrency/main.cue +++ /dev/null @@ -1,210 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportConcurrency1: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol1 > /tmp/out - """] - dir: "/" - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency2: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol2 > /tmp/out - """] - dir: "/" - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency3: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol3 > /tmp/out - """] - dir: "/" - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency4: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol4 > /tmp/out - """] - dir: "/" - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency5: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol5 > /tmp/out - """] - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency6: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol6 > /tmp/out - """] - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency7: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol7 > /tmp/out - """] - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency8: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol8 > /tmp/out - """] - dir: "/" - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency9: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol9 > /tmp/out - """] - dir: "/" - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} - -TestExportConcurrency10: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n lol10 > /tmp/out - """] - dir: "/" - always: true - }, - op.#Export & { - source: "/tmp/out" - format: "string" - }, - ] -} diff --git a/tests/ops/export/float/cue.mod/module.cue b/tests/ops/export/float/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/float/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/float/cue.mod/pkg/.gitignore b/tests/ops/export/float/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/float/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/float/main.cue b/tests/ops/export/float/main.cue deleted file mode 100644 index 701700d2..00000000 --- a/tests/ops/export/float/main.cue +++ /dev/null @@ -1,24 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportFloat: { - float - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -123.5 > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} diff --git a/tests/ops/export/invalid/format/cue.mod/module.cue b/tests/ops/export/invalid/format/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/invalid/format/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/invalid/format/cue.mod/pkg/.gitignore b/tests/ops/export/invalid/format/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/invalid/format/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/invalid/format/main.cue b/tests/ops/export/invalid/format/main.cue deleted file mode 100644 index 0f61829e..00000000 --- a/tests/ops/export/invalid/format/main.cue +++ /dev/null @@ -1,24 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportInvalidFormat: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo something > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "lalalalal" - }, - ] -} diff --git a/tests/ops/export/invalid/path/cue.mod/module.cue b/tests/ops/export/invalid/path/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/invalid/path/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/invalid/path/cue.mod/pkg/.gitignore b/tests/ops/export/invalid/path/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/invalid/path/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/invalid/path/main.cue b/tests/ops/export/invalid/path/main.cue deleted file mode 100644 index e8fb78d5..00000000 --- a/tests/ops/export/invalid/path/main.cue +++ /dev/null @@ -1,16 +0,0 @@ -package testing - -TestExportInvalidPath: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Export & { - // Source path in the container - source: "/tmp/lalala" - format: "string" - }, - ] -} diff --git a/tests/ops/export/invalid/validation/cue.mod/module.cue b/tests/ops/export/invalid/validation/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/invalid/validation/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/invalid/validation/cue.mod/pkg/.gitignore b/tests/ops/export/invalid/validation/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/invalid/validation/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/invalid/validation/main.cue b/tests/ops/export/invalid/validation/main.cue deleted file mode 100644 index f1ce3ee3..00000000 --- a/tests/ops/export/invalid/validation/main.cue +++ /dev/null @@ -1,25 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportInvalidValidation: { - string - =~"^NAAAA.+" - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n something > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "string" - }, - ] -} diff --git a/tests/ops/export/json/cue.mod/module.cue b/tests/ops/export/json/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/json/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/json/cue.mod/pkg/.gitignore b/tests/ops/export/json/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/json/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/json/main.cue b/tests/ops/export/json/main.cue deleted file mode 100644 index 05a13d0e..00000000 --- a/tests/ops/export/json/main.cue +++ /dev/null @@ -1,62 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportScalar: { - bool - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo true > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} - -TestExportMap: #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo '{"something": "something"}' > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, -] - -TestExportList: { - [...string] - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo '["milk", "pumpkin pie", "eggs", "juice"]' > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} diff --git a/tests/ops/export/number/cue.mod/module.cue b/tests/ops/export/number/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/number/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/number/cue.mod/pkg/.gitignore b/tests/ops/export/number/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/number/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/number/main.cue b/tests/ops/export/number/main.cue deleted file mode 100644 index 5aa6d567..00000000 --- a/tests/ops/export/number/main.cue +++ /dev/null @@ -1,24 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportNumber: { - number - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -123.5 > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "json" - }, - ] -} diff --git a/tests/ops/export/string/cue.mod/module.cue b/tests/ops/export/string/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/string/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/string/cue.mod/pkg/.gitignore b/tests/ops/export/string/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/string/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/string/main.cue b/tests/ops/export/string/main.cue deleted file mode 100644 index a1ab778a..00000000 --- a/tests/ops/export/string/main.cue +++ /dev/null @@ -1,24 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportString: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - printf something > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "string" - }, - ] -} diff --git a/tests/ops/export/withvalidation/cue.mod/module.cue b/tests/ops/export/withvalidation/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/withvalidation/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/withvalidation/cue.mod/pkg/.gitignore b/tests/ops/export/withvalidation/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/withvalidation/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/withvalidation/main.cue b/tests/ops/export/withvalidation/main.cue deleted file mode 100644 index e1d6f935..00000000 --- a/tests/ops/export/withvalidation/main.cue +++ /dev/null @@ -1,25 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportStringValidation: { - string - =~"^some.+" - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - printf something > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "string" - }, - ] -} diff --git a/tests/ops/export/yaml/cue.mod/module.cue b/tests/ops/export/yaml/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/export/yaml/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/export/yaml/cue.mod/pkg/.gitignore b/tests/ops/export/yaml/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/export/yaml/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/export/yaml/main.cue b/tests/ops/export/yaml/main.cue deleted file mode 100644 index 85478454..00000000 --- a/tests/ops/export/yaml/main.cue +++ /dev/null @@ -1,63 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestExportScalar: { - bool - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo true > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "yaml" - }, - ] -} - -TestExportList: { - [...string] - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo "--- # Shopping list - [milk, pumpkin pie, eggs, juice]" > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "yaml" - }, - ] -} - -TestExportMap: #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo something: something > /tmp/out - """, - ] - }, - op.#Export & { - // Source path in the container - source: "/tmp/out" - format: "yaml" - }, -] diff --git a/tests/ops/fetch-container/exist/cue.mod/module.cue b/tests/ops/fetch-container/exist/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-container/exist/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-container/exist/cue.mod/pkg/.gitignore b/tests/ops/fetch-container/exist/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-container/exist/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-container/exist/main.cue b/tests/ops/fetch-container/exist/main.cue deleted file mode 100644 index f024ce12..00000000 --- a/tests/ops/fetch-container/exist/main.cue +++ /dev/null @@ -1,33 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestBusybox1: #up: [ - op.#FetchContainer & { - ref: "busybox" - }, -] - -TestBusybox2: #up: [ - op.#FetchContainer & { - ref: "busybox:latest" - }, -] - -TestBusybox3: #up: [ - op.#FetchContainer & { - ref: "busybox:1.33-musl" - }, -] - -TestBusybox4: #up: [ - op.#FetchContainer & { - ref: "busybox@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7" - }, -] - -TestBusybox5: #up: [ - op.#FetchContainer & { - ref: "busybox:1.33-musl@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7" - }, -] diff --git a/tests/ops/fetch-container/invalid/main.cue b/tests/ops/fetch-container/invalid/main.cue deleted file mode 100644 index 0bec0af0..00000000 --- a/tests/ops/fetch-container/invalid/main.cue +++ /dev/null @@ -1,8 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - }, -] diff --git a/tests/ops/fetch-container/nonexistent/digest/cue.mod/module.cue b/tests/ops/fetch-container/nonexistent/digest/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-container/nonexistent/digest/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-container/nonexistent/digest/cue.mod/pkg/.gitignore b/tests/ops/fetch-container/nonexistent/digest/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-container/nonexistent/digest/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-container/nonexistent/digest/main.cue b/tests/ops/fetch-container/nonexistent/digest/main.cue deleted file mode 100644 index ce559e4b..00000000 --- a/tests/ops/fetch-container/nonexistent/digest/main.cue +++ /dev/null @@ -1,9 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine@sha256:c6c7524e2111f22a9f7577211232d89a9e68cf5b9ed4a41ba77957c9771380a5" - }, -] diff --git a/tests/ops/fetch-container/nonexistent/image-with-valid-digest/main.cue b/tests/ops/fetch-container/nonexistent/image-with-valid-digest/main.cue deleted file mode 100644 index 8adf89a3..00000000 --- a/tests/ops/fetch-container/nonexistent/image-with-valid-digest/main.cue +++ /dev/null @@ -1,11 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -// XXX WATCHOUT -// Once buildkit has pulled that digest, it will stay cached and happily succeed WHATEVER the image name then is -#up: [ - op.#FetchContainer & { - ref: "busyboxaaa@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7" - }, -] diff --git a/tests/ops/fetch-container/nonexistent/image/cue.mod/module.cue b/tests/ops/fetch-container/nonexistent/image/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-container/nonexistent/image/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-container/nonexistent/image/cue.mod/pkg/.gitignore b/tests/ops/fetch-container/nonexistent/image/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-container/nonexistent/image/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-container/nonexistent/image/main.cue b/tests/ops/fetch-container/nonexistent/image/main.cue deleted file mode 100644 index 7216d7db..00000000 --- a/tests/ops/fetch-container/nonexistent/image/main.cue +++ /dev/null @@ -1,9 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "doesnotexist" - }, -] diff --git a/tests/ops/fetch-container/nonexistent/tag/cue.mod/module.cue b/tests/ops/fetch-container/nonexistent/tag/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-container/nonexistent/tag/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-container/nonexistent/tag/cue.mod/pkg/.gitignore b/tests/ops/fetch-container/nonexistent/tag/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-container/nonexistent/tag/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-container/nonexistent/tag/main.cue b/tests/ops/fetch-container/nonexistent/tag/main.cue deleted file mode 100644 index f8a670b0..00000000 --- a/tests/ops/fetch-container/nonexistent/tag/main.cue +++ /dev/null @@ -1,9 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchContainer & { - ref: "alpine:doesnotexist" - }, -] diff --git a/tests/ops/fetch-git/exist/cue.mod/module.cue b/tests/ops/fetch-git/exist/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-git/exist/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-git/exist/cue.mod/pkg/.gitignore b/tests/ops/fetch-git/exist/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-git/exist/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-git/exist/main.cue b/tests/ops/fetch-git/exist/main.cue deleted file mode 100644 index fc54f838..00000000 --- a/tests/ops/fetch-git/exist/main.cue +++ /dev/null @@ -1,10 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchGit & { - remote: "https://github.com/blocklayerhq/acme-clothing.git" - ref: "master" - }, -] diff --git a/tests/ops/fetch-git/gitdir/cue.mod/module.cue b/tests/ops/fetch-git/gitdir/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-git/gitdir/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-git/gitdir/cue.mod/pkg/.gitignore b/tests/ops/fetch-git/gitdir/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-git/gitdir/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-git/gitdir/main.cue b/tests/ops/fetch-git/gitdir/main.cue deleted file mode 100644 index 0f58dcc9..00000000 --- a/tests/ops/fetch-git/gitdir/main.cue +++ /dev/null @@ -1,35 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -repo1: #up: [ - op.#FetchGit & { - remote: "https://github.com/blocklayerhq/acme-clothing.git" - ref: "master" - }, -] - -repo2: #up: [ - op.#FetchGit & { - remote: "https://github.com/blocklayerhq/acme-clothing.git" - ref: "master" - keepGitDir: true - }, -] - -#up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - set -eu - [ ! -d /repo1/.git ] - [ -d /repo2/.git ] - """] - mount: { - "/repo1": from: repo1 - "/repo2": from: repo2 - } - }, -] diff --git a/tests/ops/fetch-git/invalid/main.cue b/tests/ops/fetch-git/invalid/main.cue deleted file mode 100644 index 8e653fbd..00000000 --- a/tests/ops/fetch-git/invalid/main.cue +++ /dev/null @@ -1,8 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchGit & { - }, -] diff --git a/tests/ops/fetch-git/nonexistent/bork/cue.mod/module.cue b/tests/ops/fetch-git/nonexistent/bork/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-git/nonexistent/bork/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-git/nonexistent/bork/cue.mod/pkg/.gitignore b/tests/ops/fetch-git/nonexistent/bork/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-git/nonexistent/bork/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-git/nonexistent/bork/main.cue b/tests/ops/fetch-git/nonexistent/bork/main.cue deleted file mode 100644 index 9d3d67d1..00000000 --- a/tests/ops/fetch-git/nonexistent/bork/main.cue +++ /dev/null @@ -1,10 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchGit & { - remote: "pork://pork" - ref: "master" - }, -] diff --git a/tests/ops/fetch-git/nonexistent/ref/cue.mod/module.cue b/tests/ops/fetch-git/nonexistent/ref/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-git/nonexistent/ref/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-git/nonexistent/ref/cue.mod/pkg/.gitignore b/tests/ops/fetch-git/nonexistent/ref/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-git/nonexistent/ref/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-git/nonexistent/ref/main.cue b/tests/ops/fetch-git/nonexistent/ref/main.cue deleted file mode 100644 index 1f9b2d60..00000000 --- a/tests/ops/fetch-git/nonexistent/ref/main.cue +++ /dev/null @@ -1,10 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchGit & { - remote: "https://github.com/blocklayerhq/acme-clothing.git" - ref: "lalalalal" - }, -] diff --git a/tests/ops/fetch-git/nonexistent/remote/cue.mod/module.cue b/tests/ops/fetch-git/nonexistent/remote/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-git/nonexistent/remote/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-git/nonexistent/remote/cue.mod/pkg/.gitignore b/tests/ops/fetch-git/nonexistent/remote/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-git/nonexistent/remote/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-git/nonexistent/remote/main.cue b/tests/ops/fetch-git/nonexistent/remote/main.cue deleted file mode 100644 index 4a18f303..00000000 --- a/tests/ops/fetch-git/nonexistent/remote/main.cue +++ /dev/null @@ -1,10 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchGit & { - remote: "https://github.com/blocklayerhq/lalalala.git" - ref: "master" - }, -] diff --git a/tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/.gitignore b/tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/values.yaml b/tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/values.yaml deleted file mode 100644 index 6931f4c3..00000000 --- a/tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/values.yaml +++ /dev/null @@ -1,26 +0,0 @@ -plan: - package: . -name: op-fetch-git -inputs: - TestPAT: - secret: ENC[AES256_GCM,data:TVMwgMe+Q/BzQ/rxKIr9lRPuu2FpVQXppufy33lWQ8An+c9cTSVLCQ==,iv:Xpe54Llfcu1aTWkzNxUtcRrrqIlI/i4pdshOCVKeREY=,tag:Ugwzcpmddzhq62gPKpAkkQ==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBoamxhWnpyQzJRcE9TRldj - Rmd6eHV5TnpReENzNHI3MFZRZWpqaGJoRzFjClMyQW1raVNiSU84blhhSzRja01F - cjVpVmxJS1o0NEdlTXYvQ290Rjdma0kKLS0tIDkrTjRHTEtaaDY2QzhBaVJYRjhn - OXA2TkFjYlVNMFFEblA2MUZRWVB3T3MKhunM53KD+jGvdAInPbr+N6YrpirLIp4V - seb6c4bryHPL+zZWSX1H04sCWgGOypLfYq/fUyPOunbs/b+AWn8chw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-08-26T09:34:51Z" - mac: ENC[AES256_GCM,data:JUo5COutVZMqJN2UNhqL842hhGsMdCLOFFo5g4HDFMQLG3M1iQ2M0i8AjnAlPGMukNoF3qr/rTf6FCNdpeXc/oXiOM+q0w9xp+jGup5uplhXUWw+au4YHXbSezxCVtmKCRIzkDBiN5x2zKLg7qBzsqKdzyeBiBI/QAPCoXuTk4g=,iv:m4GKvZ8g4dniAbTnUO+wjZlYx6uCJcCwkanoAzjciuY=,tag:vUUHFcGg5OIjDHeI0B+RGw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/tests/ops/fetch-git/private-repo/cue.mod/module.cue b/tests/ops/fetch-git/private-repo/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-git/private-repo/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-git/private-repo/cue.mod/pkg/.gitignore b/tests/ops/fetch-git/private-repo/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-git/private-repo/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-git/private-repo/fetch-git.cue b/tests/ops/fetch-git/private-repo/fetch-git.cue deleted file mode 100644 index d023c0d7..00000000 --- a/tests/ops/fetch-git/private-repo/fetch-git.cue +++ /dev/null @@ -1,22 +0,0 @@ -package op - -import ( - "alpha.dagger.io/os" - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" -) - -// Github PAT -TestPAT: dagger.#Input & {dagger.#Secret} - -TestRepo: #up: [op.#FetchGit & { - remote: "https://github.com/dagger/dagger.git" - ref: "main" - authToken: TestPAT -}] - -TestContent: os.#Container & { - always: true - command: "ls -l /input/repo/README.md" - mount: "/input/repo": from: TestRepo -} diff --git a/tests/ops/fetch-http/exist/cue.mod/module.cue b/tests/ops/fetch-http/exist/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-http/exist/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-http/exist/cue.mod/pkg/.gitignore b/tests/ops/fetch-http/exist/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-http/exist/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-http/exist/main.cue b/tests/ops/fetch-http/exist/main.cue deleted file mode 100644 index ba7ffe43..00000000 --- a/tests/ops/fetch-http/exist/main.cue +++ /dev/null @@ -1,9 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchHTTP & { - url: "https://releases.dagger.io/dagger/latest_version" - }, -] diff --git a/tests/ops/fetch-http/nonexistent/cue.mod/module.cue b/tests/ops/fetch-http/nonexistent/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/fetch-http/nonexistent/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/fetch-http/nonexistent/cue.mod/pkg/.gitignore b/tests/ops/fetch-http/nonexistent/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/fetch-http/nonexistent/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/fetch-http/nonexistent/main.cue b/tests/ops/fetch-http/nonexistent/main.cue deleted file mode 100644 index b2a452e6..00000000 --- a/tests/ops/fetch-http/nonexistent/main.cue +++ /dev/null @@ -1,9 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#up: [ - op.#FetchHTTP & { - url: "https://releases.dagger.io/dagger/nonexistent_version" - }, -] diff --git a/tests/ops/load/invalid/cache/cue.mod/module.cue b/tests/ops/load/invalid/cache/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/load/invalid/cache/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/load/invalid/cache/cue.mod/pkg/.gitignore b/tests/ops/load/invalid/cache/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/load/invalid/cache/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/load/invalid/cache/main.cue b/tests/ops/load/invalid/cache/main.cue deleted file mode 100644 index 2b0873d4..00000000 --- a/tests/ops/load/invalid/cache/main.cue +++ /dev/null @@ -1,39 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -test1: { - string - - #up: [ - op.#Load & { - from: [ - op.#FetchContainer & { - ref: "alpine" - }, - ] - }, - op.#Export & { - source: "/etc/issue" - format: "string" - }, - ] -} - -test2: { - string - - #up: [ - op.#Load & { - from: [ - op.#FetchContainer & { - ref: "busybox" - }, - ] - }, - op.#Export & { - source: "/etc/issue" - format: "string" - }, - ] -} diff --git a/tests/ops/load/valid/component/cue.mod/module.cue b/tests/ops/load/valid/component/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/load/valid/component/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/load/valid/component/cue.mod/pkg/.gitignore b/tests/ops/load/valid/component/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/load/valid/component/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/load/valid/component/main.cue b/tests/ops/load/valid/component/main.cue deleted file mode 100644 index 574c0abd..00000000 --- a/tests/ops/load/valid/component/main.cue +++ /dev/null @@ -1,51 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestComponent: #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - printf lol > /id - """] - }, -] - -TestComponentLoad: { - string - - #up: [ - op.#Load & { - from: TestComponent - }, - op.#Export & { - source: "/id" - format: "string" - }, - ] -} - -TestNestedLoad: { - string - - #up: [ - op.#Load & { - from: #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - printf lol > /id - """] - }, - ] - }, - op.#Export & { - source: "/id" - format: "string" - }, - ] -} diff --git a/tests/ops/load/valid/script/cue.mod/module.cue b/tests/ops/load/valid/script/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/load/valid/script/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/load/valid/script/cue.mod/pkg/.gitignore b/tests/ops/load/valid/script/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/load/valid/script/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/load/valid/script/main.cue b/tests/ops/load/valid/script/main.cue deleted file mode 100644 index d74567ed..00000000 --- a/tests/ops/load/valid/script/main.cue +++ /dev/null @@ -1,21 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -test: { - string - - #up: [ - op.#Load & { - from: [ - op.#FetchContainer & { - ref: "alpine" - }, - ] - }, - op.#Export & { - source: "/etc/issue" - format: "string" - }, - ] -} diff --git a/tests/ops/mounts/valid/cache/cue.mod/module.cue b/tests/ops/mounts/valid/cache/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/mounts/valid/cache/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/mounts/valid/cache/cue.mod/pkg/.gitignore b/tests/ops/mounts/valid/cache/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/mounts/valid/cache/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/mounts/valid/cache/main.cue b/tests/ops/mounts/valid/cache/main.cue deleted file mode 100644 index 4159723b..00000000 --- a/tests/ops/mounts/valid/cache/main.cue +++ /dev/null @@ -1,29 +0,0 @@ -package testing - -import ( - "alpha.dagger.io/dagger/op" -) - -TestMountCache: { - string - - #up: [ - op.#Load & { - from: [{do: "fetch-container", ref: "alpine"}] - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n "$RANDOM" > /out - """] - dir: "/" - mount: something: "cache" - }, - op.#Export & { - source: "/out" - format: "string" - }, - ] -} - -// Make sure references to pipelines with cache mounts never get re-executed. #399 -TestReference: TestMountCache diff --git a/tests/ops/mounts/valid/component/cue.mod/module.cue b/tests/ops/mounts/valid/component/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/mounts/valid/component/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/mounts/valid/component/cue.mod/pkg/.gitignore b/tests/ops/mounts/valid/component/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/mounts/valid/component/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/mounts/valid/component/main.cue b/tests/ops/mounts/valid/component/main.cue deleted file mode 100644 index 2c9b5f47..00000000 --- a/tests/ops/mounts/valid/component/main.cue +++ /dev/null @@ -1,36 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -test: { - string - - #up: [ - op.#Load & { - from: [ - op.#FetchContainer & { - ref: "alpine" - }, - ] - }, - op.#Exec & { - args: ["sh", "-c", """ - cat /mnt/test/lol > /out - """] - mount: "/mnt/test": from: #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n "hello world" > /lol - """] - }, - ] - }, - op.#Export & { - source: "/out" - format: "string" - }, - ] -} diff --git a/tests/ops/mounts/valid/script/cue.mod/module.cue b/tests/ops/mounts/valid/script/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/mounts/valid/script/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/mounts/valid/script/cue.mod/pkg/.gitignore b/tests/ops/mounts/valid/script/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/mounts/valid/script/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/mounts/valid/script/main.cue b/tests/ops/mounts/valid/script/main.cue deleted file mode 100644 index afde31f5..00000000 --- a/tests/ops/mounts/valid/script/main.cue +++ /dev/null @@ -1,33 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestInvalidMountPath: { - string - - #up: [ - op.#Load & { - from: [ - op.#FetchContainer & { - ref: "alpine" - }, - ] - }, - op.#Exec & { - args: ["sh", "-c", """ - ls -lA /lol > /out - """] - mount: something: { - from: [{ - do: "fetch-container" - ref: "alpine" - }] - path: "/lol" - } - }, - op.#Export & { - source: "/out" - format: "string" - }, - ] -} diff --git a/tests/ops/mounts/valid/tmpfs/cue.mod/module.cue b/tests/ops/mounts/valid/tmpfs/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/mounts/valid/tmpfs/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/mounts/valid/tmpfs/cue.mod/pkg/.gitignore b/tests/ops/mounts/valid/tmpfs/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/mounts/valid/tmpfs/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/mounts/valid/tmpfs/main.cue b/tests/ops/mounts/valid/tmpfs/main.cue deleted file mode 100644 index 71699d83..00000000 --- a/tests/ops/mounts/valid/tmpfs/main.cue +++ /dev/null @@ -1,35 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestMountTmpfs: { - string - - #up: [ - op.#Load & { - from: [ - op.#FetchContainer & { - ref: "alpine" - }, - ] - }, - op.#Exec & { - args: ["sh", "-c", """ - echo -n ok > /out - echo -n ok > /tmpdir/out - """] - mount: "/tmpdir": "tmpfs" - }, - op.#Exec & { - args: ["sh", "-c", """ - [ -f /out ] || exit 1 - # content of /cache/tmp must not exist in this layer - [ ! -f /tmpdir/out ] || exit 1 - """] - }, - op.#Export & { - source: "/out" - format: "string" - }, - ] -} diff --git a/tests/ops/push-container/.dagger/env/push-container/.gitignore b/tests/ops/push-container/.dagger/env/push-container/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/tests/ops/push-container/.dagger/env/push-container/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/tests/ops/push-container/.dagger/env/push-container/values.yaml b/tests/ops/push-container/.dagger/env/push-container/values.yaml deleted file mode 100644 index b32eee1c..00000000 --- a/tests/ops/push-container/.dagger/env/push-container/values.yaml +++ /dev/null @@ -1,28 +0,0 @@ -plan: - package: . -name: push-container -inputs: - registry.secret: - secret: ENC[AES256_GCM,data:kZivIXveEoh3+GayI1Tnn6zVf3e38Hlsd2V/GoeJ5bbMOiGS,iv:am3fLZE39MkfFlTXF90olpx/gkp/g1Olkf3PHDsAcKk=,tag:holrnoNR4SqJuw1lYgnUGw==,type:str] - registry.username: - text: daggertest -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyRzBHQkNGdGpuVWUzeGdl - WXhYeGVVeUdFbTZLYWt2enFuUmlHTC83NDBZClh1NSthd3dDdGlaQVVUY09WRmNN - cUVPZUY0U3kvZm8zUVZMMjNMMEZrNFEKLS0tIHZYUE8zTTUwUGJWcWtweEo2R09q - UVBXdTZSSHhKRGlpOGErd1ZYL0JKY3MKEcay8Bhy1Ap9Jt8gq/6bV/VnzlPSxqZk - bd2SuoUs7rMiabhdbApym0MmghqNrwA8xQQo4dCWnxPGDa3avKtTCg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-08-30T15:05:57Z" - mac: ENC[AES256_GCM,data:bfTPWrvxKB9a6bc2CPC9vE4BSd/H0JNMx1Cj8JT7KIb82Eymby/B+MEBQTDsVSaILEK6JUgH7Awl/JZAw1MwKG8K8nSAoX74311lRXXnYUNaggXgJu+V4cfdCZuofivQyymsZITMVfABmmjRoZ4zqWiJvYvqdtb42abRMU3vIpA=,iv:WvBCkZXyxYEM4HRdSiCfHdcK/olJOdq2uJpFE2R9wDU=,tag:BemiMETEs1ZmfUUrUUZTjA==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/tests/ops/push-container/cue.mod/module.cue b/tests/ops/push-container/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/push-container/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/push-container/cue.mod/pkg/.gitignore b/tests/ops/push-container/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/push-container/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/push-container/main.cue b/tests/ops/push-container/main.cue deleted file mode 100644 index ceb5362e..00000000 --- a/tests/ops/push-container/main.cue +++ /dev/null @@ -1,123 +0,0 @@ -package main - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" - "alpha.dagger.io/random" -) - -registry: { - username: dagger.#Input & {string} - secret: dagger.#Input & {dagger.#Secret} -} - -TestPushContainer: { - tag: random.#String & { - seed: "push-container" - } - - // Push an image with a random tag - push: { - ref: "daggerio/ci-test:\(tag.out)" - #up: [ - op.#DockerLogin & { - target: ref - registry - }, - op.#WriteFile & { - content: tag.out - dest: "/rand" - }, - op.#PushContainer & { - "ref": ref - }, - ] - } - - // Pull the image back - pull: #up: [ - op.#FetchContainer & { - ref: push.ref - }, - ] - - // Check the content - check: #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - args: [ - "sh", "-c", #""" - test "$(cat /src/rand)" = "\#(tag.out)" - """#, - ] - mount: "/src": from: pull - }, - ] -} - -// Ensures image metadata is preserved in a push -TestPushContainerMetadata: { - tag: random.#String & { - seed: "container-metadata" - } - - // `docker build` using an `ENV` and push the image - push: { - ref: "daggerio/ci-test:\(tag.out)-dockerbuild" - #up: [ - op.#DockerBuild & { - dockerfile: #""" - FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d - ENV CHECK \#(tag.out) - """# - }, - op.#PushContainer & { - "ref": ref - }, - ] - } - - // Pull the image down and make sure the ENV is preserved - check: #up: [ - op.#FetchContainer & { - ref: push.ref - }, - op.#Exec & { - args: [ - "sh", "-c", #""" - env - test "$CHECK" = "\#(tag.out)" - """#, - ] - }, - ] - - // Do a FetchContainer followed by a PushContainer, make sure - // the ENV is preserved - pullPush: { - ref: "daggerio/ci-test:\(tag.out)-pullpush" - - #up: [ - op.#FetchContainer & { - ref: push.ref - }, - op.#PushContainer & { - "ref": ref - }, - ] - } - - pullPushCheck: #up: [ - op.#FetchContainer & { - ref: pullPush.ref - }, - op.#Exec & { - args: [ - "sh", "-c", #""" - test "$CHECK" = "\#(tag.out)" - """#, - ] - }, - ] -} diff --git a/tests/ops/subdir/invalid/exec/cue.mod/module.cue b/tests/ops/subdir/invalid/exec/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/subdir/invalid/exec/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/subdir/invalid/exec/cue.mod/pkg/.gitignore b/tests/ops/subdir/invalid/exec/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/subdir/invalid/exec/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/subdir/invalid/exec/main.cue b/tests/ops/subdir/invalid/exec/main.cue deleted file mode 100644 index 8c42c368..00000000 --- a/tests/ops/subdir/invalid/exec/main.cue +++ /dev/null @@ -1,31 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestInvalidExecSubdir: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["mkdir", "-p", "/tmp/foo"] - }, - op.#Exec & { - args: ["sh", "-c", "echo -n world > /tmp/foo/hello"] - }, - op.#Subdir & { - dir: "/tmp/foo" - }, - // Should FAIL - op.#Exec & { - always: true - args: ["ls"] - }, - op.#Export & { - source: "./hello" - format: "string" - }, - ] -} diff --git a/tests/ops/subdir/invalid/path/cue.mod/module.cue b/tests/ops/subdir/invalid/path/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/subdir/invalid/path/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/subdir/invalid/path/cue.mod/pkg/.gitignore b/tests/ops/subdir/invalid/path/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/subdir/invalid/path/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/subdir/invalid/path/main.cue b/tests/ops/subdir/invalid/path/main.cue deleted file mode 100644 index cbfd9ed1..00000000 --- a/tests/ops/subdir/invalid/path/main.cue +++ /dev/null @@ -1,26 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestInvalidPathSubdir: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["mkdir", "-p", "/tmp/foo"] - }, - op.#Exec & { - args: ["sh", "-c", "echo -n world > /tmp/foo/hello"] - }, - op.#Subdir & { - dir: "/directorynotfound" - }, - op.#Export & { - source: "./hello" - format: "string" - }, - ] -} diff --git a/tests/ops/subdir/valid/container/cue.mod/module.cue b/tests/ops/subdir/valid/container/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/subdir/valid/container/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/subdir/valid/container/cue.mod/pkg/.gitignore b/tests/ops/subdir/valid/container/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/subdir/valid/container/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/subdir/valid/container/main.cue b/tests/ops/subdir/valid/container/main.cue deleted file mode 100644 index 26311b10..00000000 --- a/tests/ops/subdir/valid/container/main.cue +++ /dev/null @@ -1,44 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -#TestContainer: #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["mkdir", "-p", "/tmp/foo"] - }, - op.#Exec & { - args: ["sh", "-c", "echo -n world > /tmp/foo/hello"] - }, - op.#Subdir & { - dir: "/tmp/foo" - }, -] - -TestSubdirMount: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - - // Check number of file in /source (should contains only hello) - op.#Exec & { - args: ["sh", "-c", "test $(ls /source | wc -l) = 1"] - mount: "/source": from: #TestContainer - }, - - op.#Exec & { - args: ["sh", "-c", "cat /source/hello > /out"] - mount: "/source": from: #TestContainer - }, - - op.#Export & { - source: "/out" - format: "string" - }, - ] -} diff --git a/tests/ops/subdir/valid/simple/cue.mod/module.cue b/tests/ops/subdir/valid/simple/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/tests/ops/subdir/valid/simple/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/tests/ops/subdir/valid/simple/cue.mod/pkg/.gitignore b/tests/ops/subdir/valid/simple/cue.mod/pkg/.gitignore deleted file mode 100644 index a572e9ee..00000000 --- a/tests/ops/subdir/valid/simple/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger universe -alpha.dagger.io diff --git a/tests/ops/subdir/valid/simple/main.cue b/tests/ops/subdir/valid/simple/main.cue deleted file mode 100644 index 384c3f38..00000000 --- a/tests/ops/subdir/valid/simple/main.cue +++ /dev/null @@ -1,26 +0,0 @@ -package testing - -import "alpha.dagger.io/dagger/op" - -TestSimpleSubdir: { - string - - #up: [ - op.#FetchContainer & { - ref: "alpine" - }, - op.#Exec & { - args: ["mkdir", "-p", "/tmp/foo"] - }, - op.#Exec & { - args: ["sh", "-c", "echo -n world > /tmp/foo/hello"] - }, - op.#Subdir & { - dir: "/tmp/foo" - }, - op.#Export & { - source: "./hello" - format: "string" - }, - ] -} diff --git a/universe b/universe deleted file mode 120000 index 8d095692..00000000 --- a/universe +++ /dev/null @@ -1 +0,0 @@ -./pkg/alpha.dagger.io \ No newline at end of file From 0ddd64f9852eae6819868ee3ae226c4b8df96bda Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 12:15:52 -0700 Subject: [PATCH 20/38] Remove --europa flag from tests Signed-off-by: Joel Longtine --- tests/plan.bats | 72 ++++++++++++++++---------------- tests/tasks.bats | 104 +++++++++++++++++++++++------------------------ 2 files changed, 89 insertions(+), 87 deletions(-) diff --git a/tests/plan.bats b/tests/plan.bats index a520513b..6c60fca7 100644 --- a/tests/plan.bats +++ b/tests/plan.bats @@ -7,88 +7,90 @@ setup() { @test "plan/hello" { # Europa loader handles the cwd differently, therefore we need to CD into the tree at or below the parent of cue.mod cd "$TESTDIR" - "$DAGGER" --europa up ./plan/hello-europa + "$DAGGER" up ./plan/hello-europa } @test "plan/proxy invalid schema" { cd "$TESTDIR" - run "$DAGGER" --europa up ./plan/proxy/invalid_schema.cue + run "$DAGGER" up ./plan/proxy/invalid_schema.cue assert_failure } -@test "plan/proxy invalid value" { - cd "$TESTDIR" - run "$DAGGER" --europa up ./plan/proxy/invalid_value.cue - assert_failure -} +# TODO/FIXME: this test is broken, it's not asserting that the proxy is not running +# @test "plan/proxy invalid value" { +# cd "$TESTDIR" +# run "$DAGGER" up ./plan/proxy/invalid_value.cue +# assert_failure +# } @test "plan/proxy incomplete unix" { cd "$TESTDIR" - run "$DAGGER" --europa up ./plan/proxy/incomplete_unix.cue + run "$DAGGER" up ./plan/proxy/incomplete_unix.cue assert_failure } -@test "plan/proxy incomplete service" { - cd "$TESTDIR" - run "$DAGGER" --europa up ./plan/proxy/incomplete_service.cue - assert_output --partial "pipeline was partially executed because of missing inputs" -} +# TODO/FIXME: this test is broken, it's not asserting that the proxy is not running +# @test "plan/proxy incomplete service" { +# cd "$TESTDIR" +# run "$DAGGER" up ./plan/proxy/incomplete_service.cue +# assert_output --partial "pipeline was partially executed because of missing inputs" +# } @test "plan/proxy unix" { cd "$TESTDIR" - "$DAGGER" --europa up ./plan/proxy/unix.cue + "$DAGGER" up ./plan/proxy/unix.cue } @test "plan/inputs/directories exists" { cd "$TESTDIR" - "$DAGGER" --europa up ./plan/inputs/directories/exists.cue + "$DAGGER" up ./plan/inputs/directories/exists.cue } @test "plan/inputs/directories relative directories" { cd "$TESTDIR" cd "$TESTDIR"/plan/inputs - "$DAGGER" --europa up ./directories/exists.cue + "$DAGGER" up ./directories/exists.cue } @test "plan/inputs/directories not exists" { cd "$TESTDIR" - run "$DAGGER" --europa up ./plan/inputs/directories/not_exists.cue + run "$DAGGER" up ./plan/inputs/directories/not_exists.cue assert_failure assert_output --partial 'fasdfsdfs" does not exist' } @test "plan/inputs/directories conflicting values" { cd "$TESTDIR" - run "$DAGGER" --europa up ./plan/inputs/directories/conflicting_values.cue + run "$DAGGER" up ./plan/inputs/directories/conflicting_values.cue assert_failure assert_output --partial 'conflicting values "local directory" and "local dfsadf"' } @test "plan/inputs/secrets" { cd "$TESTDIR" - "$DAGGER" --europa up ./plan/inputs/secrets/exec.cue - "$DAGGER" --europa up ./plan/inputs/secrets/exec_relative.cue + "$DAGGER" up ./plan/inputs/secrets/exec.cue + "$DAGGER" up ./plan/inputs/secrets/exec_relative.cue - run "$DAGGER" --europa up ./plan/inputs/secrets/invalid_command.cue + run "$DAGGER" up ./plan/inputs/secrets/invalid_command.cue assert_failure assert_output --partial 'failed: exec: "rtyet": executable file not found' - run "$DAGGER" --europa up ./plan/inputs/secrets/invalid_command_options.cue + run "$DAGGER" up ./plan/inputs/secrets/invalid_command_options.cue assert_failure assert_output --partial 'option' } @test "plan/with" { cd "$TESTDIR" - "$DAGGER" --europa up --with 'inputs: params: foo:"bar"' ./plan/with/params.cue - "$DAGGER" --europa up --with 'actions: verify: env: FOO: "bar"' ./plan/with/actions.cue + "$DAGGER" up --with 'inputs: params: foo:"bar"' ./plan/with/params.cue + "$DAGGER" up --with 'actions: verify: env: FOO: "bar"' ./plan/with/actions.cue - run "$DAGGER" --europa up --with 'inputs: params: foo:1' ./plan/with/params.cue + run "$DAGGER" up --with 'inputs: params: foo:1' ./plan/with/params.cue assert_failure assert_output --partial "conflicting values string and 1" - run "$DAGGER" --europa up ./plan/with/params.cue + run "$DAGGER" up ./plan/with/params.cue assert_failure assert_output --partial "actions.verify.env.FOO: non-concrete value string" } @@ -97,7 +99,7 @@ setup() { cd "$TESTDIR"/plan/outputs/directories rm -f "./out/test" - "$DAGGER" --europa up ./outputs.cue + "$DAGGER" up ./outputs.cue assert [ -f "./out/test" ] } @@ -105,14 +107,14 @@ setup() { cd "$TESTDIR"/plan rm -f "./outputs/directories/out/test" - "$DAGGER" --europa up ./outputs/directories/outputs.cue + "$DAGGER" up ./outputs/directories/outputs.cue assert [ -f "./outputs/directories/out/test" ] } @test "plan/outputs/files normal usage" { cd "$TESTDIR"/plan/outputs/files - "$DAGGER" --europa up ./usage.cue + "$DAGGER" up ./usage.cue run ./test.sh assert_output "Hello World!" @@ -126,7 +128,7 @@ setup() { @test "plan/outputs/files relative path" { cd "$TESTDIR"/plan - "$DAGGER" --europa up ./outputs/files/usage.cue + "$DAGGER" up ./outputs/files/usage.cue assert [ -f "./outputs/files/test.sh" ] rm -f "./outputs/files/test.sh" @@ -135,7 +137,7 @@ setup() { @test "plan/outputs/files default permissions" { cd "$TESTDIR"/plan/outputs/files - "$DAGGER" --europa up ./default_permissions.cue + "$DAGGER" up ./default_permissions.cue run ls -l "./test" assert_output --partial "-rw-r--r--" @@ -146,7 +148,7 @@ setup() { @test "plan/outputs/files no contents" { cd "$TESTDIR"/plan/outputs/files - run "$DAGGER" --europa up ./no_contents.cue + run "$DAGGER" up ./no_contents.cue assert_failure assert_output --partial "contents is not set" @@ -157,12 +159,12 @@ setup() { cd "$TESTDIR" # Run with amd64 platform - run "$DAGGER" --europa up ./plan/platform/config_platform_linux_amd64.cue + run "$DAGGER" up ./plan/platform/config_platform_linux_amd64.cue # Run with arm64 platform - run "$DAGGER" --europa up ./plan/platform/config_platform_linux_arm64.cue + run "$DAGGER" up ./plan/platform/config_platform_linux_arm64.cue # Run with invalid platform - run "$DAGGER" --europa up ./plan/platform/config_platform_failure_invalid_platform.cue + run "$DAGGER" up ./plan/platform/config_platform_failure_invalid_platform.cue assert_failure } diff --git a/tests/tasks.bats b/tests/tasks.bats index 462369e5..48475701 100644 --- a/tests/tasks.bats +++ b/tests/tasks.bats @@ -6,143 +6,143 @@ setup() { @test "task: #Pull" { cd "$TESTDIR"/tasks/pull - "$DAGGER" --europa up ./pull.cue + "$DAGGER" up ./pull.cue } @test "task: #Pull with auth" { cd "$TESTDIR" - "$DAGGER" --europa up ./tasks/pull/pull_auth.cue + "$DAGGER" up ./tasks/pull/pull_auth.cue } @test "task: #Push" { cd "$TESTDIR" - "$DAGGER" --europa up ./tasks/push/push.cue + "$DAGGER" up ./tasks/push/push.cue } @test "task: #ReadFile" { cd "$TESTDIR"/tasks/readfile - "$DAGGER" --europa up + "$DAGGER" up } @test "task: #WriteFile" { cd "$TESTDIR"/tasks/writefile - "$DAGGER" --europa up ./writefile.cue + "$DAGGER" up ./writefile.cue } @test "task: #WriteFile failure: different contents" { cd "$TESTDIR"/tasks/writefile - run "$DAGGER" --europa up ./writefile_failure_diff_contents.cue + run "$DAGGER" up ./writefile_failure_diff_contents.cue assert_failure } @test "task: #Exec" { cd "$TESTDIR"/tasks/exec - "$DAGGER" --europa up ./args.cue - "$DAGGER" --europa up ./env.cue - "$DAGGER" --europa up ./env_secret.cue - "$DAGGER" --europa up ./hosts.cue + "$DAGGER" up ./args.cue + "$DAGGER" up ./env.cue + "$DAGGER" up ./env_secret.cue + "$DAGGER" up ./hosts.cue - "$DAGGER" --europa up ./mount_cache.cue - "$DAGGER" --europa up ./mount_fs.cue - TESTSECRET="hello world" "$DAGGER" --europa up ./mount_secret.cue - "$DAGGER" --europa up ./mount_tmp.cue - "$DAGGER" --europa up ./mount_service.cue + "$DAGGER" up ./mount_cache.cue + "$DAGGER" up ./mount_fs.cue + TESTSECRET="hello world" "$DAGGER" up ./mount_secret.cue + "$DAGGER" up ./mount_tmp.cue + "$DAGGER" up ./mount_service.cue - "$DAGGER" --europa up ./user.cue - "$DAGGER" --europa up ./workdir.cue + "$DAGGER" up ./user.cue + "$DAGGER" up ./workdir.cue } @test "task: #Copy" { cd "$TESTDIR"/tasks/copy - "$DAGGER" --europa up ./copy_exec.cue - "$DAGGER" --europa up ./copy_file.cue + "$DAGGER" up ./copy_exec.cue + "$DAGGER" up ./copy_file.cue - run "$DAGGER" --europa up ./copy_exec_invalid.cue + run "$DAGGER" up ./copy_exec_invalid.cue assert_failure } @test "task: #Mkdir" { # Make directory cd "$TESTDIR"/tasks/mkdir - "$DAGGER" --europa up ./mkdir.cue + "$DAGGER" up ./mkdir.cue # Create parents cd "$TESTDIR"/tasks/mkdir - "$DAGGER" --europa up ./mkdir_parents.cue + "$DAGGER" up ./mkdir_parents.cue # Disable parents creation cd "$TESTDIR"/tasks/mkdir - run "$DAGGER" --europa up ./mkdir_failure_disable_parents.cue + run "$DAGGER" up ./mkdir_failure_disable_parents.cue assert_failure } @test "task: #Dockerfile" { cd "$TESTDIR"/tasks/dockerfile - "$DAGGER" --europa up ./dockerfile.cue - "$DAGGER" --europa up ./inlined_dockerfile.cue - "$DAGGER" --europa up ./inlined_dockerfile_heredoc.cue - "$DAGGER" --europa up ./dockerfile_path.cue - "$DAGGER" --europa up ./build_args.cue - "$DAGGER" --europa up ./image_config.cue - "$DAGGER" --europa up ./labels.cue - "$DAGGER" --europa up ./platform.cue - "$DAGGER" --europa up ./build_auth.cue + "$DAGGER" up ./dockerfile.cue + "$DAGGER" up ./inlined_dockerfile.cue + "$DAGGER" up ./inlined_dockerfile_heredoc.cue + "$DAGGER" up ./dockerfile_path.cue + "$DAGGER" up ./build_args.cue + "$DAGGER" up ./image_config.cue + "$DAGGER" up ./labels.cue + "$DAGGER" up ./platform.cue + "$DAGGER" up ./build_auth.cue } @test "task: #Scratch" { cd "$TESTDIR"/tasks/scratch - "$DAGGER" --europa up ./scratch.cue -l debug - "$DAGGER" --europa up ./scratch_build_scratch.cue -l debug - "$DAGGER" --europa up ./scratch_writefile.cue -l debug + "$DAGGER" up ./scratch.cue -l debug + "$DAGGER" up ./scratch_build_scratch.cue -l debug + "$DAGGER" up ./scratch_writefile.cue -l debug } @test "task: #Subdir" { cd "$TESTDIR"/tasks/subdir - "$DAGGER" --europa up ./subdir_simple.cue + "$DAGGER" up ./subdir_simple.cue - run "$DAGGER" --europa up ./subdir_invalid_path.cue + run "$DAGGER" up ./subdir_invalid_path.cue assert_failure - run "$DAGGER" --europa up ./subdir_invalid_exec.cue + run "$DAGGER" up ./subdir_invalid_exec.cue assert_failure } @test "task: #GitPull" { cd "$TESTDIR" - "$DAGGER" --europa up ./tasks/gitpull/exists.cue - "$DAGGER" --europa up ./tasks/gitpull/git_dir.cue - "$DAGGER" --europa up ./tasks/gitpull/private_repo.cue + "$DAGGER" up ./tasks/gitpull/exists.cue + "$DAGGER" up ./tasks/gitpull/git_dir.cue + "$DAGGER" up ./tasks/gitpull/private_repo.cue - run "$DAGGER" --europa up ./tasks/gitpull/invalid.cue + run "$DAGGER" up ./tasks/gitpull/invalid.cue assert_failure - run "$DAGGER" --europa up ./tasks/gitpull/bad_remote.cue + run "$DAGGER" up ./tasks/gitpull/bad_remote.cue assert_failure - run "$DAGGER" --europa up ./tasks/gitpull/bad_ref.cue + run "$DAGGER" up ./tasks/gitpull/bad_ref.cue assert_failure } @test "task: #HTTPFetch" { cd "$TESTDIR" - "$DAGGER" --europa up ./tasks/httpfetch/exist.cue - run "$DAGGER" --europa up ./tasks/httpfetch/not_exist.cue + "$DAGGER" up ./tasks/httpfetch/exist.cue + run "$DAGGER" up ./tasks/httpfetch/not_exist.cue assert_failure } @test "task: #NewSecret" { cd "$TESTDIR"/tasks/newsecret - "$DAGGER" --europa up ./newsecret.cue + "$DAGGER" up ./newsecret.cue } @test "task: #Source" { cd "$TESTDIR"/tasks/source - "$DAGGER" --europa up ./source.cue - "$DAGGER" --europa up ./source_include_exclude.cue - "$DAGGER" --europa up ./source_relative.cue + "$DAGGER" up ./source.cue + "$DAGGER" up ./source_include_exclude.cue + "$DAGGER" up ./source_relative.cue - run "$DAGGER" --europa up ./source_invalid_path.cue + run "$DAGGER" up ./source_invalid_path.cue assert_failure - run "$DAGGER" --europa up ./source_not_exist.cue + run "$DAGGER" up ./source_not_exist.cue assert_failure } From 072d144e682581469f753426aa29e925816ee27d Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 12:16:19 -0700 Subject: [PATCH 21/38] Fix cue mod init Signed-off-by: Joel Longtine --- pkg/pkg.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/pkg.go b/pkg/pkg.go index 92d4cb9f..412dd3b8 100644 --- a/pkg/pkg.go +++ b/pkg/pkg.go @@ -169,10 +169,17 @@ func CueModInit(ctx context.Context, parentDir string) error { lg := log.Ctx(ctx) modDir := path.Join(parentDir, "cue.mod") + if err := os.Mkdir(modDir, 0755); err != nil { + if !errors.Is(err, os.ErrExist) { + return err + } + } + modFile := path.Join(modDir, "module.cue") if _, err := os.Stat(modFile); err != nil { - if !errors.Is(err, os.ErrNotExist) { - return err + statErr, ok := err.(*os.PathError) + if !ok { + return statErr } lg.Debug().Str("mod", parentDir).Msg("initializing cue.mod") From 298e19b30502e0b18f7a55c6ad724ceb00e9daa5 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 12:16:55 -0700 Subject: [PATCH 22/38] comment out tests that use pre-europa pipelines Signed-off-by: Joel Longtine --- tests/plan/hello-europa/main.cue | 10 ++++----- tests/plan/proxy/incomplete_service.cue | 30 ++++++++++++------------- tests/plan/proxy/incomplete_unix.cue | 30 +++++++++++++------------ tests/plan/proxy/invalid_schema.cue | 30 +++++++++++++------------ tests/plan/proxy/invalid_value.cue | 30 +++++++++++++------------ tests/plan/proxy/unix.cue | 29 ++++++++++++------------ 6 files changed, 83 insertions(+), 76 deletions(-) diff --git a/tests/plan/hello-europa/main.cue b/tests/plan/hello-europa/main.cue index b7ca0ac3..a30f5dac 100644 --- a/tests/plan/hello-europa/main.cue +++ b/tests/plan/hello-europa/main.cue @@ -2,15 +2,15 @@ package main import ( "dagger.io/dagger" - "alpha.dagger.io/os" + // "alpha.dagger.io/os" ) dagger.#Plan & { actions: { - sayHello: os.#Container & { - command: "echo Hello Europa! > /out.txt" - } + // sayHello: os.#Container & { + // command: "echo Hello Europa! > /out.txt" + // } - verify: "Hello Europa!\n" & (os.#File & {from: sayHello, path: "/out.txt"}).contents + // verify: "Hello Europa!\n" & (os.#File & {from: sayHello, path: "/out.txt"}).contents } } diff --git a/tests/plan/proxy/incomplete_service.cue b/tests/plan/proxy/incomplete_service.cue index 42be4e8b..70b9c037 100644 --- a/tests/plan/proxy/incomplete_service.cue +++ b/tests/plan/proxy/incomplete_service.cue @@ -2,26 +2,26 @@ package main import ( "dagger.io/dagger" - - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" + // "alpha.dagger.io/dagger/op" + // "alpha.dagger.io/alpine" ) dagger.#Plan & { // should fail due to incomplete service proxy: dockerSocket: {} - actions: test: #up: [ - op.#Load & { - from: alpine.#Image & { - package: "docker-cli": true - } - }, + // TODO/FIXME: Use Europa constructs for this + // actions: test: #up: [ + // op.#Load & { + // from: alpine.#Image & { + // package: "docker-cli": true + // } + // }, - op.#Exec & { - always: true - mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - args: ["docker", "info"] - }, - ] + // op.#Exec & { + // always: true + // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service + // args: ["docker", "info"] + // }, + // ] } diff --git a/tests/plan/proxy/incomplete_unix.cue b/tests/plan/proxy/incomplete_unix.cue index 39fca4e6..6bd26f4c 100644 --- a/tests/plan/proxy/incomplete_unix.cue +++ b/tests/plan/proxy/incomplete_unix.cue @@ -1,25 +1,27 @@ package main import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" + "dagger.io/dagger" + // "alpha.dagger.io/dagger/op" + // "alpha.dagger.io/alpine" ) dagger.#Plan & { // should fail because incomplete value proxy: dockerSocket: unix: string - actions: test: #up: [ - op.#Load & { - from: alpine.#Image & { - package: "docker-cli": true - } - }, + // TODO/FIXME: Use Europa constructs for this + // actions: test: #up: [ + // op.#Load & { + // from: alpine.#Image & { + // package: "docker-cli": true + // } + // }, - op.#Exec & { - always: true - mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - args: ["docker", "info"] - }, - ] + // op.#Exec & { + // always: true + // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service + // args: ["docker", "info"] + // }, + // ] } diff --git a/tests/plan/proxy/invalid_schema.cue b/tests/plan/proxy/invalid_schema.cue index 7f631aef..b49096c3 100644 --- a/tests/plan/proxy/invalid_schema.cue +++ b/tests/plan/proxy/invalid_schema.cue @@ -1,25 +1,27 @@ package main import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" + "dagger.io/dagger" + // "alpha.dagger.io/dagger/op" + // "alpha.dagger.io/alpine" ) dagger.#Plan & { // should fail because of misspelled key proxy: dockerSocket: unx: "/var/run/docker.sock" - actions: test: #up: [ - op.#Load & { - from: alpine.#Image & { - package: "docker-cli": true - } - }, + // TODO/FIXME: Use Europa constructs for this + // actions: test: #up: [ + // op.#Load & { + // from: alpine.#Image & { + // package: "docker-cli": true + // } + // }, - op.#Exec & { - always: true - mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - args: ["docker", "info"] - }, - ] + // op.#Exec & { + // always: true + // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service + // args: ["docker", "info"] + // }, + // ] } diff --git a/tests/plan/proxy/invalid_value.cue b/tests/plan/proxy/invalid_value.cue index 7383938e..f6897084 100644 --- a/tests/plan/proxy/invalid_value.cue +++ b/tests/plan/proxy/invalid_value.cue @@ -1,25 +1,27 @@ package main import ( - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" + "dagger.io/dagger" + // "alpha.dagger.io/dagger/op" + // "alpha.dagger.io/alpine" ) dagger.#Plan & { // should fail because of misspelled value proxy: dockerSocket: unix: "/var/run/docker.soc" - actions: test: #up: [ - op.#Load & { - from: alpine.#Image & { - package: "docker-cli": true - } - }, + // TODO/FIXME: Use Europa constructs for this + // actions: test: #up: [ + // op.#Load & { + // from: alpine.#Image & { + // package: "docker-cli": true + // } + // }, - op.#Exec & { - always: true - mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - args: ["docker", "info"] - }, - ] + // op.#Exec & { + // always: true + // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service + // args: ["docker", "info"] + // }, + // ] } diff --git a/tests/plan/proxy/unix.cue b/tests/plan/proxy/unix.cue index 01c5b76d..0f69796a 100644 --- a/tests/plan/proxy/unix.cue +++ b/tests/plan/proxy/unix.cue @@ -2,25 +2,26 @@ package main import ( "dagger.io/dagger" - "alpha.dagger.io/dagger/op" - "alpha.dagger.io/alpine" + // "alpha.dagger.io/dagger/op" + // "alpha.dagger.io/alpine" ) dagger.#Plan & { // should succeed proxy: dockerSocket: unix: "/var/run/docker.sock" - actions: test: #up: [ - op.#Load & { - from: alpine.#Image & { - package: "docker-cli": true - } - }, + // TODO/FIXME: Use Europa constructs for this + // actions: test: #up: [ + // op.#Load & { + // from: alpine.#Image & { + // package: "docker-cli": true + // } + // }, - op.#Exec & { - always: true - mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - args: ["docker", "info"] - }, - ] + // op.#Exec & { + // always: true + // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service + // args: ["docker", "info"] + // }, + // ] } From 16b66773f30915bbb50339d0a063e865d51949be Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 12:17:23 -0700 Subject: [PATCH 23/38] Add updated .gitignore files Signed-off-by: Joel Longtine --- pkg/universe.dagger.io/cue.mod/pkg/.gitignore | 1 - tests/cue.mod/pkg/.gitignore | 1 - tests/tasks/copy/cue.mod/pkg/.gitignore | 5 ++--- tests/tasks/dockerfile/cue.mod/pkg/.gitignore | 1 - tests/tasks/exec/cue.mod/pkg/.gitignore | 5 ++--- tests/tasks/mkdir/cue.mod/pkg/.gitignore | 5 ++--- tests/tasks/pull/cue.mod/pkg/.gitignore | 1 - tests/tasks/readfile/cue.mod/pkg/.gitignore | 5 ++--- tests/tasks/scratch/cue.mod/pkg/.gitignore | 5 ++--- tests/tasks/writefile/cue.mod/pkg/.gitignore | 5 ++--- 10 files changed, 12 insertions(+), 22 deletions(-) diff --git a/pkg/universe.dagger.io/cue.mod/pkg/.gitignore b/pkg/universe.dagger.io/cue.mod/pkg/.gitignore index 331f139d..8e3152ec 100644 --- a/pkg/universe.dagger.io/cue.mod/pkg/.gitignore +++ b/pkg/universe.dagger.io/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger dagger.lock -alpha.dagger.io dagger.io universe.dagger.io \ No newline at end of file diff --git a/tests/cue.mod/pkg/.gitignore b/tests/cue.mod/pkg/.gitignore index 331f139d..8e3152ec 100644 --- a/tests/cue.mod/pkg/.gitignore +++ b/tests/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger dagger.lock -alpha.dagger.io dagger.io universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/copy/cue.mod/pkg/.gitignore b/tests/tasks/copy/cue.mod/pkg/.gitignore index d587a7ab..8e3152ec 100644 --- a/tests/tasks/copy/cue.mod/pkg/.gitignore +++ b/tests/tasks/copy/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger -alpha.dagger.io -dagger.io -universe.dagger.io dagger.lock +dagger.io +universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/dockerfile/cue.mod/pkg/.gitignore b/tests/tasks/dockerfile/cue.mod/pkg/.gitignore index 331f139d..8e3152ec 100644 --- a/tests/tasks/dockerfile/cue.mod/pkg/.gitignore +++ b/tests/tasks/dockerfile/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger dagger.lock -alpha.dagger.io dagger.io universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/exec/cue.mod/pkg/.gitignore b/tests/tasks/exec/cue.mod/pkg/.gitignore index d587a7ab..8e3152ec 100644 --- a/tests/tasks/exec/cue.mod/pkg/.gitignore +++ b/tests/tasks/exec/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger -alpha.dagger.io -dagger.io -universe.dagger.io dagger.lock +dagger.io +universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/mkdir/cue.mod/pkg/.gitignore b/tests/tasks/mkdir/cue.mod/pkg/.gitignore index d587a7ab..8e3152ec 100644 --- a/tests/tasks/mkdir/cue.mod/pkg/.gitignore +++ b/tests/tasks/mkdir/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger -alpha.dagger.io -dagger.io -universe.dagger.io dagger.lock +dagger.io +universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/pull/cue.mod/pkg/.gitignore b/tests/tasks/pull/cue.mod/pkg/.gitignore index 331f139d..8e3152ec 100644 --- a/tests/tasks/pull/cue.mod/pkg/.gitignore +++ b/tests/tasks/pull/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger dagger.lock -alpha.dagger.io dagger.io universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/readfile/cue.mod/pkg/.gitignore b/tests/tasks/readfile/cue.mod/pkg/.gitignore index d587a7ab..8e3152ec 100644 --- a/tests/tasks/readfile/cue.mod/pkg/.gitignore +++ b/tests/tasks/readfile/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger -alpha.dagger.io -dagger.io -universe.dagger.io dagger.lock +dagger.io +universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/scratch/cue.mod/pkg/.gitignore b/tests/tasks/scratch/cue.mod/pkg/.gitignore index d587a7ab..8e3152ec 100644 --- a/tests/tasks/scratch/cue.mod/pkg/.gitignore +++ b/tests/tasks/scratch/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger -alpha.dagger.io -dagger.io -universe.dagger.io dagger.lock +dagger.io +universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/writefile/cue.mod/pkg/.gitignore b/tests/tasks/writefile/cue.mod/pkg/.gitignore index d587a7ab..8e3152ec 100644 --- a/tests/tasks/writefile/cue.mod/pkg/.gitignore +++ b/tests/tasks/writefile/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger -alpha.dagger.io -dagger.io -universe.dagger.io dagger.lock +dagger.io +universe.dagger.io \ No newline at end of file From 0705b0eeaed5fa4ccd5688b945805290d681baed Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 12:33:01 -0700 Subject: [PATCH 24/38] Skip non-europa tests Signed-off-by: Joel Longtine --- .github/workflows/test-docs.yml | 108 ++++++++++++++-------------- .github/workflows/test-universe.yml | 60 ---------------- docs/learn/tests/doc.bats | 93 ++++++++++++------------ 3 files changed, 102 insertions(+), 159 deletions(-) diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index b7c5c105..6622e770 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -18,66 +18,66 @@ on: - 'Makefile' - '.github/workflows/test-docs.yml' -jobs: - test-docs: - name: "Test Docs" - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: "Check out" - uses: actions/checkout@v2 +# jobs: +# test-docs: +# name: "Test Docs" +# runs-on: ubuntu-latest +# timeout-minutes: 15 +# steps: +# - name: "Check out" +# uses: actions/checkout@v2 - - name: "Setup Go" - uses: actions/setup-go@v1 - with: - go-version: 1.16 +# - name: "Setup Go" +# uses: actions/setup-go@v1 +# with: +# go-version: 1.16 - - name: "Install CUE" - run: | - # Cue - export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')" - export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz" - echo "Installing cue version $CUE_VERSION" - curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin +# - name: "Install CUE" +# run: | +# # Cue +# export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')" +# export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz" +# echo "Installing cue version $CUE_VERSION" +# curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin - - name: "Run local registry" - run: | - docker run -d -p 5000:5000 --name registry registry:2 +# - name: "Run local registry" +# run: | +# docker run -d -p 5000:5000 --name registry registry:2 - # TODO: DISABLED for CI deadlock debugging - # - name: Generate KiND config - # run: | - # echo 'kind: Cluster - # apiVersion: kind.x-k8s.io/v1alpha4 - # containerdConfigPatches: - # - |- - # [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"] - # endpoint = ["http://registry:5000"]' > ./kind-config.yaml - # cat ./kind-config.yaml +# # TODO: DISABLED for CI deadlock debugging +# # - name: Generate KiND config +# # run: | +# # echo 'kind: Cluster +# # apiVersion: kind.x-k8s.io/v1alpha4 +# # containerdConfigPatches: +# # - |- +# # [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"] +# # endpoint = ["http://registry:5000"]' > ./kind-config.yaml +# # cat ./kind-config.yaml - # - name: "Setup KiND" - # uses: helm/kind-action@v1.2.0 - # with: - # config: "./kind-config.yaml" +# # - name: "Setup KiND" +# # uses: helm/kind-action@v1.2.0 +# # with: +# # config: "./kind-config.yaml" - # - name: Connect local registry to KiND - # run: | - # docker network connect kind registry +# # - name: Connect local registry to KiND +# # run: | +# # docker network connect kind registry - - name: "Import Dagger private key" - env: - DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }} - run: | - mkdir -p ~/.config/dagger - echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt +# - name: "Import Dagger private key" +# env: +# DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }} +# run: | +# mkdir -p ~/.config/dagger +# echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt - - name: "Expose GitHub Runtime" - uses: crazy-max/ghaction-github-runtime@v1 +# - name: "Expose GitHub Runtime" +# uses: crazy-max/ghaction-github-runtime@v1 - - name: Test - # TODO: https://github.com/dagger/dagger/pull/1341 - # env: - # DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-docs" - # DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-docs" - run: | - make doc-test +# - name: Test +# # TODO: https://github.com/dagger/dagger/pull/1341 +# # env: +# # DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-docs" +# # DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-docs" +# run: | +# make doc-test diff --git a/.github/workflows/test-universe.yml b/.github/workflows/test-universe.yml index 7b1cb0e3..2546d357 100644 --- a/.github/workflows/test-universe.yml +++ b/.github/workflows/test-universe.yml @@ -25,66 +25,6 @@ on: - '.github/workflows/test-universe.yml' jobs: - universe-tests: - name: "Universe Tests" - runs-on: ubuntu-latest - timeout-minutes: 30 - services: - localstack: - image: localstack/localstack:0.12.16 - env: - SERVICES: s3, ecr - LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - ports: - - 4566:4566 - - 4571:4571 - - 4510:4510 - options: >- - --health-cmd "curl -f http://localhost:4566/health" - --health-start-period 5s - --health-timeout 5s - --health-interval 5s - --health-retries 10 - - steps: - - name: "Check out" - uses: actions/checkout@v2 - - - name: "Setup Go" - uses: actions/setup-go@v1 - with: - go-version: 1.16 - - - name: "Setup KiND" - uses: helm/kind-action@v1.2.0 - - - name: "Import Dagger private key" - env: - DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }} - run: | - mkdir -p ~/.config/dagger - echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt - - - name: "Provision Localstack AWS resources" - env: - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_DEFAULT_REGION: us-east-2 - run: | - aws --endpoint-url=http://localhost:4566 s3 mb s3://dagger-ci - aws --endpoint-url=http://localhost:4566 ecr create-repository --repository-name dagger-ci - - - name: "Expose GitHub Runtime" - uses: crazy-max/ghaction-github-runtime@v1 - - - name: Test - # TODO: https://github.com/dagger/dagger/pull/1341 - # env: - # DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-universe" - # DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-universe" - run: | - make universe-test - universe-europa-tests: name: "Universe Tests - Europa" runs-on: ubuntu-latest diff --git a/docs/learn/tests/doc.bats b/docs/learn/tests/doc.bats index 5db8ee15..c08595c4 100644 --- a/docs/learn/tests/doc.bats +++ b/docs/learn/tests/doc.bats @@ -9,73 +9,76 @@ setup() { # Test 1003-get-started @test "doc-1003-get-started" { - setup_example_sandbox + skip "TODO: Implement for Europa" + # setup_example_sandbox - # Follow tutorial - mkdir -p "$DAGGER_SANDBOX"/plans/local - cp "$DAGGER_PROJECT"/getting-started/plans/todoapp.cue "$DAGGER_SANDBOX"/plans/todoapp.cue - cp "$DAGGER_PROJECT"/getting-started/plans/local/local.cue "$DAGGER_SANDBOX"/plans/local/local.cue + # # Follow tutorial + # mkdir -p "$DAGGER_SANDBOX"/plans/local + # cp "$DAGGER_PROJECT"/getting-started/plans/todoapp.cue "$DAGGER_SANDBOX"/plans/todoapp.cue + # cp "$DAGGER_PROJECT"/getting-started/plans/local/local.cue "$DAGGER_SANDBOX"/plans/local/local.cue - dagger --project "$DAGGER_SANDBOX" new 'local' -p "$DAGGER_SANDBOX"/plans/local - dagger --project "$DAGGER_SANDBOX" -e 'local' input socket dockerSocket /var/run/docker.sock - dagger --project "$DAGGER_SANDBOX" -e 'local' input dir app.source "$DAGGER_SANDBOX" + # dagger --project "$DAGGER_SANDBOX" new 'local' -p "$DAGGER_SANDBOX"/plans/local + # dagger --project "$DAGGER_SANDBOX" -e 'local' input socket dockerSocket /var/run/docker.sock + # dagger --project "$DAGGER_SANDBOX" -e 'local' input dir app.source "$DAGGER_SANDBOX" - run dagger --project "$DAGGER_SANDBOX" -e 'local' up - assert_success + # run dagger --project "$DAGGER_SANDBOX" -e 'local' up + # assert_success - docker rm -f todoapp - docker rm -f registry-local + # docker rm -f todoapp + # docker rm -f registry-local } @test "doc-1004-first-env" { - setup_example_sandbox + skip "TODO: Implement for Europa" + # setup_example_sandbox - # Follow tutorial - mkdir -p "$DAGGER_SANDBOX"/multibucket - cp "$DAGGER_PROJECT"/multibucket/source.cue "$DAGGER_SANDBOX"/multibucket - cp "$DAGGER_PROJECT"/multibucket/yarn.cue "$DAGGER_SANDBOX"/multibucket - cp "$DAGGER_PROJECT"/multibucket/netlify.cue "$DAGGER_SANDBOX"/multibucket + # # Follow tutorial + # mkdir -p "$DAGGER_SANDBOX"/multibucket + # cp "$DAGGER_PROJECT"/multibucket/source.cue "$DAGGER_SANDBOX"/multibucket + # cp "$DAGGER_PROJECT"/multibucket/yarn.cue "$DAGGER_SANDBOX"/multibucket + # cp "$DAGGER_PROJECT"/multibucket/netlify.cue "$DAGGER_SANDBOX"/multibucket - dagger --project "$DAGGER_SANDBOX" doc alpha.dagger.io/netlify - dagger --project "$DAGGER_SANDBOX" doc alpha.dagger.io/js/yarn + # dagger --project "$DAGGER_SANDBOX" doc alpha.dagger.io/netlify + # dagger --project "$DAGGER_SANDBOX" doc alpha.dagger.io/js/yarn - # Initialize new env - dagger --project "$DAGGER_SANDBOX" new 'multibucket' -p "$DAGGER_SANDBOX"/multibucket + # # Initialize new env + # dagger --project "$DAGGER_SANDBOX" new 'multibucket' -p "$DAGGER_SANDBOX"/multibucket - # Copy corresponding env - cp -r "$DAGGER_PROJECT"/.dagger/env/multibucket "$DAGGER_SANDBOX"/.dagger/env/ + # # Copy corresponding env + # cp -r "$DAGGER_PROJECT"/.dagger/env/multibucket "$DAGGER_SANDBOX"/.dagger/env/ - # Add missing src input - dagger --project "$DAGGER_SANDBOX" -e multibucket input dir src "$DAGGER_SANDBOX" + # # Add missing src input + # dagger --project "$DAGGER_SANDBOX" -e multibucket input dir src "$DAGGER_SANDBOX" - # Run test - dagger --project "$DAGGER_SANDBOX" -e multibucket up - url=$(dagger --project "$DAGGER_SANDBOX" -e multibucket query -f text site.netlify.deployUrl) + # # Run test + # dagger --project "$DAGGER_SANDBOX" -e multibucket up + # url=$(dagger --project "$DAGGER_SANDBOX" -e multibucket query -f text site.netlify.deployUrl) - # Check output - run curl "$url" - assert_output --partial "./static/css/main.9149988f.chunk.css" + # # Check output + # run curl "$url" + # assert_output --partial "./static/css/main.9149988f.chunk.css" } @test "doc-1006-google-cloud-run" { - setup_example_sandbox + skip "TODO: Implement for Europa" + # setup_example_sandbox - # Follow tutorial - mkdir -p "$DAGGER_SANDBOX"/gcpcloudrun - cp "$DAGGER_PROJECT"/gcpcloudrun/source.cue "$DAGGER_SANDBOX"/gcpcloudrun + # # Follow tutorial + # mkdir -p "$DAGGER_SANDBOX"/gcpcloudrun + # cp "$DAGGER_PROJECT"/gcpcloudrun/source.cue "$DAGGER_SANDBOX"/gcpcloudrun - # Initialize new env - dagger --project "$DAGGER_SANDBOX" new 'gcpcloudrun' -p "$DAGGER_SANDBOX"/gcpcloudrun + # # Initialize new env + # dagger --project "$DAGGER_SANDBOX" new 'gcpcloudrun' -p "$DAGGER_SANDBOX"/gcpcloudrun - # Copy corresponding env - cp -r "$DAGGER_PROJECT"/.dagger/env/gcpcloudrun "$DAGGER_SANDBOX"/.dagger/env/ + # # Copy corresponding env + # cp -r "$DAGGER_PROJECT"/.dagger/env/gcpcloudrun "$DAGGER_SANDBOX"/.dagger/env/ - # Add missing src input - dagger --project "$DAGGER_SANDBOX" -e gcpcloudrun input dir src "$DAGGER_SANDBOX" + # # Add missing src input + # dagger --project "$DAGGER_SANDBOX" -e gcpcloudrun input dir src "$DAGGER_SANDBOX" - # Run test - run dagger --project "$DAGGER_SANDBOX" -e gcpcloudrun up - assert_success + # # Run test + # run dagger --project "$DAGGER_SANDBOX" -e gcpcloudrun up + # assert_success } @test "doc-1007-kube-kind" { From e8bd1acd859ae09eadca15ac51e34898b3d92e3a Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 12:33:08 -0700 Subject: [PATCH 25/38] make docs Signed-off-by: Joel Longtine --- docs/reference/README.md | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/docs/reference/README.md b/docs/reference/README.md index 9589c25e..2061bac5 100644 --- a/docs/reference/README.md +++ b/docs/reference/README.md @@ -1,42 +1,2 @@ # Index -- [alpine](./alpine.md) - Base package for Alpine Linux -- [argocd](./argocd.md) - ArgoCD client operations -- [aws](./aws/README.md) - AWS base package -- [aws/cloudformation](./aws/cloudformation.md) - AWS CloudFormation -- [aws/ecr](./aws/ecr.md) - Amazon Elastic Container Registry (ECR) -- [aws/ecs](./aws/ecs.md) - AWS Elastic Container Service (ECS) -- [aws/eks](./aws/eks.md) - AWS Elastic Kubernetes Service (EKS) -- [aws/elb](./aws/elb.md) - AWS Elastic Load Balancer (ELBv2) -- [aws/rds](./aws/rds.md) - AWS Relational Database Service (RDS) -- [aws/s3](./aws/s3.md) - AWS Simple Storage Service -- [azure](./azure/README.md) - Azure base package -- [azure/resourcegroup](./azure/resourcegroup.md) - - -- [azure/staticwebapp](./azure/staticwebapp.md) - - -- [azure/storage](./azure/storage.md) - - -- [bats](./bats.md) - - -- [dagger](./dagger/README.md) - Dagger core types -- [dagger/op](./dagger/op.md) - op: low-level operations for Dagger processing pipelines -- [docker](./docker/README.md) - Docker container operations -- [docker/compose](./docker/compose.md) - Docker-compose operations -- [gcp](./gcp/README.md) - Google Cloud Platform -- [gcp/cloudrun](./gcp/cloudrun.md) - - -- [gcp/gcr](./gcp/gcr.md) - Google Container Registry -- [gcp/gcs](./gcp/gcs.md) - Google Cloud Storage -- [gcp/gke](./gcp/gke.md) - Google Kubernetes Engine -- [gcp/secretmanager](./gcp/secretmanager.md) - Google Cloud Secret Manager -- [git](./git.md) - Git operations -- [go](./go.md) - Go build operations -- [graphql](./graphql.md) - - -- [http](./http.md) - - -- [io](./io.md) - IO operations -- [java/maven](./java/maven.md) - Maven is a build automation tool for Java -- [js/yarn](./js/yarn.md) - Yarn is a package manager for Javascript applications -- [kubernetes](./kubernetes/README.md) - Kubernetes client operations -- [kubernetes/helm](./kubernetes/helm.md) - Helm package manager -- [kubernetes/kustomize](./kubernetes/kustomize.md) - Kustomize config management -- [netlify](./netlify.md) - Netlify client operations -- [os](./os.md) - OS operations -- [random](./random.md) - Random generation utilities -- [terraform](./terraform.md) - Terraform operations -- [trivy](./trivy.md) - - From a768ed13c7451eba01c0756239eb3aa6dafec3a2 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 12:33:19 -0700 Subject: [PATCH 26/38] Fix go.#Build Signed-off-by: Joel Longtine --- pkg/universe.dagger.io/go/build.cue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/universe.dagger.io/go/build.cue b/pkg/universe.dagger.io/go/build.cue index 5b4e6e03..34464d5a 100644 --- a/pkg/universe.dagger.io/go/build.cue +++ b/pkg/universe.dagger.io/go/build.cue @@ -46,5 +46,5 @@ import ( export: directories: "/output/": _ } - binary: container.export.directories."/output/".contents + binary: container.export.directories."/output/" } From eeb20a3999e09242c26e5a6dde908afc4510b91b Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 15:25:30 -0700 Subject: [PATCH 27/38] Temporary fix for markdownlint Signed-off-by: Joel Longtine --- cmd/dagger/cmd/doc.go | 9 ++++++++- docs/reference/README.md | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/dagger/cmd/doc.go b/cmd/dagger/cmd/doc.go index 18cbf5eb..d4198578 100644 --- a/cmd/dagger/cmd/doc.go +++ b/cmd/dagger/cmd/doc.go @@ -334,7 +334,9 @@ func walkStdlib(ctx context.Context, output, format string) { lg.Fatal().Err(err).Msg("cannot generate stdlib doc index") } defer index.Close() - fmt.Fprintf(index, "# Index\n\n") + // FIXME: I removed a \n character, so that markdownlint doesn't complain + // about an extra newline at the end of the file. + fmt.Fprintf(index, "# Index\n") indexKeys := []string{} for p, pkg := range packages { @@ -357,6 +359,11 @@ func walkStdlib(ctx context.Context, output, format string) { // Generate index from sorted list of packages sort.Strings(indexKeys) + // Add a extra blank line if we have at least one package + // TODO: this is a hack, fixes issue with markdownlint, if we haven't generated any docs. + if len(indexKeys) > 0 { + fmt.Fprintf(index, "\n") + } for _, p := range indexKeys { description := mdEscape(packages[p].Description) fmt.Fprintf(index, "- [%s](./%s) - %s\n", p, getFileName(p), description) diff --git a/docs/reference/README.md b/docs/reference/README.md index 2061bac5..8b013d6a 100644 --- a/docs/reference/README.md +++ b/docs/reference/README.md @@ -1,2 +1 @@ # Index - From 4cc93098a171cabc1568a15133bbc13f383e630a Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 15:25:50 -0700 Subject: [PATCH 28/38] Remove old docs Signed-off-by: Joel Longtine --- docs/reference/argocd/README.md | 45 ------ docs/reference/argocd/app.md | 72 ---------- docs/reference/aws/README.md | 57 -------- docs/reference/aws/cloudformation.md | 23 --- docs/reference/aws/ecr.md | 23 --- docs/reference/aws/ecs.md | 11 -- docs/reference/aws/eks.md | 23 --- docs/reference/aws/elb.md | 23 --- docs/reference/aws/rds.md | 47 ------- docs/reference/aws/s3.md | 23 --- docs/reference/azure/README.md | 35 ----- docs/reference/azure/resourcegroup.md | 21 --- docs/reference/azure/staticwebapp.md | 21 --- docs/reference/azure/storage.md | 21 --- docs/reference/dagger/README.md | 35 ----- docs/reference/dagger/engine.md | 91 ------------ docs/reference/dagger/op.md | 185 ------------------------- docs/reference/docker/README.md | 81 ----------- docs/reference/docker/compose.md | 33 ----- docs/reference/gcp/README.md | 35 ----- docs/reference/gcp/cloudrun.md | 21 --- docs/reference/gcp/gcr.md | 23 --- docs/reference/gcp/gcs.md | 23 --- docs/reference/gcp/gke.md | 23 --- docs/reference/gcp/secretmanager.md | 21 --- docs/reference/java/maven.md | 23 --- docs/reference/js/yarn.md | 23 --- docs/reference/kubernetes/README.md | 35 ----- docs/reference/kubernetes/helm.md | 23 --- docs/reference/kubernetes/kustomize.md | 33 ----- 30 files changed, 1153 deletions(-) delete mode 100644 docs/reference/argocd/README.md delete mode 100644 docs/reference/argocd/app.md delete mode 100644 docs/reference/aws/README.md delete mode 100644 docs/reference/aws/cloudformation.md delete mode 100644 docs/reference/aws/ecr.md delete mode 100644 docs/reference/aws/ecs.md delete mode 100644 docs/reference/aws/eks.md delete mode 100644 docs/reference/aws/elb.md delete mode 100644 docs/reference/aws/rds.md delete mode 100644 docs/reference/aws/s3.md delete mode 100644 docs/reference/azure/README.md delete mode 100644 docs/reference/azure/resourcegroup.md delete mode 100644 docs/reference/azure/staticwebapp.md delete mode 100644 docs/reference/azure/storage.md delete mode 100644 docs/reference/dagger/README.md delete mode 100644 docs/reference/dagger/engine.md delete mode 100644 docs/reference/dagger/op.md delete mode 100644 docs/reference/docker/README.md delete mode 100644 docs/reference/docker/compose.md delete mode 100644 docs/reference/gcp/README.md delete mode 100644 docs/reference/gcp/cloudrun.md delete mode 100644 docs/reference/gcp/gcr.md delete mode 100644 docs/reference/gcp/gcs.md delete mode 100644 docs/reference/gcp/gke.md delete mode 100644 docs/reference/gcp/secretmanager.md delete mode 100644 docs/reference/java/maven.md delete mode 100644 docs/reference/js/yarn.md delete mode 100644 docs/reference/kubernetes/README.md delete mode 100644 docs/reference/kubernetes/helm.md delete mode 100644 docs/reference/kubernetes/kustomize.md diff --git a/docs/reference/argocd/README.md b/docs/reference/argocd/README.md deleted file mode 100644 index 827ea983..00000000 --- a/docs/reference/argocd/README.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -sidebar_label: argocd ---- - -# alpha.dagger.io/argocd - -ArgoCD client operations - -```cue -import "alpha.dagger.io/argocd" -``` - -## argocd.#CLI - -Re-usable CLI component - -### argocd.#CLI Inputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*config.server* | `string` |ArgoCD server | -|*config.project* | `*"default" \| string` |ArgoCD project | -|*config.token* | `dagger.#Secret` |ArgoCD authentication token | - -### argocd.#CLI Outputs - -_No output._ - -## argocd.#Config - -ArgoCD configuration - -### argocd.#Config Inputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*server* | `string` |ArgoCD server | -|*project* | `*"default" \| string` |ArgoCD project | -|*token* | `dagger.#Secret` |ArgoCD authentication token | - -### argocd.#Config Outputs - -_No output._ diff --git a/docs/reference/argocd/app.md b/docs/reference/argocd/app.md deleted file mode 100644 index 177cdee1..00000000 --- a/docs/reference/argocd/app.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -sidebar_label: app ---- - -# alpha.dagger.io/argocd/app - -ArgoCD applications - -```cue -import "alpha.dagger.io/argocd/app" -``` - -## app.#Application - -Get an application - -### app.#Application Inputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*config.server* | `string` |ArgoCD server | -|*config.project* | `*"default" \| string` |ArgoCD project | -|*config.token* | `dagger.#Secret` |ArgoCD authentication token | -|*name* | `string` |ArgoCD application | - -### app.#Application Outputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*outputs.health* | `string` |Application health | -|*outputs.sync* | `string` |Application sync state | -|*outputs.namespace* | `string` |Namespace | -|*outputs.server* | `string` |Server | -|*outputs.urls* | `string` |Comma separated list of application URLs | -|*outputs.state* | `string` |Last operation state message | - -## app.#Synchronization - -Sync an application to its target state - -### app.#Synchronization Inputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*config.server* | `string` |ArgoCD server | -|*config.project* | `*"default" \| string` |ArgoCD project | -|*config.token* | `dagger.#Secret` |ArgoCD authentication token | -|*application* | `string` |ArgoCD application | - -### app.#Synchronization Outputs - -_No output._ - -## app.#SynchronizedApplication - -Wait for an application to reach a synced and healthy state - -### app.#SynchronizedApplication Inputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.version* | `*"v2.0.5" \| string` |ArgoCD CLI binary version | -|*config.server* | `string` |ArgoCD server | -|*config.project* | `*"default" \| string` |ArgoCD project | -|*config.token* | `dagger.#Secret` |ArgoCD authentication token | -|*application* | `string` |ArgoCD application | - -### app.#SynchronizedApplication Outputs - -_No output._ diff --git a/docs/reference/aws/README.md b/docs/reference/aws/README.md deleted file mode 100644 index 02a047d6..00000000 --- a/docs/reference/aws/README.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_label: aws ---- - -# alpha.dagger.io/aws - -AWS base package - -```cue -import "alpha.dagger.io/aws" -``` - -## aws.#CLI - -### aws.#CLI Inputs - -_No input._ - -### aws.#CLI Outputs - -_No output._ - -## aws.#Config - -AWS Config shared by all AWS packages - -### aws.#Config Inputs - -_No input._ - -### aws.#Config Outputs - -_No output._ - -## aws.#V1 - -Configuration specific to CLI v1 - -### aws.#V1 Inputs - -_No input._ - -### aws.#V1 Outputs - -_No output._ - -## aws.#V2 - -Configuration specific to CLI v2 - -### aws.#V2 Inputs - -_No input._ - -### aws.#V2 Outputs - -_No output._ diff --git a/docs/reference/aws/cloudformation.md b/docs/reference/aws/cloudformation.md deleted file mode 100644 index c31407eb..00000000 --- a/docs/reference/aws/cloudformation.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: cloudformation ---- - -# alpha.dagger.io/aws/cloudformation - -AWS CloudFormation - -```cue -import "alpha.dagger.io/aws/cloudformation" -``` - -## cloudformation.#Stack - -AWS CloudFormation Stack - -### cloudformation.#Stack Inputs - -_No input._ - -### cloudformation.#Stack Outputs - -_No output._ diff --git a/docs/reference/aws/ecr.md b/docs/reference/aws/ecr.md deleted file mode 100644 index 9559898f..00000000 --- a/docs/reference/aws/ecr.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: ecr ---- - -# alpha.dagger.io/aws/ecr - -Amazon Elastic Container Registry (ECR) - -```cue -import "alpha.dagger.io/aws/ecr" -``` - -## ecr.#Credentials - -Convert ECR credentials to Docker Login format - -### ecr.#Credentials Inputs - -_No input._ - -### ecr.#Credentials Outputs - -_No output._ diff --git a/docs/reference/aws/ecs.md b/docs/reference/aws/ecs.md deleted file mode 100644 index e80cafa8..00000000 --- a/docs/reference/aws/ecs.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -sidebar_label: ecs ---- - -# alpha.dagger.io/aws/ecs - -AWS Elastic Container Service (ECS) - -```cue -import "alpha.dagger.io/aws/ecs" -``` diff --git a/docs/reference/aws/eks.md b/docs/reference/aws/eks.md deleted file mode 100644 index 78230bb1..00000000 --- a/docs/reference/aws/eks.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: eks ---- - -# alpha.dagger.io/aws/eks - -AWS Elastic Kubernetes Service (EKS) - -```cue -import "alpha.dagger.io/aws/eks" -``` - -## eks.#KubeConfig - -KubeConfig config outputs a valid kube-auth-config for kubectl client - -### eks.#KubeConfig Inputs - -_No input._ - -### eks.#KubeConfig Outputs - -_No output._ diff --git a/docs/reference/aws/elb.md b/docs/reference/aws/elb.md deleted file mode 100644 index 93f4bfc0..00000000 --- a/docs/reference/aws/elb.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: elb ---- - -# alpha.dagger.io/aws/elb - -AWS Elastic Load Balancer (ELBv2) - -```cue -import "alpha.dagger.io/aws/elb" -``` - -## elb.#RandomRulePriority - -Returns an unused rule priority (randomized in available range) - -### elb.#RandomRulePriority Inputs - -_No input._ - -### elb.#RandomRulePriority Outputs - -_No output._ diff --git a/docs/reference/aws/rds.md b/docs/reference/aws/rds.md deleted file mode 100644 index 5557d54d..00000000 --- a/docs/reference/aws/rds.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -sidebar_label: rds ---- - -# alpha.dagger.io/aws/rds - -AWS Relational Database Service (RDS) - -```cue -import "alpha.dagger.io/aws/rds" -``` - -## rds.#Database - -Creates a new Database on an existing RDS Instance - -### rds.#Database Inputs - -_No input._ - -### rds.#Database Outputs - -_No output._ - -## rds.#Instance - -Fetches information on an existing RDS Instance - -### rds.#Instance Inputs - -_No input._ - -### rds.#Instance Outputs - -_No output._ - -## rds.#User - -Creates a new user credentials on an existing RDS Instance - -### rds.#User Inputs - -_No input._ - -### rds.#User Outputs - -_No output._ diff --git a/docs/reference/aws/s3.md b/docs/reference/aws/s3.md deleted file mode 100644 index 109f8fdc..00000000 --- a/docs/reference/aws/s3.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: s3 ---- - -# alpha.dagger.io/aws/s3 - -AWS Simple Storage Service - -```cue -import "alpha.dagger.io/aws/s3" -``` - -## s3.#Object - -S3 Bucket object(s) sync - -### s3.#Object Inputs - -_No input._ - -### s3.#Object Outputs - -_No output._ diff --git a/docs/reference/azure/README.md b/docs/reference/azure/README.md deleted file mode 100644 index aafaf58d..00000000 --- a/docs/reference/azure/README.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -sidebar_label: azure ---- - -# alpha.dagger.io/azure - -Azure base package - -```cue -import "alpha.dagger.io/azure" -``` - -## azure.#CLI - -Azure Cli to be used by all Azure packages - -### azure.#CLI Inputs - -_No input._ - -### azure.#CLI Outputs - -_No output._ - -## azure.#Config - -Azure Config shared by all Azure packages - -### azure.#Config Inputs - -_No input._ - -### azure.#Config Outputs - -_No output._ diff --git a/docs/reference/azure/resourcegroup.md b/docs/reference/azure/resourcegroup.md deleted file mode 100644 index 4b57dbde..00000000 --- a/docs/reference/azure/resourcegroup.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_label: resourcegroup ---- - -# alpha.dagger.io/azure/resourcegroup - -```cue -import "alpha.dagger.io/azure/resourcegroup" -``` - -## resourcegroup.#ResourceGroup - -Create a resource group - -### resourcegroup.#ResourceGroup Inputs - -_No input._ - -### resourcegroup.#ResourceGroup Outputs - -_No output._ diff --git a/docs/reference/azure/staticwebapp.md b/docs/reference/azure/staticwebapp.md deleted file mode 100644 index 495a7293..00000000 --- a/docs/reference/azure/staticwebapp.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_label: staticwebapp ---- - -# alpha.dagger.io/azure/staticwebapp - -```cue -import "alpha.dagger.io/azure/staticwebapp" -``` - -## staticwebapp.#StaticWebApp - -Create a static web app - -### staticwebapp.#StaticWebApp Inputs - -_No input._ - -### staticwebapp.#StaticWebApp Outputs - -_No output._ diff --git a/docs/reference/azure/storage.md b/docs/reference/azure/storage.md deleted file mode 100644 index 4dfbb23e..00000000 --- a/docs/reference/azure/storage.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_label: storage ---- - -# alpha.dagger.io/azure/storage - -```cue -import "alpha.dagger.io/azure/storage" -``` - -## storage.#StorageAccount - -Create a storage account - -### storage.#StorageAccount Inputs - -_No input._ - -### storage.#StorageAccount Outputs - -_No output._ diff --git a/docs/reference/dagger/README.md b/docs/reference/dagger/README.md deleted file mode 100644 index b0f80c83..00000000 --- a/docs/reference/dagger/README.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -sidebar_label: dagger ---- - -# alpha.dagger.io/dagger - -Dagger core types - -```cue -import "alpha.dagger.io/dagger" -``` - -## dagger.#Secret - -A reference to an external secret, for example: - A password - A SSH private key - An API token Secrets are never merged in the Cue tree. They can only be used by a special filesystem mount designed to minimize leak risk. - -### dagger.#Secret Inputs - -_No input._ - -### dagger.#Secret Outputs - -_No output._ - -## dagger.#Stream - -Dagger stream. Can be mounted as a UNIX socket. - -### dagger.#Stream Inputs - -_No input._ - -### dagger.#Stream Outputs - -_No output._ diff --git a/docs/reference/dagger/engine.md b/docs/reference/dagger/engine.md deleted file mode 100644 index 05a30243..00000000 --- a/docs/reference/dagger/engine.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -sidebar_label: engine ---- - -# alpha.dagger.io/dagger/engine - -```cue -import "alpha.dagger.io/dagger/engine" -``` - -## engine.#Context - -### engine.#Context Inputs - -_No input._ - -### engine.#Context Outputs - -_No output._ - -## engine.#FS - -A reference to a filesystem tree. For example: - The root filesystem of a container - A source code repository - A directory containing binary artifacts Rule of thumb: if it fits in a tar archive, it fits in a #FS. - -### engine.#FS Inputs - -_No input._ - -### engine.#FS Outputs - -_No output._ - -## engine.#ImageConfig - -Container image config. See [OCI](https://opencontainers.org/). Spec left open on purpose to account for additional fields. [Image Spec](https://github.com/opencontainers/image-spec/blob/main/specs-go/v1/config.go) [Docker Superset](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/dockerfile2llb/image.go) - -### engine.#ImageConfig Inputs - -_No input._ - -### engine.#ImageConfig Outputs - -_No output._ - -## engine.#Plan - -A deployment plan executed by `dagger up` - -### engine.#Plan Inputs - -_No input._ - -### engine.#Plan Outputs - -_No output._ - -## engine.#Pull - -Download a container image from a remote repository - -### engine.#Pull Inputs - -_No input._ - -### engine.#Pull Outputs - -_No output._ - -## engine.#Secret - -A reference to an external secret, for example: - A password - A SSH private key - An API token Secrets are never merged in the Cue tree. They can only be used by a special filesystem mount designed to minimize leak risk. - -### engine.#Secret Inputs - -_No input._ - -### engine.#Secret Outputs - -_No output._ - -## engine.#Service - -A reference to a network service endpoint, for example: - A TCP or UDP port - A unix or npipe socket - An HTTPS endpoint - -### engine.#Service Inputs - -_No input._ - -### engine.#Service Outputs - -_No output._ diff --git a/docs/reference/dagger/op.md b/docs/reference/dagger/op.md deleted file mode 100644 index 776ca893..00000000 --- a/docs/reference/dagger/op.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -sidebar_label: op ---- - -# alpha.dagger.io/dagger/op - -op: low-level operations for Dagger processing pipelines - -```cue -import "alpha.dagger.io/dagger/op" -``` - -## op.#Copy - -### op.#Copy Inputs - -_No input._ - -### op.#Copy Outputs - -_No output._ - -## op.#DockerBuild - -### op.#DockerBuild Inputs - -_No input._ - -### op.#DockerBuild Outputs - -_No output._ - -## op.#DockerLogin - -### op.#DockerLogin Inputs - -_No input._ - -### op.#DockerLogin Outputs - -_No output._ - -## op.#Exec - -### op.#Exec Inputs - -_No input._ - -### op.#Exec Outputs - -_No output._ - -## op.#Export - -Export a value from fs state to cue - -### op.#Export Inputs - -_No input._ - -### op.#Export Outputs - -_No output._ - -## op.#FetchContainer - -### op.#FetchContainer Inputs - -_No input._ - -### op.#FetchContainer Outputs - -_No output._ - -## op.#FetchGit - -### op.#FetchGit Inputs - -_No input._ - -### op.#FetchGit Outputs - -_No output._ - -## op.#FetchHTTP - -### op.#FetchHTTP Inputs - -_No input._ - -### op.#FetchHTTP Outputs - -_No output._ - -## op.#Load - -### op.#Load Inputs - -_No input._ - -### op.#Load Outputs - -_No output._ - -## op.#Local - -### op.#Local Inputs - -_No input._ - -### op.#Local Outputs - -_No output._ - -## op.#Mkdir - -### op.#Mkdir Inputs - -_No input._ - -### op.#Mkdir Outputs - -_No output._ - -## op.#Op - -One operation in a pipeline - -### op.#Op Inputs - -_No input._ - -### op.#Op Outputs - -_No output._ - -## op.#PushContainer - -### op.#PushContainer Inputs - -_No input._ - -### op.#PushContainer Outputs - -_No output._ - -## op.#SaveImage - -### op.#SaveImage Inputs - -_No input._ - -### op.#SaveImage Outputs - -_No output._ - -## op.#Subdir - -### op.#Subdir Inputs - -_No input._ - -### op.#Subdir Outputs - -_No output._ - -## op.#Workdir - -### op.#Workdir Inputs - -_No input._ - -### op.#Workdir Outputs - -_No output._ - -## op.#WriteFile - -### op.#WriteFile Inputs - -_No input._ - -### op.#WriteFile Outputs - -_No output._ diff --git a/docs/reference/docker/README.md b/docs/reference/docker/README.md deleted file mode 100644 index 10cbf412..00000000 --- a/docs/reference/docker/README.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -sidebar_label: docker ---- - -# alpha.dagger.io/docker - -Docker container operations - -```cue -import "alpha.dagger.io/docker" -``` - -## docker.#Build - -Build a Docker image from source - -### docker.#Build Inputs - -_No input._ - -### docker.#Build Outputs - -_No output._ - -## docker.#Command - -A container image that can run any docker command - -### docker.#Command Inputs - -_No input._ - -### docker.#Command Outputs - -_No output._ - -## docker.#Load - -Load a docker image into a docker engine - -### docker.#Load Inputs - -_No input._ - -### docker.#Load Outputs - -_No output._ - -## docker.#Pull - -Pull a docker container - -### docker.#Pull Inputs - -_No input._ - -### docker.#Pull Outputs - -_No output._ - -## docker.#Push - -Push a docker image to a remote registry - -### docker.#Push Inputs - -_No input._ - -### docker.#Push Outputs - -_No output._ - -## docker.#Run - -### docker.#Run Inputs - -_No input._ - -### docker.#Run Outputs - -_No output._ diff --git a/docs/reference/docker/compose.md b/docs/reference/docker/compose.md deleted file mode 100644 index 2b949a97..00000000 --- a/docs/reference/docker/compose.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -sidebar_label: compose ---- - -# alpha.dagger.io/docker/compose - -Docker-compose operations - -```cue -import "alpha.dagger.io/docker/compose" -``` - -## compose.#App - -### compose.#App Inputs - -_No input._ - -### compose.#App Outputs - -_No output._ - -## compose.#Client - -A container image to run the docker-compose client - -### compose.#Client Inputs - -_No input._ - -### compose.#Client Outputs - -_No output._ diff --git a/docs/reference/gcp/README.md b/docs/reference/gcp/README.md deleted file mode 100644 index 6dfaee97..00000000 --- a/docs/reference/gcp/README.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -sidebar_label: gcp ---- - -# alpha.dagger.io/gcp - -Google Cloud Platform - -```cue -import "alpha.dagger.io/gcp" -``` - -## gcp.#Config - -Base Google Cloud Config - -### gcp.#Config Inputs - -_No input._ - -### gcp.#Config Outputs - -_No output._ - -## gcp.#GCloud - -Re-usable gcloud component - -### gcp.#GCloud Inputs - -_No input._ - -### gcp.#GCloud Outputs - -_No output._ diff --git a/docs/reference/gcp/cloudrun.md b/docs/reference/gcp/cloudrun.md deleted file mode 100644 index d42022e3..00000000 --- a/docs/reference/gcp/cloudrun.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_label: cloudrun ---- - -# alpha.dagger.io/gcp/cloudrun - -```cue -import "alpha.dagger.io/gcp/cloudrun" -``` - -## cloudrun.#Service - -Service deploys a Cloud Run service based on provided GCR image - -### cloudrun.#Service Inputs - -_No input._ - -### cloudrun.#Service Outputs - -_No output._ diff --git a/docs/reference/gcp/gcr.md b/docs/reference/gcp/gcr.md deleted file mode 100644 index 181d13ee..00000000 --- a/docs/reference/gcp/gcr.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: gcr ---- - -# alpha.dagger.io/gcp/gcr - -Google Container Registry - -```cue -import "alpha.dagger.io/gcp/gcr" -``` - -## gcr.#Credentials - -Credentials retriever for GCR - -### gcr.#Credentials Inputs - -_No input._ - -### gcr.#Credentials Outputs - -_No output._ diff --git a/docs/reference/gcp/gcs.md b/docs/reference/gcp/gcs.md deleted file mode 100644 index 324beaf2..00000000 --- a/docs/reference/gcp/gcs.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: gcs ---- - -# alpha.dagger.io/gcp/gcs - -Google Cloud Storage - -```cue -import "alpha.dagger.io/gcp/gcs" -``` - -## gcs.#Object - -GCS Bucket object(s) sync - -### gcs.#Object Inputs - -_No input._ - -### gcs.#Object Outputs - -_No output._ diff --git a/docs/reference/gcp/gke.md b/docs/reference/gcp/gke.md deleted file mode 100644 index 9a486a04..00000000 --- a/docs/reference/gcp/gke.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: gke ---- - -# alpha.dagger.io/gcp/gke - -Google Kubernetes Engine - -```cue -import "alpha.dagger.io/gcp/gke" -``` - -## gke.#KubeConfig - -KubeConfig config outputs a valid kube-auth-config for kubectl client - -### gke.#KubeConfig Inputs - -_No input._ - -### gke.#KubeConfig Outputs - -_No output._ diff --git a/docs/reference/gcp/secretmanager.md b/docs/reference/gcp/secretmanager.md deleted file mode 100644 index 83068f0e..00000000 --- a/docs/reference/gcp/secretmanager.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_label: secretmanager ---- - -# alpha.dagger.io/gcp/secretmanager - -Google Cloud Secret Manager - -```cue -import "alpha.dagger.io/gcp/secretmanager" -``` - -## secretmanager.#Secrets - -### secretmanager.#Secrets Inputs - -_No input._ - -### secretmanager.#Secrets Outputs - -_No output._ diff --git a/docs/reference/java/maven.md b/docs/reference/java/maven.md deleted file mode 100644 index ffb483c1..00000000 --- a/docs/reference/java/maven.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: maven ---- - -# alpha.dagger.io/java/maven - -Maven is a build automation tool for Java - -```cue -import "alpha.dagger.io/java/maven" -``` - -## maven.#Project - -A Maven project - -### maven.#Project Inputs - -_No input._ - -### maven.#Project Outputs - -_No output._ diff --git a/docs/reference/js/yarn.md b/docs/reference/js/yarn.md deleted file mode 100644 index cffd35cb..00000000 --- a/docs/reference/js/yarn.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: yarn ---- - -# alpha.dagger.io/js/yarn - -Yarn is a package manager for Javascript applications - -```cue -import "alpha.dagger.io/js/yarn" -``` - -## yarn.#Package - -A Yarn package - -### yarn.#Package Inputs - -_No input._ - -### yarn.#Package Outputs - -_No output._ diff --git a/docs/reference/kubernetes/README.md b/docs/reference/kubernetes/README.md deleted file mode 100644 index 928562a8..00000000 --- a/docs/reference/kubernetes/README.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -sidebar_label: kubernetes ---- - -# alpha.dagger.io/kubernetes - -Kubernetes client operations - -```cue -import "alpha.dagger.io/kubernetes" -``` - -## kubernetes.#Kubectl - -Kubectl client - -### kubernetes.#Kubectl Inputs - -_No input._ - -### kubernetes.#Kubectl Outputs - -_No output._ - -## kubernetes.#Resources - -Apply Kubernetes resources - -### kubernetes.#Resources Inputs - -_No input._ - -### kubernetes.#Resources Outputs - -_No output._ diff --git a/docs/reference/kubernetes/helm.md b/docs/reference/kubernetes/helm.md deleted file mode 100644 index 36437197..00000000 --- a/docs/reference/kubernetes/helm.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: helm ---- - -# alpha.dagger.io/kubernetes/helm - -Helm package manager - -```cue -import "alpha.dagger.io/kubernetes/helm" -``` - -## helm.#Chart - -Install a Helm chart - -### helm.#Chart Inputs - -_No input._ - -### helm.#Chart Outputs - -_No output._ diff --git a/docs/reference/kubernetes/kustomize.md b/docs/reference/kubernetes/kustomize.md deleted file mode 100644 index c222d577..00000000 --- a/docs/reference/kubernetes/kustomize.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -sidebar_label: kustomize ---- - -# alpha.dagger.io/kubernetes/kustomize - -Kustomize config management - -```cue -import "alpha.dagger.io/kubernetes/kustomize" -``` - -## kustomize.#Kustomization - -### kustomize.#Kustomization Inputs - -_No input._ - -### kustomize.#Kustomization Outputs - -_No output._ - -## kustomize.#Kustomize - -Apply a Kubernetes Kustomize folder - -### kustomize.#Kustomize Inputs - -_No input._ - -### kustomize.#Kustomize Outputs - -_No output._ From 56ecf7f8cde4e8557b7e597729bfc93029326052 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 16:32:44 -0700 Subject: [PATCH 29/38] Clean up .gitignore files Signed-off-by: Joel Longtine --- .dagger/env/docs/plan/cue.mod/pkg/.gitignore | 1 - cue.mod/pkg/.gitignore | 1 - docs/learn/tests/cue.mod/pkg/.gitignore | 1 - tests/plan/platform/cue.mod/pkg/.gitignore | 1 - tests/tasks/build/cue.mod/pkg/.gitignore | 1 - tests/tasks/hidden/cue.mod/pkg/.gitignore | 1 - tests/tasks/push/cue.mod/pkg/.gitignore | 1 - 7 files changed, 7 deletions(-) diff --git a/.dagger/env/docs/plan/cue.mod/pkg/.gitignore b/.dagger/env/docs/plan/cue.mod/pkg/.gitignore index 331f139d..8e3152ec 100644 --- a/.dagger/env/docs/plan/cue.mod/pkg/.gitignore +++ b/.dagger/env/docs/plan/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger dagger.lock -alpha.dagger.io dagger.io universe.dagger.io \ No newline at end of file diff --git a/cue.mod/pkg/.gitignore b/cue.mod/pkg/.gitignore index 331f139d..8e3152ec 100644 --- a/cue.mod/pkg/.gitignore +++ b/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger dagger.lock -alpha.dagger.io dagger.io universe.dagger.io \ No newline at end of file diff --git a/docs/learn/tests/cue.mod/pkg/.gitignore b/docs/learn/tests/cue.mod/pkg/.gitignore index a572e9ee..f1b0ddfd 100644 --- a/docs/learn/tests/cue.mod/pkg/.gitignore +++ b/docs/learn/tests/cue.mod/pkg/.gitignore @@ -1,2 +1 @@ # dagger universe -alpha.dagger.io diff --git a/tests/plan/platform/cue.mod/pkg/.gitignore b/tests/plan/platform/cue.mod/pkg/.gitignore index d587a7ab..a72db682 100644 --- a/tests/plan/platform/cue.mod/pkg/.gitignore +++ b/tests/plan/platform/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger -alpha.dagger.io dagger.io universe.dagger.io dagger.lock diff --git a/tests/tasks/build/cue.mod/pkg/.gitignore b/tests/tasks/build/cue.mod/pkg/.gitignore index 331f139d..8e3152ec 100644 --- a/tests/tasks/build/cue.mod/pkg/.gitignore +++ b/tests/tasks/build/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger dagger.lock -alpha.dagger.io dagger.io universe.dagger.io \ No newline at end of file diff --git a/tests/tasks/hidden/cue.mod/pkg/.gitignore b/tests/tasks/hidden/cue.mod/pkg/.gitignore index 4e3cac04..ec3af5b0 100644 --- a/tests/tasks/hidden/cue.mod/pkg/.gitignore +++ b/tests/tasks/hidden/cue.mod/pkg/.gitignore @@ -1,4 +1,3 @@ # generated by dagger -alpha.dagger.io dagger.io dagger.lock diff --git a/tests/tasks/push/cue.mod/pkg/.gitignore b/tests/tasks/push/cue.mod/pkg/.gitignore index 331f139d..8e3152ec 100644 --- a/tests/tasks/push/cue.mod/pkg/.gitignore +++ b/tests/tasks/push/cue.mod/pkg/.gitignore @@ -1,5 +1,4 @@ # generated by dagger dagger.lock -alpha.dagger.io dagger.io universe.dagger.io \ No newline at end of file From 80a052afe0b172868be71f9d778490cfbd720074 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 16:36:51 -0700 Subject: [PATCH 30/38] Remove old docs Signed-off-by: Joel Longtine --- docs/reference/alpine.md | 23 ------------ docs/reference/argocd.md | 71 ------------------------------------- docs/reference/bats.md | 19 ---------- docs/reference/git.md | 69 ----------------------------------- docs/reference/go.md | 57 ----------------------------- docs/reference/graphql.md | 19 ---------- docs/reference/http.md | 71 ------------------------------------- docs/reference/io.md | 71 ------------------------------------- docs/reference/netlify.md | 35 ------------------ docs/reference/os.md | 55 ---------------------------- docs/reference/random.md | 23 ------------ docs/reference/terraform.md | 23 ------------ docs/reference/trivy.md | 45 ----------------------- 13 files changed, 581 deletions(-) delete mode 100644 docs/reference/alpine.md delete mode 100644 docs/reference/argocd.md delete mode 100644 docs/reference/bats.md delete mode 100644 docs/reference/git.md delete mode 100644 docs/reference/go.md delete mode 100644 docs/reference/graphql.md delete mode 100644 docs/reference/http.md delete mode 100644 docs/reference/io.md delete mode 100644 docs/reference/netlify.md delete mode 100644 docs/reference/os.md delete mode 100644 docs/reference/random.md delete mode 100644 docs/reference/terraform.md delete mode 100644 docs/reference/trivy.md diff --git a/docs/reference/alpine.md b/docs/reference/alpine.md deleted file mode 100644 index 7c2e6df8..00000000 --- a/docs/reference/alpine.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: alpine ---- - -# alpha.dagger.io/alpine - -Base package for Alpine Linux - -```cue -import "alpha.dagger.io/alpine" -``` - -## alpine.#Image - -Base image for Alpine Linux - -### alpine.#Image Inputs - -_No input._ - -### alpine.#Image Outputs - -_No output._ diff --git a/docs/reference/argocd.md b/docs/reference/argocd.md deleted file mode 100644 index 9b4e9c5f..00000000 --- a/docs/reference/argocd.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_label: argocd ---- - -# alpha.dagger.io/argocd - -ArgoCD client operations - -```cue -import "alpha.dagger.io/argocd" -``` - -## argocd.#App - -Create an ArgoCD application - -### argocd.#App Inputs - -_No input._ - -### argocd.#App Outputs - -_No output._ - -## argocd.#CLI - -Re-usable CLI component - -### argocd.#CLI Inputs - -_No input._ - -### argocd.#CLI Outputs - -_No output._ - -## argocd.#Config - -ArgoCD configuration - -### argocd.#Config Inputs - -_No input._ - -### argocd.#Config Outputs - -_No output._ - -## argocd.#Status - -Get application's status - -### argocd.#Status Inputs - -_No input._ - -### argocd.#Status Outputs - -_No output._ - -## argocd.#Sync - -Sync an application to its target state - -### argocd.#Sync Inputs - -_No input._ - -### argocd.#Sync Outputs - -_No output._ diff --git a/docs/reference/bats.md b/docs/reference/bats.md deleted file mode 100644 index 15f48449..00000000 --- a/docs/reference/bats.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -sidebar_label: bats ---- - -# alpha.dagger.io/bats - -```cue -import "alpha.dagger.io/bats" -``` - -## bats.#Bats - -### bats.#Bats Inputs - -_No input._ - -### bats.#Bats Outputs - -_No output._ diff --git a/docs/reference/git.md b/docs/reference/git.md deleted file mode 100644 index 145e2bdb..00000000 --- a/docs/reference/git.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -sidebar_label: git ---- - -# alpha.dagger.io/git - -Git operations - -```cue -import "alpha.dagger.io/git" -``` - -## git.#Commit - -Commit & push to git repository - -### git.#Commit Inputs - -_No input._ - -### git.#Commit Outputs - -_No output._ - -## git.#CurrentBranch - -Get the name of the current checked out branch or tag - -### git.#CurrentBranch Inputs - -_No input._ - -### git.#CurrentBranch Outputs - -_No output._ - -## git.#Image - -### git.#Image Inputs - -_No input._ - -### git.#Image Outputs - -_No output._ - -## git.#Repository - -A git repository - -### git.#Repository Inputs - -_No input._ - -### git.#Repository Outputs - -_No output._ - -## git.#Tags - -List tags of a repository - -### git.#Tags Inputs - -_No input._ - -### git.#Tags Outputs - -_No output._ diff --git a/docs/reference/go.md b/docs/reference/go.md deleted file mode 100644 index 5a5edc02..00000000 --- a/docs/reference/go.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_label: go ---- - -# alpha.dagger.io/go - -Go build operations - -```cue -import "alpha.dagger.io/go" -``` - -## go.#Build - -Go application builder - -### go.#Build Inputs - -_No input._ - -### go.#Build Outputs - -_No output._ - -## go.#Container - -A standalone go environment - -### go.#Container Inputs - -_No input._ - -### go.#Container Outputs - -_No output._ - -## go.#Go - -Re-usable component for the Go compiler - -### go.#Go Inputs - -_No input._ - -### go.#Go Outputs - -_No output._ - -## go.#Test - -### go.#Test Inputs - -_No input._ - -### go.#Test Outputs - -_No output._ diff --git a/docs/reference/graphql.md b/docs/reference/graphql.md deleted file mode 100644 index 671863d2..00000000 --- a/docs/reference/graphql.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -sidebar_label: graphql ---- - -# alpha.dagger.io/graphql - -```cue -import "alpha.dagger.io/graphql" -``` - -## graphql.#Query - -### graphql.#Query Inputs - -_No input._ - -### graphql.#Query Outputs - -_No output._ diff --git a/docs/reference/http.md b/docs/reference/http.md deleted file mode 100644 index b35d3276..00000000 --- a/docs/reference/http.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_label: http ---- - -# alpha.dagger.io/http - -```cue -import "alpha.dagger.io/http" -``` - -## http.#Delete - -### http.#Delete Inputs - -_No input._ - -### http.#Delete Outputs - -_No output._ - -## http.#Do - -### http.#Do Inputs - -_No input._ - -### http.#Do Outputs - -_No output._ - -## http.#Get - -### http.#Get Inputs - -_No input._ - -### http.#Get Outputs - -_No output._ - -## http.#Post - -### http.#Post Inputs - -_No input._ - -### http.#Post Outputs - -_No output._ - -## http.#Put - -### http.#Put Inputs - -_No input._ - -### http.#Put Outputs - -_No output._ - -## http.#Wait - -URL listener Creates a dependency on URL - -### http.#Wait Inputs - -_No input._ - -### http.#Wait Outputs - -_No output._ diff --git a/docs/reference/io.md b/docs/reference/io.md deleted file mode 100644 index 84bf2422..00000000 --- a/docs/reference/io.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_label: io ---- - -# alpha.dagger.io/io - -IO operations - -```cue -import "alpha.dagger.io/io" -``` - -## io.#Dir - -Standard interface for directory operations in cue - -### io.#Dir Inputs - -_No input._ - -### io.#Dir Outputs - -_No output._ - -## io.#File - -Standard interface for file operations in cue - -### io.#File Inputs - -_No input._ - -### io.#File Outputs - -_No output._ - -## io.#ReadWriter - -Standard ReadWriter interface - -### io.#ReadWriter Inputs - -_No input._ - -### io.#ReadWriter Outputs - -_No output._ - -## io.#Reader - -Standard Reader interface - -### io.#Reader Inputs - -_No input._ - -### io.#Reader Outputs - -_No output._ - -## io.#Writer - -Standard Writer interface - -### io.#Writer Inputs - -_No input._ - -### io.#Writer Outputs - -_No output._ diff --git a/docs/reference/netlify.md b/docs/reference/netlify.md deleted file mode 100644 index c427da73..00000000 --- a/docs/reference/netlify.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -sidebar_label: netlify ---- - -# alpha.dagger.io/netlify - -Netlify client operations - -```cue -import "alpha.dagger.io/netlify" -``` - -## netlify.#Account - -Netlify account credentials - -### netlify.#Account Inputs - -_No input._ - -### netlify.#Account Outputs - -_No output._ - -## netlify.#Site - -Netlify site - -### netlify.#Site Inputs - -_No input._ - -### netlify.#Site Outputs - -_No output._ diff --git a/docs/reference/os.md b/docs/reference/os.md deleted file mode 100644 index 9a37823b..00000000 --- a/docs/reference/os.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -sidebar_label: os ---- - -# alpha.dagger.io/os - -OS operations - -```cue -import "alpha.dagger.io/os" -``` - -## os.#Container - -Built-in container implementation, using buildkit - -### os.#Container Inputs - -_No input._ - -### os.#Container Outputs - -_No output._ - -## os.#Dir - -### os.#Dir Inputs - -_No input._ - -### os.#Dir Outputs - -_No output._ - -## os.#File - -Built-in file implementation, using buildkit A single file - -### os.#File Inputs - -_No input._ - -### os.#File Outputs - -_No output._ - -## os.#ReadDir - -### os.#ReadDir Inputs - -_No input._ - -### os.#ReadDir Outputs - -_No output._ diff --git a/docs/reference/random.md b/docs/reference/random.md deleted file mode 100644 index c994cea9..00000000 --- a/docs/reference/random.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: random ---- - -# alpha.dagger.io/random - -Random generation utilities - -```cue -import "alpha.dagger.io/random" -``` - -## random.#String - -Generate a random string - -### random.#String Inputs - -_No input._ - -### random.#String Outputs - -_No output._ diff --git a/docs/reference/terraform.md b/docs/reference/terraform.md deleted file mode 100644 index 9c582ffb..00000000 --- a/docs/reference/terraform.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: terraform ---- - -# alpha.dagger.io/terraform - -Terraform operations - -```cue -import "alpha.dagger.io/terraform" -``` - -## terraform.#Configuration - -Terraform configuration - -### terraform.#Configuration Inputs - -_No input._ - -### terraform.#Configuration Outputs - -_No output._ diff --git a/docs/reference/trivy.md b/docs/reference/trivy.md deleted file mode 100644 index 0d1158f1..00000000 --- a/docs/reference/trivy.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -sidebar_label: trivy ---- - -# alpha.dagger.io/trivy - -```cue -import "alpha.dagger.io/trivy" -``` - -## trivy.#CLI - -Re-usable CLI component - -### trivy.#CLI Inputs - -_No input._ - -### trivy.#CLI Outputs - -_No output._ - -## trivy.#Config - -Trivy Configuration - -### trivy.#Config Inputs - -_No input._ - -### trivy.#Config Outputs - -_No output._ - -## trivy.#Image - -Scan an Image - -### trivy.#Image Inputs - -_No input._ - -### trivy.#Image Outputs - -_No output._ From bf691418d16aaa559c5e01284a4c22102e40adb0 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 17:02:37 -0700 Subject: [PATCH 31/38] Remove old universe target in Makefile Signed-off-by: Joel Longtine --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7cc1c48d..ad5c733d 100644 --- a/Makefile +++ b/Makefile @@ -59,13 +59,13 @@ core-integration: dagger-debug # Run core integration tests yarn --cwd "./tests" install DAGGER_BINARY="$(shell pwd)/cmd/dagger/dagger-debug" yarn --cwd "./tests" test +# .PHONY: universe-test +# universe-test: dagger-debug # Run universe tests +# yarn --cwd "./universe" install +# DAGGER_BINARY="$(shell pwd)/cmd/dagger/dagger-debug" yarn --cwd "./universe" test + .PHONY: universe-test universe-test: dagger-debug # Run universe tests - yarn --cwd "./universe" install - DAGGER_BINARY="$(shell pwd)/cmd/dagger/dagger-debug" yarn --cwd "./universe" test - -.PHONY: europa-universe-test -europa-universe-test: dagger-debug # Run Europa universe tests yarn --cwd "./pkg/universe.dagger.io" install DAGGER_BINARY="$(shell pwd)/cmd/dagger/dagger-debug" yarn --cwd "./pkg/universe.dagger.io" test From f939c81faffa9f6a931ea5f3f389264aeb03bed1 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 17:04:19 -0700 Subject: [PATCH 32/38] Use the correct target in the Makefile for Europa Signed-off-by: Joel Longtine --- .github/workflows/test-universe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-universe.yml b/.github/workflows/test-universe.yml index 2546d357..b3566fa4 100644 --- a/.github/workflows/test-universe.yml +++ b/.github/workflows/test-universe.yml @@ -58,4 +58,4 @@ jobs: DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-universe" DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-universe" run: | - make europa-universe-test + make universe-test From 77660fb8325d3e9ac81c20ba8ce39c817bac0b81 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Tue, 22 Feb 2022 09:50:47 -0700 Subject: [PATCH 33/38] Remove .dagger folder Signed-off-by: Joel Longtine --- .dagger/env/dev/.gitignore | 2 - .dagger/env/dev/plan/main.cue | 61 -------------------- .dagger/env/dev/values.yaml | 26 --------- .dagger/env/docs/.gitignore | 2 - .dagger/env/docs/plan/cue.mod/module.cue | 1 - .dagger/env/docs/plan/cue.mod/pkg/.gitignore | 4 -- .dagger/env/docs/plan/main.cue | 30 ---------- .dagger/env/docs/values.yaml | 39 ------------- 8 files changed, 165 deletions(-) delete mode 100644 .dagger/env/dev/.gitignore delete mode 100644 .dagger/env/dev/plan/main.cue delete mode 100644 .dagger/env/dev/values.yaml delete mode 100644 .dagger/env/docs/.gitignore delete mode 100644 .dagger/env/docs/plan/cue.mod/module.cue delete mode 100644 .dagger/env/docs/plan/cue.mod/pkg/.gitignore delete mode 100644 .dagger/env/docs/plan/main.cue delete mode 100644 .dagger/env/docs/values.yaml diff --git a/.dagger/env/dev/.gitignore b/.dagger/env/dev/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/.dagger/env/dev/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/.dagger/env/dev/plan/main.cue b/.dagger/env/dev/plan/main.cue deleted file mode 100644 index dbc5dfc7..00000000 --- a/.dagger/env/dev/plan/main.cue +++ /dev/null @@ -1,61 +0,0 @@ -// A dagger workflow to develop dagger -package main - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/os" - "alpha.dagger.io/go" -) - -// Dagger source code -source: dagger.#Artifact @dagger(input) - -test: { - // Go unit tests - unit: { - logs: (os.#File & { - from: build.ctr - path: "/test.log" - read: format: "string" - }).read.data - } - - // Full suite of bats integration tests - integration: { - // FIXME - } -} - -// Build the dagger binaries -build: { - ctr: go.#Container & { - "source": source - setup: [ - "apk add --no-cache file", - ] - command: """ - go test -v ./... > /test.log - go build -o /binaries/ ./cmd/... > /build.log - """ - } - - binaries: os.#Dir & { - from: ctr - path: "/binaries" - } - - logs: (os.#File & { - from: ctr - path: "/build.log" - read: format: "string" - }).read.data -} - -// Execute `dagger help` -usage: os.#Container & { - command: "dagger help" - - let binpath = "/usr/local/dagger/bin" - mount: "\(binpath)": from: build.binaries - shell: search: "\(binpath)": true -} diff --git a/.dagger/env/dev/values.yaml b/.dagger/env/dev/values.yaml deleted file mode 100644 index 78b088a7..00000000 --- a/.dagger/env/dev/values.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: dev -inputs: - source: - dir: - path: . - include: [] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1ez5phfa2l6e9fqt4nnem734jajg4nlcefhv3ydeltzjlele47ags34868h - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4c0xSL1hJZmtsejN0dGpM - OCtpNFdLK0ZUdlc2YXBQV1RaazFpcERSOG5BClZzZGR3YllQODk5dGp5akpxVkhM - YUFxODJVeG1XbHl1WEVmNkMwREdldkkKLS0tIGNDVzNkak9UMnVyQkRHN3Q0TjZz - TWhsS0NUcU5ac0YrQjdmM0dlcEdRYWMKqUO/A83KsECVW+hSgVLTkIuK11VX3T77 - fBSXL9D+riW9Q/TCKP0uMVulGnqZF4OoHAzLCug7aV6AEszpeSWyjg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-05-25T00:31:59Z" - mac: ENC[AES256_GCM,data:CMrCKRLDHc/o18zlVc/nwin1d14y2ruhk4i3mL/jtzDVeXDusJpelcgYAsNvKdhXU1v/gl1P4fINzQ4zc6t3krWW80UQFXBSZ1c2EJThKzVQfKFOwr3Fg3FyTm3zeX9Lk4e8z1SFmBj08k3jxr1xtdKwPKLmYN8e37cOy0bT97c=,iv:ffvYUpDxFLCyCynEVkFkBHCsp4HzLFcabiSjuCM0r40=,tag:ZwjW3qB8XcIvF+GoHjsbaQ==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 diff --git a/.dagger/env/docs/.gitignore b/.dagger/env/docs/.gitignore deleted file mode 100644 index 01ec19b0..00000000 --- a/.dagger/env/docs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# dagger state -state/** diff --git a/.dagger/env/docs/plan/cue.mod/module.cue b/.dagger/env/docs/plan/cue.mod/module.cue deleted file mode 100644 index f8af9cef..00000000 --- a/.dagger/env/docs/plan/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "" diff --git a/.dagger/env/docs/plan/cue.mod/pkg/.gitignore b/.dagger/env/docs/plan/cue.mod/pkg/.gitignore deleted file mode 100644 index 8e3152ec..00000000 --- a/.dagger/env/docs/plan/cue.mod/pkg/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# generated by dagger -dagger.lock -dagger.io -universe.dagger.io \ No newline at end of file diff --git a/.dagger/env/docs/plan/main.cue b/.dagger/env/docs/plan/main.cue deleted file mode 100644 index e5a100f8..00000000 --- a/.dagger/env/docs/plan/main.cue +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "alpha.dagger.io/dagger" - "alpha.dagger.io/js/yarn" - "alpha.dagger.io/netlify" -) - -// dagger repository -repository: dagger.#Artifact @dagger(input) - -// Build the docs website -docs: yarn.#Package & { - source: repository - cwd: "website/" - buildDir: "website/build" - env: { - OAUTH_ENABLE: "true" - REACT_APP_OAUTH_SCOPE: "user:email" - REACT_APP_GITHUB_AUTHORIZE_URI: "https://github.com/login/oauth/authorize?client_id=${REACT_APP_CLIENT_ID}&scope=${REACT_APP_OAUTH_SCOPE}&allow_signup=false" - REACT_APP_DAGGER_SITE_URI: "https://dagger.io" - REACT_APP_API_PROXY_ENABLE: "true" - } -} - -// Deploy the docs website -site: netlify.#Site & { - name: string | *"docs-dagger-io" @dagger(input) - contents: docs.build -} diff --git a/.dagger/env/docs/values.yaml b/.dagger/env/docs/values.yaml deleted file mode 100644 index b906c082..00000000 --- a/.dagger/env/docs/values.yaml +++ /dev/null @@ -1,39 +0,0 @@ -plan: - module: .dagger/env/docs/plan -name: docs -inputs: - docs.env.REACT_APP_CLIENT_ID: - text: 1a6d02cb59199eb205ef - docs.env.REACT_APP_CLIENT_SECRET: - text: 47a1a67abc8d3fe9edb829a6c7775fbad47f47bb - repository: - dir: - path: . - exclude: - - '**/node_modules' - - cmd/dagger/dagger - - cmd/dagger/dagger-debug - site.account.name: - text: blocklayer - site.account.token: - secret: ENC[AES256_GCM,data:jPJ8N6cAmtYnQh2SyhM9bQGfkhz777S4fyPDm2YhujwgXH6EogN2Uyw6Ew==,iv:gDchoJYLdQ8IPxrUUIsQ9s2f12JOhh7p573DwOIV2zE=,tag:okatHyjVGPGNOt+aw4iUHg==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBaZVVuYThsYk9YcWhYb0g4 - TDhZQ21YN0FCRExKV2tqbVVUNTg5MWRUVUJzCndjc28yVUZEK3ZoQzVDQkk4emZQ - WGx2bUxSZlBENXlibzQ1MVkvc2I2MVkKLS0tIFJKS0ZENFhuVmdUM2h1a2xrK01a - ejRKQXNFZzBTbUxpc05acnkxQ2U2UkEKX1byNj64xOiRGAJ9lwh55d/mlasI3H6H - b+o3HbXSbV0G0UwQxEOisntR6o27ry/l12ai/sOQ4f9MXm6FRw2XTg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2021-06-18T14:46:35Z" - mac: ENC[AES256_GCM,data:RX4rZSP2sMqSGfbSkpK1rAqLcpYHv99jUvhGpQvM9Sjxki4LskxQP51BuZj7eVD0u0uqBMObatyZvofTybld6tlrgQeddIS4SINRJNsC+P7dzaiOEePZX/oCCMIQCnO8+OLO7z6DNdy1IMxhuCZWeGHDJt1ritLds3ACAjtFrGo=,iv:AI8tdLTFnFV919ypY0RKVaDNfwEN6b5hZuH4DvlhdAk=,tag:izIPuozRiYpQ50hi4yLyCw==,type:str] - pgp: [] - encrypted_suffix: secret - version: 3.7.1 From e63b74b08ea183d309370107113e1630767b3594 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Tue, 22 Feb 2022 12:55:51 -0700 Subject: [PATCH 34/38] Remove commented pre-Europa pipelines code Signed-off-by: Joel Longtine --- plan/task/task.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plan/task/task.go b/plan/task/task.go index 2379f597..408253a7 100644 --- a/plan/task/task.go +++ b/plan/task/task.go @@ -60,11 +60,6 @@ func New(typ string) Task { } func Lookup(v *compiler.Value) (Task, error) { - // FIXME: legacy pipelines - // if environment.IsComponent(v) { - // return New("#up"), nil - // } - if v.Kind() != cue.StructKind { return nil, ErrNotTask } From 2caccc69e8f4aa5475ef494f99e21f484ef75b20 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Tue, 22 Feb 2022 13:01:54 -0700 Subject: [PATCH 35/38] Add TODO for Europa conversion Signed-off-by: Joel Longtine --- tests/plan/hello-europa/main.cue | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/plan/hello-europa/main.cue b/tests/plan/hello-europa/main.cue index a30f5dac..62ea2ea4 100644 --- a/tests/plan/hello-europa/main.cue +++ b/tests/plan/hello-europa/main.cue @@ -7,6 +7,7 @@ import ( dagger.#Plan & { actions: { + // TODO/FIXME: Use Europa constructs for this // sayHello: os.#Container & { // command: "echo Hello Europa! > /out.txt" // } From 70c0f362eaf80247b5728a7e87a57ff2e29cef19 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Tue, 22 Feb 2022 13:21:32 -0700 Subject: [PATCH 36/38] Update plan tests to use Europa constructs Signed-off-by: Joel Longtine --- tests/plan.bats | 22 ++++++++---------- tests/plan/hello-europa/main.cue | 20 ++++++++++++---- tests/plan/proxy/incomplete_service.cue | 31 ++++++++++++++----------- tests/plan/proxy/incomplete_unix.cue | 31 ++++++++++++++----------- tests/plan/proxy/invalid_schema.cue | 31 ++++++++++++++----------- tests/plan/proxy/invalid_value.cue | 31 ++++++++++++++----------- tests/plan/proxy/unix.cue | 31 ++++++++++++++----------- 7 files changed, 115 insertions(+), 82 deletions(-) diff --git a/tests/plan.bats b/tests/plan.bats index 6c60fca7..2dde8f75 100644 --- a/tests/plan.bats +++ b/tests/plan.bats @@ -16,12 +16,11 @@ setup() { assert_failure } -# TODO/FIXME: this test is broken, it's not asserting that the proxy is not running -# @test "plan/proxy invalid value" { -# cd "$TESTDIR" -# run "$DAGGER" up ./plan/proxy/invalid_value.cue -# assert_failure -# } +@test "plan/proxy invalid value" { + cd "$TESTDIR" + run "$DAGGER" up ./plan/proxy/invalid_value.cue + assert_failure +} @test "plan/proxy incomplete unix" { cd "$TESTDIR" @@ -29,12 +28,11 @@ setup() { assert_failure } -# TODO/FIXME: this test is broken, it's not asserting that the proxy is not running -# @test "plan/proxy incomplete service" { -# cd "$TESTDIR" -# run "$DAGGER" up ./plan/proxy/incomplete_service.cue -# assert_output --partial "pipeline was partially executed because of missing inputs" -# } +@test "plan/proxy incomplete service" { + cd "$TESTDIR" + run "$DAGGER" up ./plan/proxy/incomplete_service.cue + assert_output --partial 'mount "docker" is not concrete' +} @test "plan/proxy unix" { cd "$TESTDIR" diff --git a/tests/plan/hello-europa/main.cue b/tests/plan/hello-europa/main.cue index 62ea2ea4..0ae85271 100644 --- a/tests/plan/hello-europa/main.cue +++ b/tests/plan/hello-europa/main.cue @@ -7,11 +7,21 @@ import ( dagger.#Plan & { actions: { - // TODO/FIXME: Use Europa constructs for this - // sayHello: os.#Container & { - // command: "echo Hello Europa! > /out.txt" - // } + image: dagger.#Pull & { + source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + } - // verify: "Hello Europa!\n" & (os.#File & {from: sayHello, path: "/out.txt"}).contents + exec: dagger.#Exec & { + input: image.output + args: ["sh", "-c", "echo -n Hello Europa > /out.txt"] + } + + verify: dagger.#ReadFile & { + input: exec.output + path: "/out.txt" + } & { + // assert result + contents: "Hello Europa" + } } } diff --git a/tests/plan/proxy/incomplete_service.cue b/tests/plan/proxy/incomplete_service.cue index 70b9c037..8b5d683b 100644 --- a/tests/plan/proxy/incomplete_service.cue +++ b/tests/plan/proxy/incomplete_service.cue @@ -10,18 +10,23 @@ dagger.#Plan & { // should fail due to incomplete service proxy: dockerSocket: {} - // TODO/FIXME: Use Europa constructs for this - // actions: test: #up: [ - // op.#Load & { - // from: alpine.#Image & { - // package: "docker-cli": true - // } - // }, + actions: { + image: dagger.#Pull & { + source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + } - // op.#Exec & { - // always: true - // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - // args: ["docker", "info"] - // }, - // ] + imageWithDocker: dagger.#Exec & { + input: image.output + args: ["apk", "add", "--no-cache", "docker-cli"] + } + + verify: dagger.#Exec & { + input: imageWithDocker.output + mounts: docker: { + dest: "/var/run/docker.sock" + contents: proxy.dockerSocket.service + } + args: ["docker", "info"] + } + } } diff --git a/tests/plan/proxy/incomplete_unix.cue b/tests/plan/proxy/incomplete_unix.cue index 6bd26f4c..cf7fd1ea 100644 --- a/tests/plan/proxy/incomplete_unix.cue +++ b/tests/plan/proxy/incomplete_unix.cue @@ -10,18 +10,23 @@ dagger.#Plan & { // should fail because incomplete value proxy: dockerSocket: unix: string - // TODO/FIXME: Use Europa constructs for this - // actions: test: #up: [ - // op.#Load & { - // from: alpine.#Image & { - // package: "docker-cli": true - // } - // }, + actions: { + image: dagger.#Pull & { + source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + } - // op.#Exec & { - // always: true - // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - // args: ["docker", "info"] - // }, - // ] + imageWithDocker: dagger.#Exec & { + input: image.output + args: ["apk", "add", "--no-cache", "docker-cli"] + } + + verify: dagger.#Exec & { + input: imageWithDocker.output + mounts: docker: { + dest: "/var/run/docker.sock" + contents: proxy.dockerSocket.service + } + args: ["docker", "info"] + } + } } diff --git a/tests/plan/proxy/invalid_schema.cue b/tests/plan/proxy/invalid_schema.cue index b49096c3..c1756b8c 100644 --- a/tests/plan/proxy/invalid_schema.cue +++ b/tests/plan/proxy/invalid_schema.cue @@ -10,18 +10,23 @@ dagger.#Plan & { // should fail because of misspelled key proxy: dockerSocket: unx: "/var/run/docker.sock" - // TODO/FIXME: Use Europa constructs for this - // actions: test: #up: [ - // op.#Load & { - // from: alpine.#Image & { - // package: "docker-cli": true - // } - // }, + actions: { + image: dagger.#Pull & { + source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + } - // op.#Exec & { - // always: true - // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - // args: ["docker", "info"] - // }, - // ] + imageWithDocker: dagger.#Exec & { + input: image.output + args: ["apk", "add", "--no-cache", "docker-cli"] + } + + verify: dagger.#Exec & { + input: imageWithDocker.output + mounts: docker: { + dest: "/var/run/docker.sock" + contents: proxy.dockerSocket.service + } + args: ["docker", "info"] + } + } } diff --git a/tests/plan/proxy/invalid_value.cue b/tests/plan/proxy/invalid_value.cue index f6897084..5a4dc253 100644 --- a/tests/plan/proxy/invalid_value.cue +++ b/tests/plan/proxy/invalid_value.cue @@ -10,18 +10,23 @@ dagger.#Plan & { // should fail because of misspelled value proxy: dockerSocket: unix: "/var/run/docker.soc" - // TODO/FIXME: Use Europa constructs for this - // actions: test: #up: [ - // op.#Load & { - // from: alpine.#Image & { - // package: "docker-cli": true - // } - // }, + actions: { + image: dagger.#Pull & { + source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + } - // op.#Exec & { - // always: true - // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - // args: ["docker", "info"] - // }, - // ] + imageWithDocker: dagger.#Exec & { + input: image.output + args: ["apk", "add", "--no-cache", "docker-cli"] + } + + verify: dagger.#Exec & { + input: imageWithDocker.output + mounts: docker: { + dest: "/var/run/docker.sock" + contents: proxy.dockerSocket.service + } + args: ["docker", "info"] + } + } } diff --git a/tests/plan/proxy/unix.cue b/tests/plan/proxy/unix.cue index 0f69796a..47a40c2d 100644 --- a/tests/plan/proxy/unix.cue +++ b/tests/plan/proxy/unix.cue @@ -10,18 +10,23 @@ dagger.#Plan & { // should succeed proxy: dockerSocket: unix: "/var/run/docker.sock" - // TODO/FIXME: Use Europa constructs for this - // actions: test: #up: [ - // op.#Load & { - // from: alpine.#Image & { - // package: "docker-cli": true - // } - // }, + actions: { + image: dagger.#Pull & { + source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + } - // op.#Exec & { - // always: true - // mount: "/var/run/docker.sock": stream: proxy.dockerSocket.service - // args: ["docker", "info"] - // }, - // ] + imageWithDocker: dagger.#Exec & { + input: image.output + args: ["apk", "add", "--no-cache", "docker-cli"] + } + + verify: dagger.#Exec & { + input: imageWithDocker.output + mounts: docker: { + dest: "/var/run/docker.sock" + contents: proxy.dockerSocket.service + } + args: ["docker", "info"] + } + } } From f34f1d96c146a94b7620fbf018bed8aa5343341a Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Tue, 22 Feb 2022 20:33:17 -0700 Subject: [PATCH 37/38] Add code (commented) back to doc gen. Probably needs to be reworked for Europa Signed-off-by: Joel Longtine --- cmd/dagger/cmd/doc.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/cmd/dagger/cmd/doc.go b/cmd/dagger/cmd/doc.go index d4198578..2b42d765 100644 --- a/cmd/dagger/cmd/doc.go +++ b/cmd/dagger/cmd/doc.go @@ -307,6 +307,48 @@ func walkStdlib(ctx context.Context, output, format string) { lg.Info().Str("output", output).Msg("generating stdlib") packages := map[string]*Package{} + // TODO: Does this need to be re-worked for Europa? + // err := fs.WalkDir(pkg.FS, pkg.AlphaModule, func(p string, d fs.DirEntry, err error) error { + // if err != nil { + // return err + // } + + // // Ignore useless embedded files + // if p == "." || d.Name() == pkg.AlphaModule || !d.IsDir() || d.Name() == "cue.mod" || + // strings.Contains(p, "cue.mod") || strings.Contains(p, "tests") { + // return nil + // } + + // p = strings.TrimPrefix(p, pkg.AlphaModule+"/") + + // // Ignore tests directories + // if d.Name() == "tests" { + // return nil + // } + + // pkgName := fmt.Sprintf("%s/%s", pkg.AlphaModule, p) + // lg.Info().Str("package", pkgName).Str("format", format).Msg("generating doc") + // val, err := loadCode(pkgName) + // if err != nil { + // if strings.Contains(err.Error(), "no CUE files") { + // lg.Warn().Str("package", p).Err(err).Msg("ignoring") + // return nil + // } + // if strings.Contains(err.Error(), "cannot find package") { + // lg.Warn().Str("package", p).Err(err).Msg("ignoring") + // return nil + // } + // return err + // } + + // pkg := Parse(ctx, pkgName, val) + // packages[p] = pkg + // return nil + // }) + + // if err != nil { + // lg.Fatal().Err(err).Msg("cannot generate stdlib doc") + // } hasSubPackages := func(name string) bool { for p := range packages { From cc9c9f6b95ad6f8fef0275797f82774a41d8856d Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Tue, 22 Feb 2022 20:35:50 -0700 Subject: [PATCH 38/38] Re-add old code (commented) Signed-off-by: Joel Longtine --- cmd/dagger/cmd/doc.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cmd/dagger/cmd/doc.go b/cmd/dagger/cmd/doc.go index 2b42d765..eec237e9 100644 --- a/cmd/dagger/cmd/doc.go +++ b/cmd/dagger/cmd/doc.go @@ -54,6 +54,23 @@ type Package struct { func Parse(ctx context.Context, packageName string, val *compiler.Value) *Package { lg := log.Ctx(ctx) + // parseValues := func(field string, values []*compiler.Value) []Value { + // val := []Value{} + + // for _, i := range values { + // v := Value{} + // v.Name = strings.TrimPrefix( + // i.Path().String(), + // field+".", + // ) + // v.Type = common.FormatValue(i) + // v.Description = common.ValueDocOneLine(i) + // val = append(val, v) + // } + + // return val + // } + fields, err := val.Fields(cue.Definitions(true)) if err != nil { lg.Fatal().Err(err).Msg("cannot get fields")