Skip to content

Commit a37e44e

Browse files
📝 fix deployment file structure in the docs (#722)
1 parent 4c221a9 commit a37e44e

3 files changed

Lines changed: 66 additions & 61 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
- 🔨 fix `dbx deploy --no-package` when `--no-rebuild` is not specified
1818
- 🔗 broken links in the docs
19+
- 📝 fix deployment file structure in the docs
1920

2021
### Changed
2122

docs/guides/python/devops/mixed.md

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,26 @@ Here is a quick layout of a deployment file for a mixed-mode project:
2020

2121
environments:
2222
default:
23-
- name: "mixed-mode-workflow"
24-
job_clusters:
23+
workflows:
24+
- name: "mixed-mode-workflow"
25+
job_clusters:
2526
# omitted
26-
git_source:
27-
git_url: https://some-git-provider.com/some/remote/repo.git
28-
git_provider: "git-provider-name"
29-
git_branch: "main" # or git_tag or git_commit
30-
tasks:
31-
- task_key: "notebook-remote"
32-
notebook_task:
33-
notebook_path: "notebooks/sample_notebook"
34-
deployment_config:
35-
no_package: true
36-
job_cluster_key: "default"
37-
- task_key: "packaged"
38-
python_wheel_task:
39-
package_name: "<your-package-name>"
40-
entry_point: "<your-entry-point>"
41-
job_cluster_key: "default"
27+
git_source:
28+
git_url: https://some-git-provider.com/some/remote/repo.git
29+
git_provider: "git-provider-name"
30+
git_branch: "main" # or git_tag or git_commit
31+
tasks:
32+
- task_key: "notebook-remote"
33+
notebook_task:
34+
notebook_path: "notebooks/sample_notebook"
35+
deployment_config:
36+
no_package: true
37+
job_cluster_key: "default"
38+
- task_key: "packaged"
39+
python_wheel_task:
40+
package_name: "<your-package-name>"
41+
entry_point: "<your-entry-point>"
42+
job_cluster_key: "default"
4243
```
4344
4445
The [`git_source`](https://docs.databricks.com/dev-tools/api/latest/jobs.html#operation/JobsCreate) section provides pointer to the remote git branch (`tag` could also be used).
@@ -91,19 +92,20 @@ dbx configure --enable-inplace-jinja-support
9192
# only relevant block shown
9293
environments:
9394
default:
94-
- name: "notebook-from-remote-branch"
95-
git_source:
96-
git_url: https://some-git-provider.com/some/remote/repo.git
97-
git_provider: "git-provider-name"
98-
git_branch: "{{env['GIT_BRANCH']}}" # assuming this env variable exists
99-
- name: "notebook-from-remote-tag"
100-
git_source:
101-
git_url: https://some-git-provider.com/some/remote/repo.git
102-
git_provider: "git-provider-name"
103-
git_tag: "{{env['GIT_TAG']}}" # assuming this env variable exists
104-
- name: "notebook-from-remote-commit"
105-
git_source:
106-
git_url: https://some-git-provider.com/some/remote/repo.git
107-
git_provider: "git-provider-name"
108-
git_commit: "{{env['GIT_COMMIT']}}" # assuming this env variable exists
95+
workflows:
96+
- name: "notebook-from-remote-branch"
97+
git_source:
98+
git_url: https://some-git-provider.com/some/remote/repo.git
99+
git_provider: "git-provider-name"
100+
git_branch: "{{env['GIT_BRANCH']}}" # assuming this env variable exists
101+
- name: "notebook-from-remote-tag"
102+
git_source:
103+
git_url: https://some-git-provider.com/some/remote/repo.git
104+
git_provider: "git-provider-name"
105+
git_tag: "{{env['GIT_TAG']}}" # assuming this env variable exists
106+
- name: "notebook-from-remote-commit"
107+
git_source:
108+
git_url: https://some-git-provider.com/some/remote/repo.git
109+
git_provider: "git-provider-name"
110+
git_commit: "{{env['GIT_COMMIT']}}" # assuming this env variable exists
109111
```

docs/guides/python/devops/notebook.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,21 @@ build: #(1)
1919

2020
environments:
2121
default:
22-
- name: "notebook-from-remote"
23-
job_clusters:
22+
workflows:
23+
- name: "notebook-from-remote"
24+
job_clusters:
2425
# omitted
25-
git_source:
26-
git_url: https://some-git-provider.com/some/remote/repo.git
27-
git_provider: "git-provider-name"
28-
git_branch: "main"
29-
tasks:
30-
- task_key: "notebook-remote"
31-
notebook_task:
32-
notebook_path: "notebooks/sample_notebook"
33-
deployment_config:
34-
no_package: true
35-
job_cluster_key: "default"
26+
git_source:
27+
git_url: https://some-git-provider.com/some/remote/repo.git
28+
git_provider: "git-provider-name"
29+
git_branch: "main"
30+
tasks:
31+
- task_key: "notebook-remote"
32+
notebook_task:
33+
notebook_path: "notebooks/sample_notebook"
34+
deployment_config:
35+
no_package: true
36+
job_cluster_key: "default"
3637
```
3738
3839
1. Disables the standard `pip`-based build behaviour. Read more about build management [here](../../../features/build_management.md).
@@ -71,19 +72,20 @@ dbx configure --enable-inplace-jinja-support
7172
# only relevant block shown
7273
environments:
7374
default:
74-
- name: "notebook-from-remote-branch"
75-
git_source:
76-
git_url: https://some-git-provider.com/some/remote/repo.git
77-
git_provider: "git-provider-name"
78-
git_branch: "{{env['GIT_BRANCH']}}" # assuming this env variable exists
79-
- name: "notebook-from-remote-tag"
80-
git_source:
81-
git_url: https://some-git-provider.com/some/remote/repo.git
82-
git_provider: "git-provider-name"
83-
git_tag: "{{env['GIT_TAG']}}" # assuming this env variable exists
84-
- name: "notebook-from-remote-commit"
85-
git_source:
86-
git_url: https://some-git-provider.com/some/remote/repo.git
87-
git_provider: "git-provider-name"
88-
git_commit: "{{env['GIT_COMMIT']}}" # assuming this env variable exists
75+
workflows:
76+
- name: "notebook-from-remote-branch"
77+
git_source:
78+
git_url: https://some-git-provider.com/some/remote/repo.git
79+
git_provider: "git-provider-name"
80+
git_branch: "{{env['GIT_BRANCH']}}" # assuming this env variable exists
81+
- name: "notebook-from-remote-tag"
82+
git_source:
83+
git_url: https://some-git-provider.com/some/remote/repo.git
84+
git_provider: "git-provider-name"
85+
git_tag: "{{env['GIT_TAG']}}" # assuming this env variable exists
86+
- name: "notebook-from-remote-commit"
87+
git_source:
88+
git_url: https://some-git-provider.com/some/remote/repo.git
89+
git_provider: "git-provider-name"
90+
git_commit: "{{env['GIT_COMMIT']}}" # assuming this env variable exists
8991
```

0 commit comments

Comments
 (0)