2022-11-18 09:57:31 +00:00
|
|
|
package config
|
|
|
|
|
2023-08-23 16:47:07 +00:00
|
|
|
import "github.com/databricks/databricks-sdk-go/service/jobs"
|
|
|
|
|
2023-07-12 06:51:54 +00:00
|
|
|
type Mode string
|
|
|
|
|
2023-08-17 15:22:32 +00:00
|
|
|
// Target defines overrides for a single target.
|
2022-11-18 09:57:31 +00:00
|
|
|
// This structure is recursively merged into the root configuration.
|
2023-08-17 15:22:32 +00:00
|
|
|
type Target struct {
|
|
|
|
// Default marks that this target must be used if one isn't specified
|
|
|
|
// by the user (through target variable or command line argument).
|
2022-12-15 20:28:14 +00:00
|
|
|
Default bool `json:"default,omitempty"`
|
|
|
|
|
2023-08-17 15:22:32 +00:00
|
|
|
// Determines the mode of the target.
|
2023-07-12 06:51:54 +00:00
|
|
|
// For example, 'mode: development' can be used for deployments for
|
|
|
|
// development purposes.
|
|
|
|
Mode Mode `json:"mode,omitempty"`
|
|
|
|
|
|
|
|
// Overrides the compute used for jobs and other supported assets.
|
|
|
|
ComputeID string `json:"compute_id,omitempty"`
|
|
|
|
|
2022-11-18 09:57:31 +00:00
|
|
|
Bundle *Bundle `json:"bundle,omitempty"`
|
|
|
|
|
|
|
|
Workspace *Workspace `json:"workspace,omitempty"`
|
|
|
|
|
2023-09-04 09:55:01 +00:00
|
|
|
Artifacts Artifacts `json:"artifacts,omitempty"`
|
2022-11-30 13:15:22 +00:00
|
|
|
|
2022-11-18 09:57:31 +00:00
|
|
|
Resources *Resources `json:"resources,omitempty"`
|
2023-05-15 12:07:18 +00:00
|
|
|
|
|
|
|
// Override default values for defined variables
|
|
|
|
// Does not permit defining new variables or redefining existing ones
|
2023-08-17 15:22:32 +00:00
|
|
|
// in the scope of an target
|
2023-05-15 12:07:18 +00:00
|
|
|
Variables map[string]string `json:"variables,omitempty"`
|
2023-07-30 12:44:33 +00:00
|
|
|
|
|
|
|
Git Git `json:"git,omitempty"`
|
2023-08-23 16:47:07 +00:00
|
|
|
|
|
|
|
RunAs *jobs.JobRunAs `json:"run_as,omitempty"`
|
2023-10-10 15:18:18 +00:00
|
|
|
|
|
|
|
Sync *Sync `json:"sync,omitempty"`
|
2022-11-18 09:57:31 +00:00
|
|
|
}
|
2023-07-12 06:51:54 +00:00
|
|
|
|
|
|
|
const (
|
2023-07-30 07:19:49 +00:00
|
|
|
// Development mode: deployments done purely for running things in development.
|
|
|
|
// Any deployed resources will be marked as "dev" and might be hidden or cleaned up.
|
2023-07-12 06:51:54 +00:00
|
|
|
Development Mode = "development"
|
2023-07-30 07:19:49 +00:00
|
|
|
|
|
|
|
// Production mode: deployments done for production purposes.
|
|
|
|
// Any deployed resources will not be changed but this mode will enable
|
|
|
|
// various strictness checks to make sure that a deployment is correctly setup
|
|
|
|
// for production purposes.
|
|
|
|
Production Mode = "production"
|
2023-07-12 06:51:54 +00:00
|
|
|
)
|