Skip to content

Commit bf5c384

Browse files
authored
Merge pull request #1 from bb-cli/dev
add env command page also update autocomplete
2 parents 415a026 + 3f49701 commit bf5c384

3 files changed

Lines changed: 39 additions & 6 deletions

File tree

autocomplete.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ You may add something like this to add auto completion feature.
1515

1616
```
1717
_bb_autocomplete() {
18-
local pipeline_commands="get latest wait run"
19-
local pr_commands="list diff commits approve no-approve request-changes no-request-changes decline merge create"
20-
local branch_commands="list user name"
21-
local auth_commands="save show"
22-
23-
_arguments "1: :(pr pipeline branch auth browse upgrade)" "2: :(help $pipeline_commands $pr_commands $branch_commands $auth_commands)"
18+
_arguments "1: :(help $(bb autocomplete))" "2: :(help $(bb $words[2] autocomplete))"
2419
}
2520
2621
compdef _bb_autocomplete bb

docs/commands/env.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: default
3+
title: Environment
4+
parent: Commands
5+
---
6+
7+
# Environment
8+
{: .no_toc }
9+
10+
All commands for pipeline.
11+
{: .fs-6 .fw-300 }
12+
13+
## List
14+
`bb env environments` Lists all environments.
15+
16+
## Variables
17+
`bb env variables <env-uuid>` Lists all environment variables.
18+
19+
## Create Environment Variable
20+
`bb env create-variable <env-uuid> <key> <value> <secured: 0>` Creates a new environment variable.
21+
22+
## Update Environment Variable
23+
`bb env update-variable <env-uuid> <var-uuid> <key> <value> <secured: 0>` Updates an environment variable.
24+
25+
## Example
26+
```bash
27+
env-update() {
28+
bb env update-variable \
29+
'{XXXX-YYYY-XXXX-YYYY-environment-uuid}' \
30+
'{XXXX-YYYY-XXXX-YYYY-variable-uuid}' \
31+
ENV \
32+
"$(cat ~/Code/project/.env| base64)" \
33+
1
34+
}
35+
```

docs/commands/pipeline.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ All commands for pipeline.
2121

2222
## Run
2323
`bb pipeline run <branch-name>` Runs pipeline for given branch (defined in bitbucket-pipelines.yml file).
24+
25+
## Custom
26+
`bb pipeline custom <branch> <pipeline-name>` Runs given pipeline for given branch.

0 commit comments

Comments
 (0)