You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.