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
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and 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.orgGitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #38718
Closed (moved) (moved)
Open
Issue created Oct 03, 2017 by Achilleas Pipinellis@axil🐸Developer

Provide a mechanism to clean up stale environments

Description

So, this is coming from a problem we're currently facing.

We have the review-docs manual job which created review-docs environments. As you can see, we currently have almost 500 environments, 95% of which do not have a deployment.

The environments are created when the job is in created state, which means even if it's a manual job.

Proposal

Provide a button that will stop and delete all environments that are currently with no deployment, or are older than a specified date. That action would be similar to the "Delete merged branches" https://docs.gitlab.com/ee/user/project/repository/branches/index.html#delete-merged-branches.

A separate API update to make this possible from a script is also being considered at https://gitlab.com/gitlab-org/gitlab-ee/issues/5582.

Use cases

For people struggling to clean up stale environments.

UX Proposal

Here are some preliminary mock-ups.

Environments page

Add a button to the header to link to the clean up environments page.

Enviornments

Clean up enviornments page

Clean_Up

Scenario Mockup
Old environments unchecked Clean_Up_Disable
Date input error Clean_Up_Error

Specifications

  • Default to both No deployment environments and Old environments checked
  • Disable date input if Old environments is unchecked
  • Default date input to 30 days in the past
  • Validate date input and disable Clean up button if invalid
  • Environments with no deployments will be used instead of No deployment environments

Feature checklist

Make sure these are completed before closing the issue, with a link to the relevant commit.

  • Feature assurance
  • Documentation
  • Added to features.yml
Edited Sep 10, 2019 by Mike Nichols
Assignee
Assign to
Time tracking