#Does sdk support File core type as remote url too?

1 messages · Page 1 of 1 (latest)

stray saddle
#

Hey folks 👋

I have usecase where I wanna set file parameter to dagger cli call as a remote url, just sneaking around to see if there's inherent way already?

lunar geyser
#

Hey!

If the remote url is a git repo then yes you can pass in a file.

Here is an example

dagger call my-function --file-url https://github.com/jpadams/azure-for-dagger#main:main.go

In this case:

REPO: https://github.com/jpadams/azure-for-dagger

BRANCH: 
#main

PATH TO FILE: 
:main.go

I am going add this to our cookbook since I could not find it there

GitHub

Azure Container Registry dagger module. Contribute to jpadams/azure-for-dagger development by creating an account on GitHub.

stray saddle
#

Remote url is actually from jfrog , so it's not supported?

lunar geyser
stray saddle
#

Is this something that can be taken as a feature request?

lunar geyser
#

Yeah for sure, please feel free to add any request as issues to our main repo!

https://github.com/dagger/dagger

--
@strong garden it feels like this whole section is missing "File arguments"

https://docs.dagger.io/api/arguments/

GitHub

An engine to run your pipelines in containers. Contribute to dagger/dagger development by creating an account on GitHub.

Dagger Functions, just like regular functions, can accept arguments. In addition to basic types (string, boolean, integer, arrays...), Dagger also defines powerful core types which Dagger Functions can use for their arguments, such as Directory, Container, Service, Secret, and many more.

#

In the meantime, there is a dag.http method that you may be able to use inside of your function to grab the file that way.

In that case instead of file, you accept a string argument and then pass it along to dag.HTTP

(also can't find a good example in the docs but here the raw graphQL spec: https://docs.dagger.io/api/reference/#query-http)

stray saddle
#

Thanks @lunar geyser

strong garden
#

@lunar geyser Can you please create an issue and assign to me?