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.
7057 7058 7059 7060 7061 |
# File 'lib/infrawrench/client.rb', line 7057 def initialize(transport) @transport = transport @runs = DeploymentsRunsNamespace.new(@transport) @triggers = DeploymentsTriggersNamespace.new(@transport) end |
Instance Attribute Details
#runs ⇒ DeploymentsRunsNamespace (readonly)
Returns client.deployments.runs.
7051 7052 7053 |
# File 'lib/infrawrench/client.rb', line 7051 def runs @runs end |
#triggers ⇒ DeploymentsTriggersNamespace (readonly)
Returns client.deployments.triggers.
7053 7054 7055 |
# File 'lib/infrawrench/client.rb', line 7053 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
7086 7087 7088 7089 7090 7091 7092 7093 7094 |
# File 'lib/infrawrench/client.rb', line 7086 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
7119 7120 7121 7122 7123 7124 7125 7126 7127 |
# File 'lib/infrawrench/client.rb', line 7119 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
7148 7149 7150 7151 7152 7153 7154 7155 |
# File 'lib/infrawrench/client.rb', line 7148 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 |