mirror of https://github.com/databricks/cli.git
test: Acceptance test for flag overrides
This commit is contained in:
parent
a794490b64
commit
3f0b5f848e
|
@ -0,0 +1,21 @@
|
|||
bundle:
|
||||
name: TestResolveVariablesFromFile
|
||||
|
||||
variables:
|
||||
cluster:
|
||||
type: "complex"
|
||||
default:
|
||||
node_type_id: "unused"
|
||||
cluster_key:
|
||||
default: "unused"
|
||||
cluster_workers:
|
||||
default: 1
|
||||
|
||||
resources:
|
||||
jobs:
|
||||
job1:
|
||||
job_clusters:
|
||||
- job_cluster_key: ${var.cluster_key}
|
||||
new_cluster:
|
||||
node_type_id: "${var.cluster.node_type_id}"
|
||||
num_workers: ${var.cluster_workers}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"job_cluster_key": "mlops_stacks-cluster",
|
||||
"new_cluster": {
|
||||
"node_type_id": "Standard_DS3_v2",
|
||||
"num_workers": 2
|
||||
}
|
||||
}
|
||||
"mlops_stacks-cluster"
|
|
@ -0,0 +1,5 @@
|
|||
# variable file
|
||||
$CLI bundle validate -o json --vars-file-path=vars.json | jq .resources.jobs.job1.job_clusters[0]
|
||||
|
||||
# variable flag
|
||||
$CLI bundle validate -o json --var="cluster_key=mlops_stacks-cluster" | jq .resources.jobs.job1.job_clusters[0].job_cluster_key
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"cluster": {
|
||||
"node_type_id": "Standard_DS3_v2"
|
||||
},
|
||||
"cluster_key": "mlops_stacks-cluster",
|
||||
"cluster_workers": 2
|
||||
}
|
Loading…
Reference in New Issue