Chef Cookbook to install and manage Azure Pipelines Agent for Build and Release tasks
Перейти к файлу
ivadim c911529f9d Use script deployment instead of native dpl supermarket provider (#6) 2017-05-03 17:11:04 -07:00
attributes Add chef13 support (#5) 2017-05-03 15:42:48 -07:00
libraries Add chef13 support (#5) 2017-05-03 15:42:48 -07:00
providers Add chef13 support (#5) 2017-05-03 15:42:48 -07:00
recipes Remove upgrade feature. Add env and path parameters. Bump agent version. Fix dependencies 2016-08-17 15:32:48 +02:00
resources Remove upgrade feature. Add env and path parameters. Bump agent version. Fix dependencies 2016-08-17 15:32:48 +02:00
templates/default Remove upgrade feature. Add env and path parameters. Bump agent version. Fix dependencies 2016-08-17 15:32:48 +02:00
test Add chef13 support (#5) 2017-05-03 15:42:48 -07:00
.foodcritic :bowtie: Initial commit 2016-01-20 16:36:39 +01:00
.gitignore :bowtie: Initial commit 2016-01-20 16:36:39 +01:00
.kitchen.yml Add chef13 support (#5) 2017-05-03 15:42:48 -07:00
.rspec :bowtie: Initial commit 2016-01-20 16:36:39 +01:00
.rubocop.yml Add chef13 support (#5) 2017-05-03 15:42:48 -07:00
.travis.yml Use script deployment instead of native dpl supermarket provider (#6) 2017-05-03 17:11:04 -07:00
Berksfile Add ubuntu and osx dependencies. Fix rubocop issues. Add tests. Refactor service management. Add upgrade logic 2016-06-28 18:22:50 +02:00
CONTRIBUTING.md Rename cookbook to vsts-agent 2016-06-29 11:29:23 +02:00
LICENSE.txt Rename cookbook to vsts-agent 2016-06-29 11:29:23 +02:00
README.md Add chef13 support (#5) 2017-05-03 15:42:48 -07:00
Rakefile Use script deployment instead of native dpl supermarket provider (#6) 2017-05-03 17:11:04 -07:00
TESTING.md Update readme 2016-06-29 15:48:18 +02:00
chefignore Add chefignore. Add travis and supermarket badges 2016-01-22 21:43:51 +01:00
metadata.rb Add chef13 support (#5) 2017-05-03 15:42:48 -07:00
supermarket.pem.enc Add chef13 support (#5) 2017-05-03 15:42:48 -07:00

README.md

Visual Studio Team Services Build and Release Agent Cookbook

Join the chat at https://gitter.im/Microsoft/vsts-agent-cookbook Build Status Cookbook Version

Installs and configures Visual Studio Team Services Build and Release Agent

Please check Wiki for more examples

Requirements

  • Chef 12.5.0 or higher

Platforms

The following platforms are tested and supported:

  • Debian 8 x64 (Jessie)
  • Ubuntu 16.04
  • Windows 10
  • Mac OS X 10.11.4

Attributes

  • node['vsts_agent']['binary']['version'] - set version of package to install
  • node['vsts_agent']['prerequisites']['osx']['install'] - control osx dependencies installation. Default true
  • node['vsts_agent']['prerequisites']['debian']['install'] - control debian dependencies installation. Default true

Resource/Provider

vsts_agent

This resource installs and configures the vsts build and release agent

Actions

  • :install: Install and configure the agent
  • :remove: Remove the agent and unregister it from VSTS
  • :restart: Restart the agent service

Parameters

  • agent_name: Name attribute. The name of the vsts agent
  • version: an agent version to install. Default version from an attribute
  • install_dir: A target directory to install the vsts agent
  • path: Overwrite system PATH environment variable values. Linux and Mac OS X only
  • env: Additional environment variables. Linux and Mac OS X only
  • user: Set a local user to run the vsts agent
  • group: Set a local group to run the vsts agent
  • runasservice: run agent as a service. Default 'true'
  • windowslogonaccount: Set a user name to run a windows service. Possible values are "NT AUTHORITY\NetworkService", "NT AUTHORITY\LocalService" or any system valid username
  • windowslogonpassword: Set password for windowslogonaccount unless it is equal to NetworkService or LocalService
  • vsts_url: url to VSTS instance
  • vsts_pool: A pool to connect an agent
  • vsts_auth: Authentication type. Valid options are PAT (Personal Access Token), Negotiate (Kerberos or NTLM), Integrated (Windows default credentials) and ALT (Alternate Credentials). Default PAT auth
  • vsts_token: A personal access token for VSTS. Used with PAT auth type. See
  • vsts_username: A user to connect to VSTS. Used with Negotiate and ALT auth
  • vsts_password: A user to connect to VSTS. Used with Negotiate and ALT auth
  • work_folder: Set different workspace location. Default is "install_dir/_work"

Examples

Install, configure, restart and remove an agent. Check windows, debian or osx tests for more examples.

include_recipe 'vsts_agent::default'

if platform_family?('windows')
  dir = 'c:\\agents'
else
  dir = '/tmp/agents'
end

vsts_agent 'agent_01' do
  install_dir dir
  user 'vagrant'
  group 'vagrant'
  path '/usr/local/bin/:/usr/bin:/opt/bin/' # only works on nix systems
  env('M2_HOME' => '/opt/maven', 'JAVA_HOME' => '/opt/java') # only works on nix systems
  vsts_url 'https://contoso.visualstudio.com'
  vsts_pool 'default'
  vsts_token 'my_secret_token_from_vsts'
  windowslogonaccount 'builder' # will be used only on windows
  windowslogonpassword 'Pas$w0r_d' # will be used only on windows
  action :install
end

vsts_agent 'agent_01' do
  action :restart
end

vsts_agent 'agent_01' do
  vsts_token 'my_secret_token_from_vsts'
  action :remove
end

How to contribute

Check Contribution Guide and Testing Guide