Gitlab environment UI reports no “stop environment action” defined, but clicking stop does run stop action.

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Summary

I have an environment configured with an on_stop job. When stopping this environment in the environment UI, there is a warning saying that:

Note that this action will stop the environment, but it will not have an effect on any existing deployment due to no “stop environment action” being defined in the .gitlab-ci.yml file. However, clicking Stop environment does actually trigger the on_stop job and it successfully executes.

Steps to reproduce

Here is a minimal example: https://gitlab.com/pjgjordaan/test-repo/-/blob/main/.gitlab-ci.yml

Simply execute a pipeline and then stop the environment.

Example Project

https://gitlab.com/pjgjordaan/test-repo

What is the current bug behavior?

Warning about configured "stop environment action".

What is the expected correct behavior?

No warning is displayed because there is an on_stop job configured.

Relevant logs and/or screenshots

Skermskoot_vanaf_2024-03-11_12-20-23

Output of checks

This bug happens on GitLab.com

Edited Sep 24, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading