Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #17633

Closed
Open
Opened May 18, 2016 by Jason Tipton@jtipton

Branch Specific Secret Variables

I would like to be able to inject specific CI variables into the runner that are not available to other developers working in the same project. As the maintainer, I need to use deployment keys in the CI scripts and would like to utilize secret variables. Unfortunately, this allows someone to alter the deployment script on any branch, and deploy test code into the production environment. This action can either be malicious or even by mistake. Imagine checking in a YAML change that accidentally removed the "only" clause from the deploy step.

This can be done by allowing the Owner/Master to create "branch variables" that are hidden. At least then I could lock the "production deployment keys" to the "production branch". Then only people with access to the branch itself would be able to use/see the variables, and it prevents other branches from accidentally being deployed.

Alternative default values can be provided for all other branches.

This request relates to Issue #13784 (closed) and #2905 (closed).

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab-foss#17633