Skip to content

Commit

Permalink
Reset constraints when deploying. Fixes #218
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis <[email protected]>
  • Loading branch information
alexellis committed Nov 11, 2017
1 parent 5a79f8f commit 5eac30a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions commands/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,19 @@ func runDeploy(cmd *cobra.Command, args []string) {
}

for k, function := range services.Functions {

function.Name = k
if update {
fmt.Printf("Updating: %s.\n", function.Name)
} else {
fmt.Printf("Deploying: %s.\n", function.Name)
}

var functionConstraints []string
if function.Constraints != nil {
constraints = *function.Constraints
functionConstraints = *function.Constraints
} else if len(constraints) > 0 {
functionConstraints = constraints
}

fileEnvironment, err := readFiles(function.EnvironmentFile)
Expand All @@ -160,7 +165,7 @@ func runDeploy(cmd *cobra.Command, args []string) {
log.Fatalln(envErr)
}

proxy.DeployFunction(function.FProcess, services.Provider.GatewayURL, function.Name, function.Image, function.Language, replace, allEnvironment, services.Provider.Network, constraints, update, secrets, allLabels)
proxy.DeployFunction(function.FProcess, services.Provider.GatewayURL, function.Name, function.Image, function.Language, replace, allEnvironment, services.Provider.Network, functionConstraints, update, secrets, allLabels)
}
} else {
if len(image) == 0 {
Expand Down

0 comments on commit 5eac30a

Please sign in to comment.