Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to CI jobs page #4706

Merged
merged 73 commits into from
Jan 22, 2024
Merged
Changes from 3 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
7cf6633
Update CI jobs
nghi-ly Jan 4, 2024
d8a0e3e
Merge branch 'current' into ly-docs-ci-jobs
nghi-ly Jan 4, 2024
f6e645f
This branch was auto-updated!
github-actions[bot] Jan 4, 2024
84ae6e7
This branch was auto-updated!
github-actions[bot] Jan 4, 2024
2d83e75
This branch was auto-updated!
github-actions[bot] Jan 4, 2024
2fef3fc
Update website/docs/docs/deploy/ci-jobs.md
nghi-ly Jan 5, 2024
d122f0b
This branch was auto-updated!
github-actions[bot] Jan 5, 2024
15adb4f
This branch was auto-updated!
github-actions[bot] Jan 5, 2024
de780bc
This branch was auto-updated!
github-actions[bot] Jan 5, 2024
68419f6
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
ed53de7
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
063ded0
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
ec1460c
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
f1bd0b6
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
33ba942
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
1186555
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
a30ad63
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
7cd5199
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
e5a191e
Feedback
nghi-ly Jan 8, 2024
c438cd1
Merge branch 'ly-docs-ci-jobs' of github.com:dbt-labs/docs.getdbt.com…
nghi-ly Jan 8, 2024
ecf9427
Update website/docs/docs/deploy/ci-jobs.md
nghi-ly Jan 8, 2024
553e347
This branch was auto-updated!
github-actions[bot] Jan 8, 2024
81f11d7
This branch was auto-updated!
github-actions[bot] Jan 9, 2024
1186ea1
This branch was auto-updated!
github-actions[bot] Jan 9, 2024
a0f341b
This branch was auto-updated!
github-actions[bot] Jan 9, 2024
7d1b006
This branch was auto-updated!
github-actions[bot] Jan 9, 2024
9ff5f50
This branch was auto-updated!
github-actions[bot] Jan 9, 2024
64a1b56
This branch was auto-updated!
github-actions[bot] Jan 9, 2024
39cf192
This branch was auto-updated!
github-actions[bot] Jan 10, 2024
8701209
This branch was auto-updated!
github-actions[bot] Jan 10, 2024
cf83200
This branch was auto-updated!
github-actions[bot] Jan 10, 2024
1ae5e0c
This branch was auto-updated!
github-actions[bot] Jan 10, 2024
50b6451
This branch was auto-updated!
github-actions[bot] Jan 10, 2024
de41200
This branch was auto-updated!
github-actions[bot] Jan 10, 2024
36a3145
This branch was auto-updated!
github-actions[bot] Jan 11, 2024
4bf3409
This branch was auto-updated!
github-actions[bot] Jan 11, 2024
42fd534
This branch was auto-updated!
github-actions[bot] Jan 12, 2024
e139148
This branch was auto-updated!
github-actions[bot] Jan 12, 2024
42b4df5
This branch was auto-updated!
github-actions[bot] Jan 12, 2024
c33e4df
This branch was auto-updated!
github-actions[bot] Jan 12, 2024
6715cb0
This branch was auto-updated!
github-actions[bot] Jan 12, 2024
fa7678f
This branch was auto-updated!
github-actions[bot] Jan 12, 2024
1e6e4bd
This branch was auto-updated!
github-actions[bot] Jan 15, 2024
bd29c64
This branch was auto-updated!
github-actions[bot] Jan 15, 2024
a40fd15
This branch was auto-updated!
github-actions[bot] Jan 16, 2024
21bdf78
This branch was auto-updated!
github-actions[bot] Jan 16, 2024
8df4c9e
This branch was auto-updated!
github-actions[bot] Jan 16, 2024
b8026f5
This branch was auto-updated!
github-actions[bot] Jan 16, 2024
6a623b3
This branch was auto-updated!
github-actions[bot] Jan 16, 2024
78c3d94
Feedback 2
nghi-ly Jan 17, 2024
dd0b400
This branch was auto-updated!
github-actions[bot] Jan 17, 2024
3e80e48
This branch was auto-updated!
github-actions[bot] Jan 17, 2024
2f60ca7
This branch was auto-updated!
github-actions[bot] Jan 17, 2024
bab688e
Differentiate btn free and developer plans
nghi-ly Jan 17, 2024
92f34a7
Merge branch 'ly-docs-ci-jobs' of github.com:dbt-labs/docs.getdbt.com…
nghi-ly Jan 17, 2024
4670729
This branch was auto-updated!
github-actions[bot] Jan 17, 2024
cb67daa
This branch was auto-updated!
github-actions[bot] Jan 17, 2024
e16c845
This branch was auto-updated!
github-actions[bot] Jan 17, 2024
2466c0d
This branch was auto-updated!
github-actions[bot] Jan 18, 2024
3790e35
This branch was auto-updated!
github-actions[bot] Jan 18, 2024
2afccb9
This branch was auto-updated!
github-actions[bot] Jan 18, 2024
f8bdd5a
This branch was auto-updated!
github-actions[bot] Jan 18, 2024
5eb237c
This branch was auto-updated!
github-actions[bot] Jan 19, 2024
f47fbf3
This branch was auto-updated!
github-actions[bot] Jan 19, 2024
e534328
This branch was auto-updated!
github-actions[bot] Jan 19, 2024
c7c173a
This branch was auto-updated!
github-actions[bot] Jan 19, 2024
bc098b6
This branch was auto-updated!
github-actions[bot] Jan 19, 2024
4025d83
This branch was auto-updated!
github-actions[bot] Jan 22, 2024
cedaff6
This branch was auto-updated!
github-actions[bot] Jan 22, 2024
ebb488f
This branch was auto-updated!
github-actions[bot] Jan 22, 2024
68e7d20
This branch was auto-updated!
github-actions[bot] Jan 22, 2024
c18a172
Update website/docs/docs/deploy/ci-jobs.md
nghi-ly Jan 22, 2024
4596048
Feedback
nghi-ly Jan 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions website/docs/docs/deploy/ci-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ You can set up [continuous integration](/docs/deploy/continuous-integration) (CI

dbt Labs recommends that you create your CI job in a dedicated dbt Cloud [deployment environment](/docs/deploy/deploy-environments#create-a-deployment-environment) that's connected to a staging database. Having a separate environment dedicated for CI will provide better isolation between your temporary CI schema builds and your production data builds. Additionally, sometimes teams need their CI jobs to be triggered when a PR is made to a branch other than main. If your team maintains a staging branch as part of your release process, having a separate environment will allow you to set a [custom branch](/faqs/environments/custom-branch-settings) and, accordingly, the CI job in that dedicated environment will be triggered only when PRs are made to the specified custom branch. To learn more, refer to [Get started with CI tests](/guides/set-up-ci).


### Prerequisites
- You have a dbt Cloud account.
- For the [Concurrent CI checks](/docs/deploy/continuous-integration#concurrent-ci-checks) and [Smart cancellation of stale builds](/docs/deploy/continuous-integration#smart-cancellation) features, your dbt Cloud account must be on the [Team or Enterprise plan](https://www.getdbt.com/pricing/).
- You must be connected using dbt Cloud’s native Git integration with [GitHub](/docs/cloud/git/connect-github), [GitLab](/docs/cloud/git/connect-gitlab), or [Azure DevOps](/docs/cloud/git/connect-azure-devops).
nghi-ly marked this conversation as resolved.
Show resolved Hide resolved
- With GitLab, you need a paid or self-hosted account which includes support for GitLab webhooks and [project access tokens](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html). With GitLab Free, merge requests will invoke CI jobs but CI status updates (success or failure of the job) will not be reported back to GitLab.
- If you previously configured your dbt project by providing a generic git URL that clones using SSH, you must reconfigure the project to connect through dbt Cloud's native integration.
- If you're using [GitLab](/docs/cloud/git/connect-gitlab), you need a paid or self-hosted account which includes support for GitLab webhooks and [project access tokens](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html). With GitLab Free, merge requests will invoke CI jobs but CI status updates (success or failure of the job) will not be reported back to GitLab.
nghi-ly marked this conversation as resolved.
Show resolved Hide resolved
- If you previously configured your dbt project by providing a generic git URL that clones using SSH, you must reconfigure the project to connect through dbt Cloud's native integration.
nghi-ly marked this conversation as resolved.
Show resolved Hide resolved


To make CI job creation easier, many options on the **CI job** page are set to default values that dbt Labs recommends that you use. If you don't want to use the defaults, you can change them.
Expand Down Expand Up @@ -63,12 +63,13 @@ If you're not using dbt Cloud’s native Git integration with [GitHub](/docs/cl


1. Set up a CI job with the [Create Job](/dbt-cloud/api-v2#/operations/Create%20Job) API endpoint using `"job_type": ci` or from the [dbt Cloud UI](#set-up-ci-jobs).
nghi-ly marked this conversation as resolved.
Show resolved Hide resolved
1. Call the [Trigger Job Run](/dbt-cloud/api-v2#/operations/Trigger%20Job%20Run) API endpoint to trigger the CI job. You must include these fields to the payload:
- Provide the pull request (PR) ID with one of these fields, even if you're using a different Git provider (like Bitbucket). This can make your code less human-readable but it will _not_ affect dbt functionality.
1. Call the [Trigger Job Run](/dbt-cloud/api-v2#/operations/Trigger%20Job%20Run) API endpoint to trigger the CI job. You must include both of these fields to the payload:
- Provide the pull request (PR) ID using one of these fields:

- `github_pull_request_id`
- `gitlab_merge_request_id`
- `azure_devops_pull_request_id` 
- `azure_devops_pull_request_id`
- `non_native_pull_request_id` (for example, BitBucket)
nghi-ly marked this conversation as resolved.
Show resolved Hide resolved
- Provide the `git_sha` or `git_branch` to target the correct commit or branch to run the job against.

## Example pull requests
Expand Down
Loading