Skip to content

Commit

Permalink
chore: patch
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicsim1 committed Oct 19, 2023
1 parent 7ff26a7 commit f6827f2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion octopusdeploy/schema_action_run_kubectl_script.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ func expandRunKubectlScriptAction(flattenedAction map[string]interface{}) *deplo
}

func flattenKubernetesRunScriptAction(action *deployments.DeploymentAction) map[string]interface{} {
flattenedAction := flattenDeploymentAction(action)
flattenedAction := flattenAction(action)

if v, ok := action.Properties["Octopus.Action.RunOnServer"]; ok {
runOnServer, _ := strconv.ParseBool(v.Value)
flattenedAction["run_on_server"] = runOnServer
}

if len(action.WorkerPool) > 0 {
flattenedAction["worker_pool_id"] = action.WorkerPool
}

if len(action.WorkerPoolVariable) > 0 {
flattenedAction["worker_pool_variable"] = action.WorkerPoolVariable
}

if v, ok := action.Properties["Octopus.Action.Script.ScriptFileName"]; ok {
flattenedAction["script_file_name"] = v.Value
}
Expand Down

0 comments on commit f6827f2

Please sign in to comment.