#update breaking change
1 messages ยท Page 1 of 1 (latest)
One momen..
Right, I see where the confusion is, and it's my bad. When I run a dagger do I got some errors, that scrolled off of the screen quickly, and then I had a default "usage" options, which was confusing me, because I feel that it's suggesting that I wasn't running the correct command.
This is the output I'm getting: ```
dagger do buildApp
failed to load plan: actions.load.loadCLI: 1 errors in empty disjunction:
actions.load.loadCLI.image: field not allowed: rootfs:
./cue.mod/pkg/dagger.io/dagger/core/fs.cue:84:10
./cue.mod/pkg/dagger.io/dagger/core/fs.cue:128:10
./cue.mod/pkg/dagger.io/dagger/core/fs.cue:130:3
./cue.mod/pkg/dagger.io/dagger/core/fs.cue:130:16
./cue.mod/pkg/dagger.io/dagger/types.cue:9:6
./cue.mod/pkg/universe.dagger.io/docker/cli/load.cue:11:9
./cue.mod/pkg/universe.dagger.io/docker/image.cue:11:2
./cue.mod/pkg/universe.dagger.io/docker/run.cue:138:32
./cue.mod/pkg/universe.dagger.io/docker/run.cue:142:17
./cue.mod/pkg/universe.dagger.io/docker/run.cue:142:30
./cue.mod/pkg/universe.dagger.io/docker/run.cue:151:29
./cue.mod/pkg/universe.dagger.io/go/build.cue:55:10
./dagger.cue:12:1
./dagger.cue:107:13
./dagger.cue:108:12
Usage:
dagger do [flags]
Flags:
--cache-from stringArray External cache sources (eg. user/app:cache, type=local,src=path/to/dir)
--cache-to stringArray Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)
--dry-run Dry run mode
-h, --help help for do
--no-cache Disable caching
--output string File path to write the action's output values. Prints to stdout if empty
--output-format string Format for output values (plain, json, yaml) (default "plain")
-p, --plan string Path to plan (defaults to current directory) (default ".")
--platform string Set target build platform (requires experimental)
-w, --with stringArray
Global Flags:
--experimental Enable experimental features
--log-format string Log format (auto, plain, tty, json) (default "auto")
-l, --log-level string Log level (default "info")
I think the output should stop after the errors, and not display usage?
Your loadCLI action references a rootfs
Yeah, I need to fix that ๐
Can anyone help me fix this please?
Can you please paste your plan below ?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
You can otherwise do gist, I find it easier: https://gist.github.com/
Do you want to go on dev-audio ?
Ok, I got the root cause
Do you want to join on audio so that I can explain you live ?
https://github.com/dagger/dagger/blob/42f9901da56415a6175318dcf550e7d4e16efd44/pkg/universe.dagger.io/go/build.cue#L55 <-- this is the output field of your go.#Build command
You call it here:
buildApp: go.#Build & {
source: _config.source
}
and you reference the output of the go.#Build as the input of your cli.#Load
However, as you can see, the output is a rootfs and not an image
What you want is to build an image on which the buildApp.output is mounted (so the rootfs of the go directory that you just built)
Sorry, how would I do that? For some reason, this is the main Dagger file that I can't seem to get my head around ๐
That shall work:
load: {
ssh: #SSH & {
sshKey: _config.ssh_key //client.filesystem."~/.ssh/id_rsa".read.contents
sshKnownHosts: _config.sshKnownHosts //client.filesystem."~/.ssh/known_hosts".read.contents
}
_baseImage: alpine.#Build & {
packages: {
bash: {}
"openssh-client": {}
"docker-cli": {}
}
}
loadCLI: cli.#Load & {
image: _baseImage.output
tag: "tcs:v0.86"
host: "ssh://\(client.env.REMOTE_USER)@\(client.env.REMOTE_HOST)"
mounts: app: {
dest: "/buildApp"
contents: buildApp.output
}
}
}
failed to load plan: actions.load.loadCLI: reference "cli" not found: ./dagger.cue:115:13
did you replace the load in your plan with the one I just pasted above ?
The feedback loop is too long atm, we should try debug live
failed to load plan: "actions.buildDocker._ssh._exec.mounts.\"Bash scripts\"" is not set
"actions.buildDocker._ssh.mounts.\"Bash scripts\"" is not set
"actions.load.ssh._exec.mounts.\"Bash scripts\"" is not set
"actions.load.ssh.mounts.\"Bash scripts\"" is not set
"actions.buildDocker._ssh.script" is not set: :
SOrry, yes, but am currently on another call ๐