Hi, I think daggers concept of modules is a very valuable one, but I'm struggling with how to deal with the return values of a module call.
For example, if I call the java module this way:
dagger call -m github.com/jcsirot/daggerverse/java with-jdk --version 17 with-maven --version 3.9.5 with-project --source="." maven --args clean,package
How would I access/export the generated artefact (aka jar file)?
#General question concerning the usage of modules
1 messages · Page 1 of 1 (latest)
If the command you shared is returning a Directory or File you can use
dagger export -m github.com/jcsirot/daggerverse/java with-jdk --version 17 with-maven --version 3.9.5 with-project --source="." maven --args clean,package --output out/
usage is same with call only difference is it'll download returned File and Directory types to your host system to given path
Thanks, but no, it's returning a Container. The export function only gives me the String 'Asset exported to "/tmp/test". A subsequent dagger query fails, as this return string can not be used as container id. Any further ideas?
You need to return a Directory in a function with your assets. Then you can dagger dl them.