Skip to content

GitLab Next

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

GitLab 15.0 is launching on May 22! This version brings many exciting improvements, but also removes deprecated features and introduces breaking changes that may impact your workflow. To see what is being deprecated and removed, please visit Breaking changes in 15.0 and Deprecations.

  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge requests
  • !6669
Project 'gitlab-org/gitlab-ce' was moved to 'gitlab-org/gitlab-foss'. Please update any links and bookmarks that may still have the old path.
Merged
Created Oct 04, 2016 by Filipa Lacerda@filipaContributor6 of 9 tasks completed6/9 tasks
  • Review changes

  • Download
  • Email patches
  • Plain diff

Delete dynamic environments

  • Overview 101
  • Commits 50
  • Pipelines 34
  • Changes 33

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?

  • CHANGELOG entry added
  • Documentation created/updated (@axil will create a separate MR on top of this one)
  • API support added (this is already possible with use of Pipeline API)
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Conform by the merge request performance guides
  • Conform by the style guides
  • Branch has no merge conflicts with master (if you do - rebase it please)
  • Squashed related commits together

What are the relevant issue numbers?

#22191 (closed)

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 22191-delete-dynamic-envs-mr