mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Switching to new dep tool (#616)
* making things work * #506 - Add ability to login to a private docker registry * Rolling back "make things work" to test them out more. * Rolling back "make things work" to test them out more. * credentials from docker/config.json if ENV is missing * should get docker auth info just in the init * update glide lock * update glide * Switched to new go dep tool, glide is too frikin annoying. * Updated circle builds to use dep * Added GOPATH/bin to path. * Added GOPATH/bin to path. * Using regular make test, instead of docker one (not sure why it was using the docker one?).
This commit is contained in:
22
api/runner/docker-registry.go
Normal file
22
api/runner/docker-registry.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package runner
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type dockerRegistry struct {
|
||||
Name string `json:"name"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type dockerRegistries []dockerRegistry
|
||||
|
||||
func (t dockerRegistries) Find(name string) *dockerRegistry {
|
||||
for _, v := range t {
|
||||
if strings.HasSuffix(v.Name, name) {
|
||||
return &v
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user