API build clusters plugin for the Screwdriver API
const Hapi = require('@hapi/hapi');
const server = new Hapi.Server();
const buildClustersPlugin = require('./');
server.connection({ port: 3000 });
server.register({
register: buildClustersPlugin,
options: {}
}, () => {
server.start((err) => {
if (err) {
throw err;
}
console.log('Server running at:', server.info.uri);
});
});
POST /buildclusters
Example payload:
{
"name": "iOS",
"scmOrganizations": ["screwdriver-cd"],
"managedByScrewdriver": false,
"maintainer": "[email protected]",
"isActive": true,
"description": "Build cluster for iOS team",
"weightage": 100
}
GET /buildclusters
GET /buildclusters/{name}
PUT /buildclusters/{name}
Example payload:
{
"description": "Build cluster for iOS team",
"scmOrganizations": ["screwdriver-cd"],
"isActive": true,
"managedByScrewdriver": true,
"maintainer": "[email protected]",
"weightage": 20
}
DELETE /buildclusters/{name}