Update a delivery pipeline that's already in use

This page describes how to update a delivery pipeline that's already in use.

Change a delivery pipeline

To change your delivery pipeline consists of the following steps:

  1. Edit the delivery-pipeline definition.

  2. Re-register the delivery pipeline:

    gcloud deploy apply --file=PIPELINE_CONFIG
    

    Where PIPELINE_CONFIG is the delivery pipeline configuration file that you just edited.

Results

You might not see the results you expect, because of how Cloud Deploy treats the relationship between pipelines and targets and the releases they manage.

Each release and rollout resource is permanently associated with the pipeline as it was defined when the release was created. If you change a delivery pipeline configuration (including target definitions) after a release is created, that release is now mismatched from the definitions.

Preserving resources in this way ensures they function consistently across the targets and they're not disrupted by configuration changes. However this behavior might not be what you intend, in which case you can create a new release to deploy using the updated pipeline.

Cloud Deploy returns warnings if there's such a mismatch and you try to perform certain actions, such as promote the release.

For more information, see Pipeline instances per release.

What's next