liveBook · Manning

Yq

As explained in Machine Learning Platform Engineering

yq is a command-line processor for querying and modifying YAML documents.

yq is a command-line processor used in CI/CD pipelines to modify YAML configuration files. After building and pushing a Docker image, a pipeline uses yq to update the image tag in a Helm values.yaml file, then commits and pushes the change. section 3.4.1

Updating a Helm deployment image

A GitLab CI pipeline runs testing, builds an image tagged with a shortened commit ID, and invokes yq during its update stage to change the Helm chart's values.yaml. The pipeline then clones the repository, commits the modified YAML, and pushes it back. section 3.4.1

How Machine Learning Platform Engineering covers it

How deep it goes
Shows operational integration for modifying values.yaml but does not detail yq query or expression syntax.
Examples
Uses a shortened CI_COMMIT_SHA to update a Helm values.yaml image tag after pushing a Docker image.
What it assumes
Assumes familiarity with YAML, Git repositories, Docker images, Helm charts, and GitLab CI pipelines.
What you can do after
Operate/configure automated Helm updates by modifying YAML from a GitLab CI job.
How it connects
Connects YAML modification with GitLab CI, Helm, Docker images, Git repositories, and CI/CD variables.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.