Introduction
Sometimes you need your automation to do many different things depending on the situation. Scripted pipelines let you write code that can change how it works based on conditions, loops, or inputs. This helps you handle complex tasks in your software delivery process.
When your build steps need to change based on the branch or environment.
When you want to run different tests depending on the code changes.
When you need to add loops or conditional logic to your deployment process.
When you want to reuse code blocks or functions inside your pipeline.
When you want full control over the flow of your automation steps.