-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a55911
commit 01f356f
Showing
7 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: Bitbucket Pipeilnes | ||
description: Examples and instructions for setting up deps in Bitbucket Pipelines | ||
--- | ||
|
||
# Bitbucket Pipelines | ||
|
||
## 1. Add deps to bitbucket-pipelines.yml | ||
|
||
Add a custom pipeline so that it will only run from a schedule. | ||
|
||
This example shows two different languages in use, | ||
each running in their own container. The `--type` option is used to run the specific language updates in their respective containers. | ||
|
||
> Note: Bitbucket Pipelines are supported by [CI autoconfigure](/ci/#autoconfigure). | ||
A minimal example of using deps in `bitbucket-pipelines.yml` would look like this: | ||
|
||
```yaml | ||
clone: | ||
depth: full | ||
|
||
pipelines: | ||
custom: | ||
deps: | ||
- parallel: | ||
- step: | ||
image: "python:3.7" | ||
script: | ||
- curl https://www.dependencies.io/install.sh | bash -s -- -b $HOME/bin | ||
- $HOME/bin/deps ci --type python | ||
- step: | ||
image: "node:latest" | ||
script: | ||
- curl https://www.dependencies.io/install.sh | bash -s -- -b $HOME/bin | ||
- $HOME/bin/deps ci --type js | ||
``` | ||
## 2. Set the pipeline repository variables | ||
For a standard Bitbucket repo, you will need a `DEPS_TOKEN`, `DEPS_BITBUCKET_USERNAME`, and `DEPS_BITBUCKET_PASSWORD`. | ||
|
||
[![Bitbucket pipeline variables for deps](/assets/img/screenshots/bitbucket-pipeline-variables.png)](/assets/img/screenshots/bitbucket-pipeline-variables.png) | ||
|
||
## 3. Create a pipeline schedule | ||
|
||
Create a daily or weekly schedule to run your new deps pipeline. | ||
|
||
[![Bitbucket pipeline schedule for deps](/assets/img/screenshots/bitbucket-pipeline-schedule.png)](/assets/img/screenshots/bitbucket-pipeline-schedule.png) | ||
|
||
## 4. Test the pipeline manually | ||
|
||
If you want to test your new pipeline without waiting for the schedule, | ||
just navigate to the commit view and click "run pipeline". | ||
|
||
[![Bitbucket pipeline manual run for deps](/assets/img/screenshots/bitbucket-pipeline-manual.png)](/assets/img/screenshots/bitbucket-pipeline-manual.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,40 @@ | ||
# BitBucket | ||
# Bitbucket | ||
|
||
> Docs coming soon! | ||
To give deps write-access to your repo and pull requests, you'll create an *app password*. | ||
You can use your personal account to do this, or a "bot" account that your team has. | ||
|
||
## App password | ||
|
||
1. Log in with the account you want deps to use (this will be the author of deps pull requests) | ||
1. Give it access to the repo you're setting up | ||
1. Generate a new app password with the repositories and pull requests `write` scopes | ||
[![Bitbucket app password settings for deps](/assets/img/screenshots/bitbucket-app-password.png)](/assets/img/screenshots/bitbucket-app-password.png) | ||
1. Set the required environment variables in your CI | ||
- `DEPS_BITBUCKET_USERNAME` to the user who owns the app password | ||
- `DEPS_BITBUCKET_PASSWORD` to the app password from above | ||
|
||
## Pull request settings | ||
|
||
When working with a Bitbucket repo, | ||
there are a few settings you can use to determine what your pull requests look like. | ||
|
||
```yaml | ||
version: 3 | ||
dependencies: | ||
- type: python | ||
settings: | ||
bitbucket_destination: "dev" # branch name | ||
bitbucket_close_source_branch: true | ||
bitbucket_reviewers: | ||
- uuid: "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" | ||
``` | ||
If you don't need a `deps.yml` then you can also configure these settings via environment variables. | ||
This is an easy way to put settings directly in your CI config. | ||
|
||
Note that they'll need to be in the format of a JSON-encoded string, | ||
with an uppercase name prefixed by `DEPS_SETTING_`. | ||
|
||
```sh | ||
$ DEPS_SETTING_BITBUCKET_CLOSE_SOURCE_BRANCH='true' deps ci | ||
``` |