Skip to content

Fix Merge Request accidentally stops unrelated environments

What does this MR do and why?

When I was doing QA on production environment, I realized that the previous fix was not enough to prevent the accidental stops.

We have to target only successful deployments that executed on the pipeline. I've confirmed that this MR fixes the issue.

A few notes:

Screenshots or screen recordings

Peek_2022-04-07_19-36

How to set up and validate locally

  1. Create a project and setup a runner.
  2. Run a pipeline with the following setting:
start review:
    script: echo
    environment:
        name: dev
        on_stop: stop review
    when: manual

stop review:
    script: echo
    environment:
        name: dev
        action: stop
    when: manual

prepare for dev:
    script: echo
    environment:
        name: dev
        action: prepare
  1. Run a start review job on master pipeline.
  2. Create a merge request, run a feature pipeline and merge it.
  3. Make sure the dev environment is still active.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Shinya Maeda

Merge request reports

Loading