Updated on 2025-01-17 GMT+08:00

Overview

Scenario

When Jenkins is used to build, deploy, and upgrade microservice components, the upgrade involves multiple microservice components. Each component has an independent pipeline for build, deployment, and upgrade. However, components depend on each other. The pipeline can be upgraded only after the dependent components are upgraded. Otherwise, basic functions may be abnormal.

During the upgrade, you need to check whether the dependent components are upgraded before upgrading the next component.

Solution

Create a Jenkins pipeline to orchestrate multiple components and automatically upgrade them based on the dependency sequence. The parameterized build mode is used to support the upgrade of one or more components.

The following uses an example to describe a pipeline execution process.

There are components A, B, C, and D. Component D depends on components B and C, and components B and C depend on component A.

Pipeline execution process: