Description: Adds a node pool.
Security: Requires admin credentials
Usage: POST api/v1/nodePools
Produces: application/json
Parameters:
Parameter | Data Type | Description | Required/Optional |
---|---|---|---|
| Integer | Id of the Project. | Required |
| String | Name of the node pool. | Required |
| Boolean | Set to | Required |
| String | Set the architecture. This is currently limited to x86_64. | Required |
| String | Operating systems supported for the selected architecture. For a list of supported OS and architecture combinations, refer to Runtime Images. | Required |
| Integer | Number of minutes a node can be idle before it is destroyed. | Required for dynamic node pools (if |
| Integer | The build plane image Id. For more information, see Get Build Plane Image Ids. | Required for dynamic node pools. |
| Integer | The project integration Id. For information about obtaining integration Id's, see Get All Integrations. For more information, see Dynamic Node Integrations. | Required for dynamic node pools. |
| Object | Object containing configuration for the cloud provider of on-demand nodePool. You can set the following properties:
| Required for dynamic node pools |
| String | An object containing a project name as an alternative to projectId. You can set the following properties:
| Optional |
| String | An array of string environments to which the node pool is available in the project. | Optional |
| Integer | The maximum time (in minutes) after which pipeline steps will timeout. This timeout is used when your step does not have any timeout specified. Default value for timeout is 60 minutes. | Optional |
| Integer | Limits the maximum disk usage. A build node that exceeds this maximum will be marked as failed. Integer between 0 and 100 | Optional |
| Integer | Configure dynamic node disk size. The minimum limit is:
Note
| Optional |
| Boolean | When set to | Optional |
| Boolean | When set to | Optional |
| Integer | Object containing cache settings if isCacheEnabled is set to
Example
| Optional |
| Object | Set permissions to restrict node pool use. You can set the following properties:
| Optional |
| Boolean | When set as Set as | Optional |
| Object | Contains configuration to be applied during node initialization. The following property can be set: insecureDockerRegistries: List of insecure docker registries to be allowed on the node. | Optional |
Sample Request:
curl -L -X POST 'http://localhost:8082/pipelines/api/v1/nodepools' \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{ "providerMetadataPropertyBag": { "instanceSize": "n1-standard-1", "subnetName": "jfrog-usw1-dynamicnodes", "networkTags": [ "behind-nat", "jenkins", "pipelines", "xray-app", "xray-apps" ], "zone": "us-west1-b" }, "projectId": 1, "name": "NodePool2", "isOnDemand": true, "architecture": "x86_64", "operatingSystem": "Ubuntu_18.04", "projectIntegrationId": 11, "buildPlaneImageId": 17, "nodeIdleIntervalInMins": 20 }'
Sample Response:
{ "providerMetadataPropertyBag": { "instanceSize": "n1-standard-1", "subnetName": "jfrog-usw1-dynamicnodes", "networkTags": [ "behind-nat", "jenkins", "pipelines", "xray-app", "xray-apps" ], "zone": "us-west1-b" }, "cacheSettingsPropertyBag": null, "initPropertyBag": null, "permissions": { "allowAllPipelineSources": true }, "id": 10, "projectId": 1, "name": "NodePool2", "isOnDemand": true, "architecture": "x86_64", "operatingSystem": "Ubuntu_18.04", "buildPlaneImageId": 17, "nodeIdleIntervalInMins": 20, "projectIntegrationId": 11, "isCacheEnabled": false, "numberOfNodes": 1, "maxDiskUsagePercentage": 90, "updatedAt": "2021-04-30T12:26:37.540Z", "createdAt": "2021-04-30T12:26:37.540Z", "environments": null, "queueName": null, "timeoutMS": null, "isNatEnabled": null, "diskSizeinGB": null }
Response Codes:
200: Success
400: If required fields are not included in the request body or if there are invalid parameters.