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.
6840 6841 6842 6843 6844 |
# File 'lib/infrawrench/client.rb', line 6840 def initialize(transport) @transport = transport @runs = DeploymentsRunsNamespace.new(@transport) @triggers = DeploymentsTriggersNamespace.new(@transport) end |
Instance Attribute Details
#runs ⇒ DeploymentsRunsNamespace (readonly)
Returns client.deployments.runs.
6834 6835 6836 |
# File 'lib/infrawrench/client.rb', line 6834 def runs @runs end |
#triggers ⇒ DeploymentsTriggersNamespace (readonly)
Returns client.deployments.triggers.
6836 6837 6838 |
# File 'lib/infrawrench/client.rb', line 6836 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
6869 6870 6871 6872 6873 6874 6875 6876 6877 |
# File 'lib/infrawrench/client.rb', line 6869 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
6902 6903 6904 6905 6906 6907 6908 6909 6910 |
# File 'lib/infrawrench/client.rb', line 6902 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
6931 6932 6933 6934 6935 6936 6937 6938 |
# File 'lib/infrawrench/client.rb', line 6931 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 |