Hello there !
I am new to Bitbucket pipelines coming from Jenkins.
I want to have a pipeline with the following tasks:
I implemented those tasks using multiple step
.
All steps are using the same Docker container which is cached and restored for each step. This process of caching/restoring is time consuming.
Also, those steps are defined and then used as YAML anchors and references to avoid duplication: reshuffled steps depending on the branch (a feature branch, develop, main, …).
My question: Is there a way to get all the following:
step
and YAML reference)Thanks for your support !
If your commands are one-line, just have one step per branch type/group and run them together.
If the commands are more complex, my recommendation is to implement these tasks externally to the pipeline/steps, IE, use a build script: gradle, maven, sh file, etc'. This will simplify the commands, or even group of commands, to one-liners and you can use the first option.
one step per branch (...) and run them together
Yes I can do that, but it does not match my third requirement:
Having a single step means having a single node in the Pipeline graph. I wish I could split tasks within a single node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the visual representation you would have:
You can see each command has its own line so it's very easy to see which one failed.
Basically, each step in the pipeline is running on a different container. if you need to share data between the steps, you would need to use cache/artifacts mechanism or some other way to inject the data into the containers (git clone/ftp/download/etc').
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Erez Maadani I understand that there are no better options.
I implemented my Bitbucket pipeline according to your suggestion.
I saves run time, yet I'm still frustrated with the single step green bullet in the pipeline graphical view.... 🤷🏻♂️
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.