A Chef Cookbook for configuring an Azure Pipelines agent on macOS
Перейти к файлу
microsoft-github-policy-service[bot] 70d6309019
Microsoft mandatory file (#16)
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2022-08-15 15:50:08 -07:00
attributes somehow I've fixed the chef vault issue 2019-05-10 14:55:51 -07:00
libraries remove URI.encode and replace with CGI.escapeHTML (#15) 2022-05-18 13:25:16 -07:00
recipes don't enforce ownership on links 2020-03-05 14:00:39 -08:00
spec/unit/recipes Remove chef-vault cookbook dependency (#12) 2020-02-21 18:25:51 -08:00
templates rename to azure_pipelines_agent_macos 2019-05-09 14:16:31 -07:00
test/integration Abstract environment variable for vagrant server 2019-05-20 14:18:56 -07:00
.gitignore Bootstrap and teardown 2018-03-16 23:50:07 -07:00
.mailmap fix mailmap 2018-03-25 17:40:04 -07:00
Berksfile Some bug fixes and improvements for 0.1.4 2017-12-17 23:46:52 -08:00
LICENSE Remove chef-vault cookbook dependency (#12) 2020-02-21 18:25:51 -08:00
README.md fix docs find and replace typo 2020-02-24 10:48:06 -08:00
SECURITY.md Microsoft mandatory file (#16) 2022-08-15 15:50:08 -07:00
azure-pipelines.yml remove URI.encode and replace with CGI.escapeHTML (#15) 2022-05-18 13:25:16 -07:00
chefignore update chefignore 2018-06-26 18:17:29 -07:00
kitchen.yml remove URI.encode and replace with CGI.escapeHTML (#15) 2022-05-18 13:25:16 -07:00
metadata.rb remove URI.encode and replace with CGI.escapeHTML (#15) 2022-05-18 13:25:16 -07:00

README.md

Azure DevOps Build and Release Agent Cookbook for macOS

Build status

Visual Studio Team Services is now Azure DevOps Services We're working on the best way to rename the cookbook and recipes while maintaining backwards compatibility.

Recipes

Bootstrap

Usage: azure_pipelines_agent_macos::bootstrap

Add the node to the agent pool or deployment group.

Teardown

Usage: azure_pipelines_agent_macos::teardown

Remove an existing agent from the build pool or deployment group.

Attributes

Agent Name

The name of the agent.

Default value: node['hostname']

default['azure_pipelines_agent']['agent_name']

Agent Version

The version of the agent to install.

Default value: '2.150.3'

default['azure_pipelines_agent']['version']

Agent Pool

The name of the agent pool you wish to add the agent to.

Default value: American Hanko's Agents

default['azure_pipelines_agent']['agent_pool']

Organization Name

The name of your Azure DevOps organization. (e.g. 'americanhanko' in https://dev.azure.com/americanhanko)

Default value: americanhanko

default['azure_pipelines_agent']['account']

Admin User

The username of an adminstrator on the macOS system.

Default value: 'vagrant'

default['azure_pipelines_agent']['admin_user']

Agent Home Directory

The location that contains all builds, source, release, etc.

Default value: '/Users/#{node['azure_pipelines_agent']['admin_user']}/azure-pipelines-agent'

default['azure_pipelines_agent']['agent_home']

Additional Environment Variables

An optional hash may be set to pass environment variables to the agent. The agent will then be configured with these environment variables which it will then report back to the servers.

Default value: {}

default['azure_pipelines_agent']['additional_environment']

Deployment Group

This cookbook supports adding agents to Azure DevOps deployment groups. To use this feature, simply set the default['azure_pipelines_agent']['deployment_group'] attribute. In addition, make sure you have the appropriate values set for the following attributes shown below. By default, we assume that if the default['azure_pipelines_agent']['deployment_group'] attribute is nil, we are bootstrapping a build agent and not a deployment agent. This means if you set this attribute, it will override the default functionality. You may optionally specifiy deployment group tags using default['azure_pipelines_agent']['deployment_group_tags'].

default['azure_pipelines_agent']['deployment_group'] = nil
default['azure_pipelines_agent']['project'] = nil
default['azure_pipelines_agent']['work'] = nil
default['azure_pipelines_agent']['deployment_group_tags'] = nil

Authentication

This cookbook uses a personal access token to authenticate to your organization on the Azure DevOps servers. The cookbook allows access to the token via either an attribute, within a data bag or using a chef vault item.

Plaintext Attribute

Example:

default['azure_pipelines_agent']['pat'] = '0fbdebc988934add98179ddaae019a01711'

Data Bag or Chef Vault Item

Name your vault or bag and corresponding item whatever you like and make sure to set the corresponding attributes to reference it accordingly:

Example:

default['azure_pipelines_agent']['data_bag'] = 'tea_bag'
default['azure_pipelines_agent']['data_bag_item'] = 'green_tea'

However, it must contain a personal_access_token key with the token itself as the value. The token must have rights to read and modify build agents. The permissions are selected at the time of the PAT creation, which you can read more about here.

Example:

{
  "id": "azure_pipelines_build_agent",
  "personal_access_token": "iu8tfaxxrhce7yeu434yo9zfjtxif3jygzk24wegi855er2moobs"
}