module Gitlab::Client::BuildVariables

def create_variable(project, key, value, **opts)

Returns:
  • (Gitlab::ObjectifiedHash) - The variable.

Parameters:
  • opts (Hash) -- optional parameters
  • value (String) -- The value of a variable
  • key (String) -- The key of a variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9` and `_` are allowed
  • project (Integer, String) -- The ID or name of a project.
def create_variable(project, key, value, **opts)
  post("/projects/#{url_encode project}/variables", body: opts.merge(key: key, value: value))
end