Showing posts with label conditions. Show all posts
Showing posts with label conditions. Show all posts

Thursday, September 25, 2025

How to Use Painless Scripts for Conditional Logic in Ingest Pipelines

In the ELK stack, an ingest pipeline is used to process and transform documents before they are indexed into Elasticsearch. There are several processors available in an ingest pipeline that can be applied to transform documents. To perform transformations effectively, it is sometimes necessary to use conditions. This blog explains how to add conditions in ingest pipelines.

Prerequisites:

  • An Elastic Stack account
  • An ingest pipeline configured in Elasticsearch

Wednesday, February 26, 2025

Conditional Variable Assignment in Azure DevOps Pipelines

Azure DevOps pipeline expression functions enable the creation of powerful Azure DevOps YAML pipelines to achieve various advanced automation needs for build and deployment purposes. This blog explains how to use the if condition with pipeline variable values.

In an Azure DevOps YAML pipeline, a variable if condition can be defined as follow

iif(condition, the_value_returns_when_condition_true, the_value_returns_when_condition_false) 

Wednesday, October 9, 2024

Optimizing CI/CD Pipelines by Looping Jobs with Dependencies in YAML

This blog explains how to create multiple jobs using an array and define a final job that depends on the previous loop jobs.

The following is the first YAML template file ( deploystage.yaml) with stages. Under the jobs section, it includes two templates. The first template is called within a loop, creating multiple jobs.