Closed Fuco1 closed 4 years ago
That's correct, only some fields support variable expansion: http://dnephin.github.io/dobi/variables.html#config-fields
It should be easy to add here https://github.com/dnephin/dobi/blob/master/config/image.go#L144-L170, using resolver.ResolveSlice
okay, I know nothing about go development but followed some guide, ended up with cloning the project into github.com/dnephin/dobi
inside my $GOPATH
and then I run go get
, it downloaded a bunch of stuff and then failed at
~/dev/go/src/github.com/dnephin/dobi$ go get -v
# github.com/dnephin/dobi
/usr/lib/go-1.10/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/tmp/go-link-414185749/000024.o: In function `_cgo_f404b13b0081_Cfunc_sysconf':
/tmp/go-build/cgo-gcc-prolog:32: multiple definition of `_cgo_f404b13b0081_Cfunc_sysconf'
/tmp/go-link-414185749/000018.o:/tmp/go-build/cgo-gcc-prolog:32: first defined here
collect2: error: ld returned 1 exit status
$ go version
go version go1.10.4 linux/amd64
any pointers? I'd like to take a stab at this. I like the project and there are still some things I'd like to add, so why not I guess :D
Oh wow, that's a strange error. I would try export CGO_ENABLED=0
to turn off CGO (https://golang.org/cmd/cgo/).
Thanks for working on this!
Thanks, that helped, I can now compile the project and get a binary.
Now I'm trying to run the tests. When I did just go test
I get
> go test
? github.com/dnephin/dobi [no test files]
I've installed go get gotest.tools/assert
since it was complaining the library was missing.
In Go the default is to only run tests in the current directory, you can run go test ./...
to run them all
It seems like the config variables are not expanded in cache-from
When I replace
{project}
withproject
(the expansion) manually dobi uses cache for build.