Bitbucket Pipelines Pipe: Create and Update Repository variables
381
This pipe simplifies creating variables within your repository.
Add the following snippet to the script section of your bitbucket-pipelines.yml file:
# Creatinng Bearer Tokens
- pipe: docker://computronix/bitbucket-pipe-repovariable:0.3.0
variables:
type: Bearer
bitbucket_api_oauthconsumer_key: '<string>'
bitbucket_api_oauthconsumer_secret: '<string>'
# variable_name: 'string' #Optional
# action: 'create' or 'delete' defaults to create
#Creating other variables
- pipe: docker://computronix/bitbucket-pipe-repovariable:0.3.0
variables:
variable_name: '<string>'
variable_value: '<string>'
type: 'other'
sensitive: '<boolean>'
bitbucket_api_oauthconsumer_key: '<string>'
bitbucket_api_oauthconsumer_secret: '<string>'
# action: 'create' or 'delete' defaults to create
| Variable | Usage |
|---|---|
| variable_name | Name of the variable to create / update |
| variable_value | Value of the variable to create / update |
| action | Create or Delete a repo variable |
| type | Bearer to create a bearer token Other for any variable name and value |
| sensitive | If the variable should be secret. If the type is Bearer the variable will default and can not be overridden to sensitive |
| bitbucket_api_oauthconsumer_key | Oauth consumer key for the workspace |
| bitbucket_api_oauthconsumer_secret | Oauth consumer secret for the workspace |
Example creating a BEARER_TOKEN to access and update variables :
script:
- pipe: docker://computronix/bitbucket-pipe-repovariable:1.0.0
variables:
type: Bearer
bitbucket_api_oauthconsumer_key: '<string>'
bitbucket_api_oauthconsumer_secret: '<string>'
Or to create a variable with any name and value:
script:
- pipe: docker://computronix/bitbucket-pipe-repovariable:1.0.0
variables:
type: other
action: create
variable_name: myNewVar
variable_name: myNewVarValue
sensitive: 'true'
bitbucket_api_oauthconsumer_key: '<string>'
bitbucket_api_oauthconsumer_secret: '<string>'
If you're reporting an issue, please include:
Apache 2.0 licensed, see LICENSE.txt file.
Content type
Image
Digest
sha256:f875c16fb…
Size
5.7 MB
Last updated
about 4 years ago
docker pull computronix/bitbucket-pipe-repovariable:1.0.1