Module: Gitlab::Client::BuildVariables
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/build_variables.rb
Overview
Defines methods related to builds.
Instance Method Summary collapse
-
#create_group_variable(group, key, value, **opts) ⇒ Gitlab::ObjectifiedHash
Create a build variable for a group.
-
#create_variable(project, key, value, **opts) ⇒ Gitlab::ObjectifiedHash
Create a build variable for a project.
-
#group_variable(group, key) ⇒ Gitlab::ObjectifiedHash
Gets details of a group’s specific build variable.
-
#group_variables(group) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of the group’s build variables.
-
#remove_group_variable(group, key) ⇒ Gitlab::ObjectifiedHash
Remove a group’s build variable.
-
#remove_variable(project, key, **opts) ⇒ Gitlab::ObjectifiedHash
Remove a project’s build variable.
-
#update_group_variable(group, key, value, **opts) ⇒ Gitlab::ObjectifiedHash
Update a group’s build variable.
-
#update_variable(project, key, value, **opts) ⇒ Gitlab::ObjectifiedHash
Update a project’s build variable.
-
#variable(project, key) ⇒ Gitlab::ObjectifiedHash
Gets details of a project’s specific build variable.
-
#variables(project) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of the project’s build variables.
Instance Method Details
#create_group_variable(group, key, value, **opts) ⇒ Gitlab::ObjectifiedHash
Create a build variable for a group.
105 106 107 |
# File 'lib/gitlab/client/build_variables.rb', line 105 def create_group_variable(group, key, value, **opts) post("/groups/#{url_encode group}/variables", body: opts.merge(key: key, value: value)) end |
#create_variable(project, key, value, **opts) ⇒ Gitlab::ObjectifiedHash
Create a build variable for a project.
41 42 43 |
# File 'lib/gitlab/client/build_variables.rb', line 41 def create_variable(project, key, value, **opts) post("/projects/#{url_encode project}/variables", body: opts.merge(key: key, value: value)) end |
#group_variable(group, key) ⇒ Gitlab::ObjectifiedHash
Gets details of a group’s specific build variable.
91 92 93 |
# File 'lib/gitlab/client/build_variables.rb', line 91 def group_variable(group, key) get("/groups/#{url_encode group}/variables/#{key}") end |
#group_variables(group) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of the group’s build variables
79 80 81 |
# File 'lib/gitlab/client/build_variables.rb', line 79 def group_variables(group) get("/groups/#{url_encode group}/variables") end |
#remove_group_variable(group, key) ⇒ Gitlab::ObjectifiedHash
Remove a group’s build variable.
131 132 133 |
# File 'lib/gitlab/client/build_variables.rb', line 131 def remove_group_variable(group, key) delete("/groups/#{url_encode group}/variables/#{key}") end |
#remove_variable(project, key, **opts) ⇒ Gitlab::ObjectifiedHash
Remove a project’s build variable.
68 69 70 |
# File 'lib/gitlab/client/build_variables.rb', line 68 def remove_variable(project, key, **opts) delete("/projects/#{url_encode project}/variables/#{key}", query: opts) end |
#update_group_variable(group, key, value, **opts) ⇒ Gitlab::ObjectifiedHash
Update a group’s build variable.
119 120 121 |
# File 'lib/gitlab/client/build_variables.rb', line 119 def update_group_variable(group, key, value, **opts) put("/groups/#{url_encode group}/variables/#{key}", body: opts.merge(value: value)) end |
#update_variable(project, key, value, **opts) ⇒ Gitlab::ObjectifiedHash
Update a project’s build variable.
55 56 57 |
# File 'lib/gitlab/client/build_variables.rb', line 55 def update_variable(project, key, value, **opts) put("/projects/#{url_encode project}/variables/#{key}", body: opts.merge(value: value)) end |
#variable(project, key) ⇒ Gitlab::ObjectifiedHash
Gets details of a project’s specific build variable.
27 28 29 |
# File 'lib/gitlab/client/build_variables.rb', line 27 def variable(project, key) get("/projects/#{url_encode project}/variables/#{key}") end |
#variables(project) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of the project’s build variables
15 16 17 |
# File 'lib/gitlab/client/build_variables.rb', line 15 def variables(project) get("/projects/#{url_encode project}/variables") end |