Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket Pipelines: Using variable with pipe command

glenn_comiskey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2021

Hi, I use the Git Secrets Scan in all my pipelines using the hard coded command:

- pipe: atlassian/git-secrets-scan:x.y.z.

This requires me to update each pipeline a new version of Git Secrets Scan is released. Is there a way to pass the docker image or pipe command using a variable:

Workspace Variable: GIT_SECRETS_SCAN = atlassian/git-secrets-scan:x.y.x

- pipe: $GIT_SECRETS_SCAN

Workspace Variable: GIT_SECRETS_SCAN = pipe: atlassian/git-secrets-scan:x.y.z

- $GIT_SECRETS_SCAN

TIA.

2 answers

0 votes
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2024

Hi all,

 

Here is an article and a video with a working example of how this can be achieved using Dynamic Pipelines and a Forge app.

 

The example shows how to replace the variable in an image name, but it can also be used as-is to substitute pipe names.

 

Hope this helps,
Caterina

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2021

Hi, @glenn_comiskey!

Thank you for reaching out to Atlassian Community!

Currently, Bitbucket Pipelines doesn't support variables for the Pipe name in the bitbucket-pipelines.yml file. However, we already have a feature request to add this option as you can see here:

Implementation of new features is done as per our policy here and any updates will be posted in the feature request. 

I would suggest that you add your vote there (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. 

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Feel free to share any additional questions or concerns regarding this case.

Kind regards,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events