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.
2539 2540 2541 2542 2543 |
# File 'lib/infrawrench/client.rb', line 2539 def initialize(transport) @transport = transport @runs = DeploymentsRunsNamespace.new(@transport) @triggers = DeploymentsTriggersNamespace.new(@transport) end |
Instance Attribute Details
#runs ⇒ DeploymentsRunsNamespace (readonly)
Returns client.deployments.runs.
2533 2534 2535 |
# File 'lib/infrawrench/client.rb', line 2533 def runs @runs end |
#triggers ⇒ DeploymentsTriggersNamespace (readonly)
Returns client.deployments.triggers.
2535 2536 2537 |
# File 'lib/infrawrench/client.rb', line 2535 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
2568 2569 2570 2571 2572 2573 2574 2575 2576 |
# File 'lib/infrawrench/client.rb', line 2568 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
2601 2602 2603 2604 2605 2606 2607 2608 2609 |
# File 'lib/infrawrench/client.rb', line 2601 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
2630 2631 2632 2633 2634 2635 2636 2637 |
# File 'lib/infrawrench/client.rb', line 2630 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 |