Skip to content

Delete dynamic environments

Filipa Lacerda requested to merge 22191-delete-dynamic-envs-mr into master

What does this MR do?

  • Adds "close environment" action to a merge request
  • Adds tabs to environments list
  • Adds close button to each environment row in environments list
  • Replaces Destroy button with Close button inside an environment
  • Adds close button to builds list inside an environment

Are there points in the code the reviewer needs to double check?

Adds "close environment" action to a merge request

Yes. I am unsure if it should be a link. And it needs to be updated to the correct path. //cc @ayufan where should this point to?

Adds tabs to environments list

Unsure if scopeis correct

Adds close button to each environment row in environments list
Adds close button to builds list inside an environment

It's just a button with no action.

Replaces Destroy button with Close button inside an environment

Still binding to deletemethod.

Pipeline graph

No action done. I believe I need more data, is that correct? // cc @ayufan

Why was this MR needed?

Delete dynamic environments

Screenshots (if relevant)

Merge Request

mr_with_external_link mr_without_external_link

Environments List

env_tabs env_list_buttons

Environment Details

destroy_button close_button_builds_list

Configuration

In order to enable stopping environments a valid .gitlab-ci.yml syntax has to be used:

review:
  environment:
    name: review/$app
    on_stop: stop_review

stop_review:
  script: echo Delete My App
  when: manual
  environment:
    name: review/$app
    action: stop

This MR requires that stop_review has to have: when, environment:name and environment:action defined. The next MR after this one will verify that and enforce that these settings are configured.

It will also implicitly configure these settings, making it possible to define it like this:

review:
  environment:
    name: review/$app
    on_stop: stop_review

stop_review:
  script: echo Delete My App

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#22191 (closed)

Merge request reports

Loading