1.0.13 • Published 2 years ago
azdev-automation v1.0.13
Azure DevOps Automation
Overview
Azure DevOps automation framework enables access control automation of projects, pipelines and repositories configuration in Azure DevOps Services.
Package | Build | Code |
---|---|---|
Features
- Create projects and update configuration
- Manage project security permissions
- Manage build pipelines permissions
- Manage release pipelines permissions
- Manage repositories permissions
- Manage work items permissions
- Manage service connections (to be implemented)
- Manage branch policies (to be implemented)
- Execute console commands
How To Use
const endpoint: IEndpoint = {
account: "MyAccount",
token: "MyToken",
url: `https://dev.azure.com/MyAccount`,
};
const parameters: IParameters = {
config: "projects.json",
policies: "path/to/policies",
schemas: "path/to/schemas",
projectSetup: true,
accessPermissions: true,
branchPolicies: true,
serviceConnections: true,
};
// Initialize automation
const automation: IAutomation = new Automation(endpoint, parameters);
// Execute automation
await automation.run();
Configuration
Azure DevOps projects configuration contains target projects details and policy mappings.
{
"name": "My Project",
"description": "This is My Project",
"permissions": {
"project": "My Project Policy",
"build": "My Build Policy",
"release": "My Release Policy",
"repository": "My Repository Policy",
"work": "My Work Items Policy"
}
}
When a new project is added it will be automatically created in the Azure DevOps account.
Policies
- Project Permissions - permissions policies defining security access to project
- Build Permissions - permissions policies defining level of access to build pipelines
- Release Permissions - permissions policies defining level of access to release pipelines
- Repository Permissions - permissions policies defining level of access to project repositories
- Work Items Permissions - permissions policies defining level of access to work items
- Branch Policies - repositories branch policies configuration (to be implemented)
- Service Connections - service connections definitions (to be implemented)
See policy schemas for reference.
Console Guide
node console.js --a=MyAccount --t=MyPAT --p=policies --c=projects.json
--config, -c [string], path to configuration file
--policies, -p [string], path to policies directory
--schemas, -s [string], path to schemas directory
--account, -a [string], Azure DevOps account name
--token, -t [string], Azure DevOps account PAT token
--projectSetup [boolean], control project setup feature
--accessPermissions [boolean], control access permissions feature
--serviceConnections [boolean], control service connections feature
--branchPolicies [boolean], control branch policies feature
Support
For aditional information and support please refer to project repository. To enable debug mode to help troubleshooting issues, please configure DEBUG=azdev-automation:*
custom release variable.
For help with Azure DevOps please refer to official documentation.