Class: Infrawrench::DeploymentsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::DeploymentsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.deployments
Instance Attribute Summary collapse
-
#runs ⇒ DeploymentsRunsNamespace
readonly
client.deployments.runs. -
#triggers ⇒ DeploymentsTriggersNamespace
readonly
client.deployments.triggers.
Instance Method Summary collapse
-
#envs(org_id: nil, body: nil, request_options: nil) ⇒ Hash
List the environments a repository's Infrafile declares.
-
#initialize(transport) ⇒ DeploymentsNamespace
constructor
private
A new instance of DeploymentsNamespace.
-
#plan(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Preview a deploy without building.
-
#repos(org_id: nil, request_options: nil) ⇒ Array<Hash>
List repositories this organization can deploy from.
Constructor Details
#initialize(transport) ⇒ DeploymentsNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DeploymentsNamespace.
3163 3164 3165 3166 3167 |
# File 'lib/infrawrench/client.rb', line 3163 def initialize(transport) @transport = transport @runs = DeploymentsRunsNamespace.new(@transport) @triggers = DeploymentsTriggersNamespace.new(@transport) end |
Instance Attribute Details
#runs ⇒ DeploymentsRunsNamespace (readonly)
Returns client.deployments.runs.
3157 3158 3159 |
# File 'lib/infrawrench/client.rb', line 3157 def runs @runs end |
#triggers ⇒ DeploymentsTriggersNamespace (readonly)
Returns client.deployments.triggers.
3159 3160 3161 |
# File 'lib/infrawrench/client.rb', line 3159 def triggers @triggers end |
Instance Method Details
#envs(org_id: nil, body: nil, request_options: nil) ⇒ Hash
List the environments a repository's Infrafile declares
Reads Infrafile at the branch head and returns its declared
environments. The file is parsed, not executed.
Requires permission: deployments:read.
POST /api/org/orgId/deployments/envs
Raises on 400: Bad request
Raises on 401: Unauthenticated
Raises on 403: Forbidden
Raises on 404: Not found
3192 3193 3194 3195 3196 3197 3198 3199 3200 |
# File 'lib/infrawrench/client.rb', line 3192 def envs(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/deployments/envs", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#plan(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Preview a deploy without building
Runs the Infrafile's plan() and renders its Dockerfile, then stops.
Nothing is built or deployed.
Requires permission: deployments:plan.
POST /api/org/orgId/deployments/plan
Raises on 400: Bad request
Raises on 401: Unauthenticated
Raises on 403: Forbidden
Raises on 404: Not found
3225 3226 3227 3228 3229 3230 3231 3232 3233 |
# File 'lib/infrawrench/client.rb', line 3225 def plan(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/deployments/plan", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#repos(org_id: nil, request_options: nil) ⇒ Array<Hash>
List repositories this organization can deploy from
Repositories visible to the organization's GitHub App installations. Empty when the app is not configured.
Requires permission: deployments:read.
GET /api/org/orgId/deployments/repos
Raises on 401: Unauthenticated
Raises on 403: Forbidden
3254 3255 3256 3257 3258 3259 3260 3261 |
# File 'lib/infrawrench/client.rb', line 3254 def repos(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/deployments/repos", path_params: { "orgId" => org_id }, request_options: ) end |