Is there a way for dynamic pipelines to define a step that only exists in the pipelines section instead of in the definitions section in the bitbucket-pipelines.yaml file?
For instance, is it possible for the step named *replace_this_with_step_in_index.js to exist only in the pipelines section as shown below, but have the actual script lines be defined in the index.js?
The use case would be for the index.js to define multiple standard steps, and then only have the stepNames in the pipelines section of the yaml file. That way team members only need to add the steps to the pipelines section.
------------------bitbucket-pipelines.yaml-----------------------
pipelines:
branches:
"**":
- step: *replace_this_with_step_in_index.js
Was able to get it working with bitbucket-pipeline.yaml having something like below, and index.js searches for the step by name and replaces it. This way theres no step definition needed in the definitions section of the yaml file
"**":
[step: {name: nameOfstepToReplace}, step: {name: nameOfStepToReplace}]
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.