Bitbucket Pipelines
This walkthrough shows you how to use CloudTruth parameters with Bitbucket Pipelines.
Last updated
Was this helpful?
This walkthrough shows you how to use CloudTruth parameters with Bitbucket Pipelines.
Last updated
Was this helpful?
You have a .
You have created one or more .
You have created a .
You can get started with Bitbucket using a .
Add your generated CloudTruth API access token as a namedCLOUDTRUTH_API_KEY
in your Repository settings > Pipelines > Repository variables. This allows the Bitbucket repository to securely access parameters stored in CloudTruth across all deployment environments.
You can install the CLI with the following code snippet as part of a Bitbucket step in bitbucket-pipelines.yml. This will install the latest supported version and also verify the CLI is installed correctly by printing the version.
We then use the CloudTruth CLI run command to print only CloudTruth variables that can now be accessed in your pipeline.
Running this pipeline will install the CloudTruth CLI and print parameter values retrieved from CloudTruth.
In future pipeline steps you can source the dotenv artifact. The command source dotenv
will execute the dotenv export allowing you to reference the variables in downstream stages without the CloudTruth CLI.
The complete bitbucket-pipelines.yml passing variables between steps.
Running this pipeline will install the CloudTruth CLI and print the parameter values across multiple steps.
You can use variables across Bitbucket pipeline steps by creating an export formatted environment file and storing the file using . This snippet uses the CloudTruth CLI to create an export dotenv file with values pulled from CloudTruth.