Skip to content

Resolve "Auto stop environments after a certain period"

Sarah Groff Hennigh-Palermo requested to merge 20956-autostop-frontend into master

What does this MR do?

This implements the front-end for #20956 (closed), with the backend in !19931 (merged). That is, it adds the ability to view and cancel auto-stop times for environments on the environment table and environment detail page.

Testing locally

To test locally, create a project with a .gitlab-ci.yml that includes an auto_stop_in key and then run the pipeline. auto_stop_in accepts valuse like 20 minutes or 2 days.

Example:

review:
  script: echo 'a'
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    auto_stop_in: 2 days
    on_stop: stop_review

stop_review:
  script: echo 'a'
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    action: stop
  when: manual

Screenshots

environments table environment detail
before Screen_Shot_2019-12-11_at_5.10.57_PM Screen_Shot_2019-12-11_at_5.10.50_PM
after Screen_Shot_2019-12-11_at_4.29.06_PM Screen_Shot_2019-12-11_at_4.10.38_PM
after Screen_Shot_2019-12-11_at_4.29.09_PM Screen_Shot_2019-12-11_at_4.10.41_PM
after Screen_Shot_2019-12-11_at_4.29.12_PM Screen_Shot_2019-12-11_at_4.11.37_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Sarah Groff Hennigh-Palermo

Merge request reports

Loading