Commit Graph

313 Commits

Author SHA1 Message Date
Tom Chauveau
51fe199a39 Update doc generator to ignore tests directory
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-06-25 17:00:38 +02:00
Andrea Luzzardi
ecb53566e6 cmd doc: skip cue.mod
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-25 16:21:42 +02:00
Solomon Hykes
d7a805f42b stdlib: move all imports to alpha.dagger.io
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2021-06-25 10:31:22 +00:00
Sam Alba
af82c2c910 docs: adds package description to the stdlib Index
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-23 11:05:58 +02:00
Sam Alba
b03e695970 docs: stdlib index sorted alphabetically
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-23 10:53:37 +02:00
Sam Alba
6ff2fed960 cmd/doc: add support for generating package index
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-23 10:53:37 +02:00
Andrea Luzzardi
687c0e33a4 keychain: always ensure the default key is generated
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-17 17:23:11 +02:00
Andrea Luzzardi
b393ecc034 cleanup workspace interface
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-16 18:58:56 +02:00
Andrea Luzzardi
f39a88e644 cue native: environments can reference a module instead of embedding
one.

Fixes #631

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-16 18:58:56 +02:00
Andrea Luzzardi
5f849bb13e cmd: dagger input edit -> dagger edit
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-16 18:58:56 +02:00
Sam Alba
776814910d cmd/doc: added import path + better titles for package fields
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-16 12:14:26 +02:00
Andrea Luzzardi
12b712b741 docs generation: write package doc as README.md if there are sub-packages
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-09 18:42:23 -07:00
Andrea Luzzardi
ee8bcfafaa doc generation: refactor to allow multi-stage processing
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-09 18:42:10 -07:00
Andrea Luzzardi
fb3e5bbd43 input edit: allow renaming the environment
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-09 11:34:51 -07:00
Andrea Luzzardi
606398b69a docs: don't create docs file for empty packages
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-08 18:33:39 -07:00
Andrea Luzzardi
b53e2136b7 cmd docs: add frontmatter metadata
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-08 18:29:02 -07:00
Andrea Luzzardi
de3ffe0610 cmd docs: fix markdown linter
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-08 18:10:01 -07:00
Sam Alba
a7f4cd069f cmd/output: do not display cue code when value is a struct
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-07 13:27:40 +02:00
Sam Alba
1bfb8d4369 cmd/doc: fixed outputs label
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-07 11:53:03 +02:00
Sam Alba
669a47a159 cmd/doc: implemented stdlib walk
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-04 16:33:02 +02:00
Sam Alba
3b92f70416 cmd/doc: added support for json
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-04 09:01:32 +02:00
Sam Alba
dd8aae893c cmd/doc: added support for markdown
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-04 09:01:32 +02:00
Sam Alba
92d993f434 cmd/doc: added support for text format
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-04 09:01:32 +02:00
Sam Alba
8c3c934f3c doc: finished structure, supports title
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-04 09:01:32 +02:00
Sam Alba
7b4421b9a0 cmd/doc: boiler plate and for inputs / outputs scanning
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-04 09:01:32 +02:00
Sam Alba
66929f8a63 compiler.Value abstraction for docstring and incompletekind
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-04 09:01:32 +02:00
Andrea Luzzardi
14a83a0680
Merge pull request #530 from samalba/env-outputs
Support Outputs list
2021-06-01 19:47:47 -07:00
Andrea Luzzardi
413dec63a0
Merge pull request #529 from grouville/dagger_compute-out_of_bound
dagger compute out-of-bound
2021-06-01 13:29:34 -07:00
Andrea Luzzardi
e86cb7be6d
Merge pull request #535 from aluzzardi/dagger-homedir
use ~/.config/dagger rather than ~/.dagger
2021-06-01 13:23:43 -07:00
Andrea Luzzardi
c5c586ff71 use ~/.config/dagger rather than ~/.dagger
since `.dagger` directories have a special meaning now because of gitflow,
it's better not to have a `~/.dagger` since it's not a workspace and
it confuses dagger (e.g. `dagger new` from $HOME).

We don't store state there anymore, just keys and the last version
check, so it's okay to be in ~/.config IMO

