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.
2566 2567 2568 2569 2570 |
# File 'lib/infrawrench/client.rb', line 2566 def initialize(transport) @transport = transport @runs = DeploymentsRunsNamespace.new(@transport) @triggers = DeploymentsTriggersNamespace.new(@transport) end |
Instance Attribute Details
#runs ⇒ DeploymentsRunsNamespace (readonly)
Returns client.deployments.runs.
2560 2561 2562 |
# File 'lib/infrawrench/client.rb', line 2560 def runs @runs end |
#triggers ⇒ DeploymentsTriggersNamespace (readonly)
Returns client.deployments.triggers.
2562 2563 2564 |
# File 'lib/infrawrench/client.rb', line 2562 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
2595 2596 2597 2598 2599 2600 2601 2602 2603 |
# File 'lib/infrawrench/client.rb', line 2595 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
2628 2629 2630 2631 2632 2633 2634 2635 2636 |
# File 'lib/infrawrench/client.rb', line 2628 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
2657 2658 2659 2660 2661 2662 2663 2664 |
# File 'lib/infrawrench/client.rb', line 2657 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 |