Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab Community Edition
GitLab Community Edition
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 13,963
    • Issues 13,963
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 802
    • Merge Requests 802
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Registry
    • Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLab Community EditionGitLab Community Edition
  • Merge Requests
  • !7983

Merged
Opened Dec 08, 2016 by Nick Thomas@nick.thomas💃9 of 9 tasks completed9/9 tasks
  • Report abuse
Report abuse

Add a slug to environments

What does this MR do?

Adds a slug field to the environments table, populating existing rows and ensuring that new rows will get an entry.

Cleaning examples:

  • review/foo => review-foo-5gghdf
  • review-foo => review-foo
  • 1-foo => env-1-foo-e2hx12
  • production => production
  • Production => production-f8ddlz

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

This migration requires downtime. I don't see a way to avoid it.

Why was this MR needed?

External services often have more restrictive rules on naming than those enforced for environments.name. In particular, forward slashes and names longer than 24 characters causes problems on OpenShift. slug is designed to be an acceptable alternative to name in these situations. Since forward slashes are a documented part of environment names, to set environment types, we need an envionmnent slug, not just a slug for the branch name.

Does this MR meet the acceptance criteria?

  • Changelog entry added
  • Documentation created/updated
  • API support added
  • 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 it does - rebase it please)
  • Squashed related commits together

What are the relevant issue numbers?

Part of #22864 (closed)

  • Discussion 93
  • Commits 4
  • Pipelines 24
  • Changes 22
Kamil Trzciński
Assignee
Kamil Trzciński @ayufan
Assign to
8.15
Milestone
8.15
Assign milestone
Time tracking
1
Labels
CI/CD [DEPRECATED]
Assign labels
  • View project labels
Reference: gitlab-org/gitlab-ce!7983

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.