Welcome to mirror list, hosted at ThFree Co, Russian Federation.

shell_env.rb « backend « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 044afb27f3fad36c760e8ba0dabd96a53db11809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Gitlab
  # This module provide 2 methods
  # to set specific ENV variables for GitLab Shell
  module ShellEnv
    extend self

    def set_env(user)
      # Set GL_ID env variable
      ENV['GL_ID'] = "user-#{user.id}"
    end

    def reset_env
      # Reset GL_ID env variable
      ENV['GL_ID'] = nil
    end
  end
end