I want to be able to centrally control the version of a pipe with a variable but currently this approach does not work:
I set a workspace variable SONARCLOUD_SCAN_VERSION to "2.0.0"
- pipe: sonarsource/sonarcloud-scan:${SONARCLOUD_SCAN_VERSION}
but it failed with:
Configuration error
It looks like you tried to use a pipe in your bitbucket-pipelines.yml that doesn’t exist. Check the name of the pipe and try again.
You seem to need to do this with a hard coded version but we have 200+ repos all using this pipe so I'd prefer to centrally manage that:
- pipe: sonarsource/sonarcloud-scan:2.0.0
Hello @michael.reeves, and welcome to the Community!
Unfortunately, currently the pipe name in Bitbucket Pipelines does not support parsing environment variables. We do have an open feature request to include the usage of variables in the pipe name, which you can access using the below link :
We encourage you to add your Vote on that feature ticket, as it helps the product managers to understand the interest. Also, make sure to add yourself as a Watcher in case you want to receive first-hand updates whenever there's any progress on the implementation of that feature.
Thank you, @michael.reeves !
Patrik S
Thanks for the quick reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.