Documentation ¶
Overview ¶
Package builds provides methods for managing app builds.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a build for an app from an docker image. By default this will create a cmd process that runs the CMD command from the Dockerfile. If you want to define more process types, you can pass a Procfile map, where the key is the process name and the value is the command for that process. To pull from a private docker registry, a custom username and password must be set in the app's configuration object. This can be done with `deis registry:set` or by using this SDK.
This example adds custom registry credentials to an app:
import ( "github.com/deis/controller-sdk-go/api" "github.com/deis/controller-sdk-go/config" ) // Create username/password map registryMap := map[string]string{ "username": "password" } // Create a new configuration, assign the credentials, and set it. // Note that config setting is a patching operation, it doesn't overwrite or unset // unrelated configuration. newConfig := api.Config{} newConfig.Registry = registryMap _, err := config.Set(<client>, "appname", newConfig) if err != nil { log.Fatal(err) }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.