I have defined a reusable step in my Bitbucket pipeline that runs a script for different IMAGE_NAME
values. Currently, I pass the IMAGE_NAME
one by one in the script
section for each step. Is there a way to pass all the IMAGE_NAME
values together to a single step, or iterate over them without overriding the variables
section for each step?
Current Setup:
variables
section that includes common variable
.Goal:
common variable
.Challenges:
variables
section in Bitbucket pipelines is static and cannot be dynamically overridden within a single step.G'day, @Supul Pushpakumara
Welcome to the community!
I believe what you are looking for can be achieved through the use of dynamic pipelines.
Dynamic pipelines provide significant flexibility to traditionally static YAML pipeline configurations by allowing runtime modifications through application-level logic. One key feature they offer is the ability to utilize environment, repository, or workspace variables to define Docker image names for use in CI/CD workflows. This capability enables you to dynamically modify each step of the pipeline as needed.
I hope this helps.
Regards,
Syahrul
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.