• Rémy Coutable's avatar
    Merge branch '22191-delete-dynamic-envs-mr' into 'master' · f0c7e671
    Rémy Coutable authored
    Delete dynamic environments
    
    - 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
    
    #### 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
    ```
    
    Closes #22191 
    
    See merge request !6669
    f0c7e671
project.rb 39.5 KB