Class: PEClient::Resource::CodeManagerV1
- Inherits:
-
BaseWithPort
- Object
- BaseWithPort
- PEClient::Resource::CodeManagerV1
- Defined in:
- lib/pe_client/resources/code_manager.v1.rb
Overview
You can use the Code Manager API to deploy code and check the status of deployments on your primary server and compilers without direct shell access.
Constant Summary collapse
- BASE_PATH =
The base path for Code Manager API v1 endpoints.
"/code-manager/v1"- PORT =
Default Code Manager API Port
8170
Instance Method Summary collapse
-
#deploys(deploy_all: nil, environments: nil, deploy_modules: nil, modules: nil, wait: nil, dry_run: nil) ⇒ Array
Trigger Code Manager to deploy code to a specific environment or all environments, or use the dry-run parameter to test your control repo connection.
-
#status(id: nil) ⇒ Hash
Get the status of code deployments that Code Manager is currently processing for each environment.
-
#webhook(type:, prefix: nil, token: nil) ⇒ Hash
Deploy code by triggering your Code Manager webhook.
Methods inherited from BaseWithPort
Constructor Details
This class inherits a constructor from PEClient::Resource::BaseWithPort
Instance Method Details
#deploys(deploy_all: nil, environments: nil, deploy_modules: nil, modules: nil, wait: nil, dry_run: nil) ⇒ Array
Trigger Code Manager to deploy code to a specific environment or all environments, or use the dry-run parameter to test your control repo connection.
51 52 53 54 55 56 |
# File 'lib/pe_client/resources/code_manager.v1.rb', line 51 def deploys(deploy_all: nil, environments: nil, deploy_modules: nil, modules: nil, wait: nil, dry_run: nil) @client.post "#{BASE_PATH}/deploys", body: { environments:, modules:, wait:, "deploy-all": deploy_all, "deploy-modules": deploy_modules, "dry-run": dry_run }.compact end |
#status(id: nil) ⇒ Hash
Get the status of code deployments that Code Manager is currently processing for each environment. You can specify an id query parameter to get the status of a particular deployment.
80 81 82 |
# File 'lib/pe_client/resources/code_manager.v1.rb', line 80 def status(id: nil) @client.get "#{BASE_PATH}/deploys/status", params: {id:}.compact end |
#webhook(type:, prefix: nil, token: nil) ⇒ Hash
Deploy code by triggering your Code Manager webhook.
70 71 72 |
# File 'lib/pe_client/resources/code_manager.v1.rb', line 70 def webhook(type:, prefix: nil, token: nil) @client.post "#{BASE_PATH}/webhook", params: {type:, prefix:, token:}.compact end |