Looking at my system, in ~/.config there's `gcloud`, `gatsby`, `gh`,
`yarn`, and others so it seems like a pretty common location.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-01 12:38:14 -07:00
Solomon Hykes
a2cd2d7d1e Remove out-of-date cli spec file
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2021-06-01 15:09:41 +00:00
Sam Alba
10d1b01f2a cmd/output: list now lists all outputs everytime, even if not concrete - also allows to show outputs even if the env was never computes (based on UX feedback)
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-01 14:14:02 +02:00
Sam Alba
03d58e074f cmd/input: changed list output based on feedback
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-01 14:12:37 +02:00
Sam Alba
efb4ee209e cmd/up: disable output list when not a tty + better error handling
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 18:25:58 +02:00
Sam Alba
571b5c8618 cmd/up: downgrade output list error from Fatal to Warning
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 18:04:48 +02:00
Sam Alba
d6b6142065 cmd/up: show outputs at the end of the config execution
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 16:14:57 +02:00
Sam Alba
270d8b4775 cmd/output: implemented list --all
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 15:55:44 +02:00
Sam Alba
1a59c9c40b cmd/output: added support for listing outputs
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 15:25:02 +02:00
Sam Alba
91c2acd564 cmd/input: list filters out \\n
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 15:21:39 +02:00
Guillaume de Rouville
d74efa2420 Fix index out of bound for Dagger compute inputs + add tests ["input-dir", "input-git", input-string"]
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-05-31 12:11:54 +02:00
Sam Alba
ba5078ef26 cmd/dagger: share code for input/output management
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 11:08:26 +02:00
Andrea Luzzardi
9deb80c487 dagger input edit
See and edit all the inputs in bulk using $EDITOR

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-28 18:02:12 -07:00
Andrea Luzzardi
b627b4bc88 add support for excludes in input dir
This adds support for `--include` and `--exclude` for directory inputs.

For instance, this is what you would want to use when passing dagger
repository as an input:

```
inputs:
    repository:
        dir:
            path: .
            exclude:
                - '**/node_modules'
                - cmd/dagger/dagger
                - cmd/dagger/dagger-debug
```

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-28 16:22:32 -07:00
Andrea Luzzardi
b1c50671b3 fix build for non-cgo
- use mitchellh/go-homedir rather than os/user to work on non cgo
  enabled builds (e.g. release binaries)
- updated Makefile to disable cgo on dev binaries

Fixes #519

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-28 11:48:50 -07:00
Andrea Luzzardi
99cf7d0ae0 secret: fix terminal prompt for windows
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-27 14:08:49 -07:00
Sam Alba
80e1208474 cmd/up: added support for checking for user inputs concreteness before the running the config
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-27 18:46:54 +02:00
Sam Alba
b47512ba6e
Merge pull request #508 from aluzzardi/cue-fmt
fix cue fmt
2021-05-27 00:38:37 -07:00
Sam Alba
1f29c2f598
Merge pull request #505 from samalba/gitflow-help
Gitflow help
2021-05-27 00:36:53 -07:00
Andrea Luzzardi
af32e60b37 fix cue fmt
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-26 18:46:13 -07:00
Sam Alba
97be7b917a cmd/new+init: added instructions for new + fix for init arg
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-26 17:41:37 +02:00
Sam Alba
1f4bbc53ad cmd/init: print workspace path
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-26 16:26:13 +02:00
Sam Alba
9d1609187e cmd/init,new: added short description
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-26 16:25:42 +02:00
Sam Alba
16553b2e2a cmd/input: added support for Description from cue doc string
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-26 12:03:22 +02:00
Andrea Luzzardi
af776b8abe cleanup: move packages to top level, change vanity URL
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 16:54:00 -07:00
Andrea Luzzardi
e13153a284 cleanup: split dagger into sub-packages
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 16:53:41 -07:00
Andrea Luzzardi
c7c8c5fa8d tests: fix integration tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 15:17:32 -07:00
Andrea Luzzardi
90abadf0de gitflow: multi env support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 13:07:04 -07:00
Andrea Luzzardi
12436c20bc remove delete command
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 13:07:04 -07:00
Andrea Luzzardi
9d416d65f7 secret input type, simplify state format
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 13:07:04 -07:00
Andrea Luzzardi
5442d6b261 remove support for environment paths
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 13:07:04 -07:00
Andrea Luzzardi
b77d1a1e3e gitflow ux
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 13:07:04 -07:00
Sam Alba
a8837aaaed cmd/inputs: added --all option to list
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-21 17:39:17 -07:00
Sam Alba
c86f75f730 cmd/input: implemented UI for list cmd
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-21 16:04:02 -07:00
Sam Alba
ef8995b923 cmd/input: removed unused option
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-21 16:04:02 -07:00
Andrea Luzzardi
36b20c6f9c version: use golang.org/x/term to check terminal
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-19 14:04:49 -07:00
Tom Chauveau
b01b11876d Hide global flags for version command.
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-05-13 12:22:42 +02:00
Solomon Hykes
668d6ae23f Hide deprecated command "dagger compute"
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2021-05-12 16:01:43 -07:00
Solomon Hykes
2237b11bc0 Fix wording in cli usage
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2021-05-12 14:52:01 -07:00
Sam Alba
c7323e79bc cmd/version: simplified some code + added homebrew support
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-07 15:11:23 -07:00
Tom Chauveau
3bea6d5d93 Cancel check if dagger is not run manually
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-05-07 15:46:20 +02:00
Tom Chauveau
0e320eca70 Update documentation
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-05-07 15:46:20 +02:00
Tom Chauveau
5f723df36a Add dagger version check
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-05-07 15:46:19 +02:00
Solomon Hykes
31c4cee255 Extreme git flow: improved.
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-05-04 22:26:06 -07:00
Solomon Hykes
41f8b53069 Prototype: better git-flow
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-05-02 15:17:16 -07:00
Andrea Luzzardi
62eedd6470
Merge pull request #372 from aluzzardi/cue-v0.4.0-alpha.2
bump cue to v0.4.0-alpha.2
2021-04-30 18:18:32 -07:00
Andrea Luzzardi
c32cabf488 list: remove call to Reference as it is deprecated
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-30 18:13:34 -07:00
Tom Chauveau
13b0debbd0 dagger: unset input tests
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-04-30 20:02:29 +02:00
Tom Chauveau
ced9ab07e5 dagger: unset input
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-04-30 19:59:03 +02:00
Sam Alba
2099381abd implemented version command
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-29 14:35:14 -07:00
Solomon Hykes
e6e8ab390d Rename "deployment" to "environment": code
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-27 13:59:27 -07:00
Andrea Luzzardi
d77c6f46ff
Merge pull request #342 from verdverm/scan-for-inputs
add cmd/input/list to scan a plan for inputs
2021-04-22 18:41:23 -07:00
Tony Worm
6488d41603 add cmd/input/list to scan a plan for inputs
Signed-off-by: Tony Worm <tony@hofstadter.io>
2021-04-22 17:39:36 -04:00
Sam Alba
b674ac21b4 cmd/list: better error handling
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-22 11:56:48 -07:00
Sam Alba
825f182ff3 cmd/list: list show active deployment
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-19 17:55:07 -07:00
Andrea Luzzardi
46ab44a69f input: support file/stdin source for text/json/yaml
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 13:04:52 -07:00
Andrea Luzzardi
6f57ed1b9d input: support yaml and json inputs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 13:04:52 -07:00
Sam Alba
7ed616c772 cmd: fixed typo and removed solved TODO msg
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-14 16:25:10 -07:00
Sam Alba
bbeff0eddb cmd: plugged no-cache option to all relevant commands
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-14 16:21:45 -07:00
Frederick F. Kautz IV
0458c0a838 * add support for --input-file in dagger compute
* secrets now supports bytes
* error reporting for unhandled content data types in WriteFile

Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
2021-04-11 16:18:59 -07:00
Andrea Luzzardi
60db93a246 client: pass through the deployment directly
we can't serialize Cue in a lossless way. The current architecture has
the frontend serialize the state (plan, input, computed) to Cue files,
then the client loads them back. We lose information by doing this, and
therefore the merge fails.

This change removes the abstraction so that we operate directly on the
cue.Instance.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-08 18:11:06 -07:00
Andrea Luzzardi
10e676923c logger: fix concurrency issue
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-08 16:31:37 -07:00
Andrea Luzzardi
e54f1b0c3a store only computed values in compute layer
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-07 19:37:48 -07:00
Andrea Luzzardi
5381d0bfe1 up: store outputs and merge in query
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-07 19:05:09 -07:00
Andrea Luzzardi
0c79488a18
Merge pull request #268 from dagger/deployment-multi-path
store: support multiple deployments per path
2021-04-02 17:54:11 -07:00
Sam Alba
a799dd05d7 cli: moved abs path resolve to input.go
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 17:14:01 -07:00
Sam Alba
3e605d1d72 cli: moved input dir to abs path - fixes #254
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 16:47:49 -07:00
Sam Alba
d3fc31ab57 fixed inputs when input target is overriden
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 16:47:49 -07:00
Sam Alba
a24dbef0b7 cli: up: restored result display
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-02 16:47:47 -07:00
Andrea Luzzardi
33a7770459 store: support multiple deployments per path
- Add support for multiple deployments per path in the Store
- Add a bunch of tests
- Change the Lookup deployment API
- Add disambiguation in the CLI commands

Fixes #231

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-02 16:40:20 -07:00
Sam Alba
540f373993
Merge pull request #265 from dagger/query-formats
dagger query [--format cue|json|text|yaml] (default is json)
2021-04-02 16:20:39 -07:00
Solomon Hykes
e2e56a5143 dagger query [--format cue|json|text|yaml] (default is json)
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-02 23:05:08 +00:00
Andrea Luzzardi
33d5add54b deployment API cleanup
The API was a bit confusing with code mixing the usage of Deployment and
DeploymentState.

This change marks a clear separation:

- Client is the only piece of code manipulating *Deployment
- CLI commands can manipulate DeploymentState objects and pass them to
  Client

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-02 15:30:38 -07:00
Andrea Luzzardi
6d01389e16 go.mod: fix sops dependency
Taken from https://github.com/dagger/dagger/pull/239

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-02 15:08:48 -07:00
Andrea Luzzardi
896d303f4a
Merge pull request #247 from dagger/cli-new-plan-git
Cli new plan git
2021-04-01 18:13:24 -07:00
Solomon Hykes
0a28f04857 Don't print the deployment state at the end of each command
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-01 17:54:21 -07:00
Solomon Hykes
67af849dd9 Change default loglevel to INFO (from DEBUG)
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-04-01 17:49:15 -07:00
Sam Alba
c3846100b3 cmd/plan: implemented git and dir
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-01 17:46:43 -07:00
Sam Alba
6cbea26f7f cmd/plan/git: allow for optional ref (default to HEAD)
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-01 17:46:43 -07:00
Sam Alba
fb9aae38ef cmd/new: added support for plan-git option
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-01 17:46:42 -07:00
Sam Alba
4dcddc68c3
Merge pull request #229 from dagger/cli-new-name
Fix "dagger new --name"
2021-04-01 11:30:22 -07:00
Sam Alba
29cad95f1d cmd/new: implemented --plan-dir
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-01 11:12:44 -07:00
Sam Alba
b9b195b70f cmd/new: implemented optional arg to specify name, forbid usage of -d option
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-01 10:49:17 -07:00
Sam Alba
3aec0337d2 tests: fixed invalid test
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-31 18:10:20 -07:00
Sam Alba
ac5c8417d2 cmd: implemented query to be close to cue eval
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-31 16:32:48 -07:00
Solomon Hykes
47b16a1d1b Fix "dagger new --name"
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-31 22:04:15 +00:00
Andrea Luzzardi
e6674b7b7e terminology: rename layout -> plan
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-30 19:45:18 -07:00
Andrea Luzzardi
f901918266 terminology: rename route -> deployment
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-30 19:33:21 -07:00
Andrea Luzzardi
e503e12cff
Merge pull request #208 from dagger/cli-ux
CLI v2
2021-03-30 19:07:01 -07:00
Andrea Luzzardi
0f09ba5e87 minor error messages and linter cleanups
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-30 18:53:09 -07:00
Solomon Hykes
d6c51c6df5 CLI spec: fix copy-paste mistake
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-26 17:14:44 -07:00
Solomon Hykes
4ef77efeac CLI spec: controller -> deployment
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-26 15:59:37 -07:00
Solomon Hykes
95fc037d3b Programmer guide: improve & add content
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-26 15:59:37 -07:00
Sam Alba
576613e46a implemented inputs
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-26 15:50:18 -07:00
Sam Alba
a1c9041363 implement proper route lookup
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-26 11:04:31 -07:00
Andrea Luzzardi
e08e64b311 store: keep an in-memory index of routes, support lookup by path
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-25 19:08:52 -07:00
Andrea Luzzardi
1e8cef9ad0 cli: access flags using viper rather than cobra
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-25 16:11:52 -07:00
Andrea Luzzardi
f59b30a27c cli: cleanup logger usage
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-25 16:07:39 -07:00
Andrea Luzzardi
9fec69f3a0 make store a struct and add tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-25 22:29:11 +00:00
Sam Alba
7ad541feb1 implemented new, up, list
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-25 22:29:11 +00:00
Andrea Luzzardi
43956e38cc separate Store from State
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-25 22:29:11 +00:00
Andrea Luzzardi
cba524eb0f merge Route into Env, rebase dagger compute to use the new API
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-25 22:29:11 +00:00
Solomon Hykes
7bf05d3cc9 CLI backend to manage layout and inputs
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-25 22:29:11 +00:00
Sam Alba
9c110716a5 added input, output, layout cmds
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-25 22:29:11 +00:00
Solomon Hykes
37bf20e24b Expand mockup backend for CLI
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-25 22:29:11 +00:00
Sam Alba
661affa4cb more basic commands + lint fixes
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-25 22:29:11 +00:00
Sam Alba
84188535f3 implemented basic commands: up, down, new, query, list
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-03-25 22:29:11 +00:00
Solomon Hykes
437aba7fdb Harmonize docs with intro paragraph from CLI spec
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-25 15:27:35 -07:00
Solomon Hykes
ab6518cca0 CLI spec: "query [-l string]" becomes "query [--no-input] [--no-output] [--no-layout]"
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-25 15:27:35 -07:00
Solomon Hykes
d78b9238e2 CLI spec: route->controller, layout->deployment plan, new&improved overview
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-25 15:27:35 -07:00
Solomon Hykes
8b77c15eac CLI spec: stack becomes route; base becomes layout
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-25 15:27:35 -07:00
Solomon Hykes
fb27b698b3 Move CLI spec to a better location
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-03-22 12:49:43 -07:00
Andrea Luzzardi
56ea7e3991 do not log inputs as they may contain secrets
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 17:43:13 -07:00
Andrea Luzzardi
e6bb3f12f4 inputs decryption using SOPS
- Add support for --input-json and --input-yaml (plaintext)
- Input files can optionally be encrypted using sops, with transparent
  decryption by dagger

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 17:43:13 -07:00
Andrea Luzzardi
ad0fcfffeb fix --log-* flags
Have each command create their own logger rather than using the one from
`cmd.Context()`. This is because that one gets created "too early" when
`--log-*` flags have not been parsed yet.

Fixes #181

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 15:55:16 -07:00
Andrea Luzzardi
5cd3aa5001 logger: serialize unknown fields to json
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-18 11:18:50 -07:00
Andrea Luzzardi
f35df0475b opentracing support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-03-04 10:45:20 -08:00
Andrea Luzzardi
1fcb36113f cleanup log messages
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-23 16:37:45 -08:00
Andrea Luzzardi
bc3305610b logs: custom console printer
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-23 15:39:52 -08:00
Andrea Luzzardi
fef148f6c0 rename go package dagger.io/go
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-17 13:13:39 -08:00
Solomon Hykes
612a25fb9f Simplify code by moving polyfill cue compiler to sub-package cc
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-08 15:10:32 -08:00
Solomon Hykes
0202f4447b Don't instantiate a global shared Env in cmd/compute.go
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-05 15:27:19 -08:00
Andrea Luzzardi
f6650901fd update .gitignore
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-03 14:58:33 -08:00
Solomon Hykes
1954c3f731 dagger compute [--input-dir TARGET=DIR] [--input-string TARGET=STRING] [--input-cue CUE] [--input-git REMOTE#REF]
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-31 22:48:30 -08:00
Solomon Hykes
c4e55a6915 Refactor how client prepares environment. Inputs may now reference local directories
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-28 19:29:57 -08:00
Andrea Luzzardi
b4d16b0268 fix .gitignore
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-21 10:40:11 -08:00
Andrea Luzzardi
16fd14b0c9 cmd: wire --input flag into client
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-14 15:21:27 -08:00
Andrea Luzzardi
d15ec726cf cmd: remove ui package
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-13 18:19:36 -08:00
Andrea Luzzardi
e09723861f re-wire logging on top of zerolog
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-13 18:18:48 -08:00
Andrea Luzzardi
49f0c0e149 cmd: re-use existing ui library
Also, move CLI-only utils into `cmd` rather than the top-level package.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-13 14:43:08 -08:00
Solomon Hykes
4514df1853 remove broken "dagger create" command
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-09 17:32:30 -08:00
Andrea Luzzardi
adf3511b1e fix lint errors, enable CI
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-08 17:18:34 +01:00
Solomon Hykes
3162ca0991 Refactor
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-07 13:57:39 -08:00
Solomon Hykes
30f75da114 Move prototype 69-dagger-archon to top-level
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2020-12-29 18:45:16 -08:00