Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

vsts_build_agent (3) Versions 0.1.2

Installs/Configures visualstudio team services build agents

Policyfile
Berkshelf
Knife
cookbook 'vsts_build_agent', '~> 0.1.2', :supermarket
cookbook 'vsts_build_agent', '~> 0.1.2'
knife supermarket install vsts_build_agent
knife supermarket download vsts_build_agent
README
Dependencies
Quality 17%

Visual Studio Team Services Build Agent Cookbook

Build Status
Cookbook Version

Installs and configures Visual Studio Team Services Build Agent (a.k.a VSO Build Agent)

Requirements

  • Chef 11 or higher

Platforms

The following platforms are tested and supported:
- Debian 7 (Wheezy)
- Ubuntu 14.04
- CentOS 6
- Windows 8.1
- Windows 10
- Mac OS X 10.9.5

The following platforms are known to work:
- Microsoft Windows (8, 8.1, 10)

Dependent Cookbooks

This cookbook doesn't install nodejs executables for an XPlat(CrossPlatform) build agent.
Please use nodejs cookbook or any other ways which suits your case.

Attributes

  • node['vsts_build_agent']['xplat']['package_name'] - Set an xplat build agent npm package name
  • node['vsts_build_agent']['xplat']['package_version'] - Set an npm package version. Possible values 'x.y.z' or 'latest'
  • node['vsts_build_agent']['xplat']['skip_vsoagent_installer'] - Set to 'true' if you need another way to install npm package.

Resource/Provider

windows

This resource installs and configures a build agent on windows host

Actions

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

Parameters

  • agent_name: Name attribute. The name of a build agent
  • install_dir: A target directory to install a build agent
  • sv_name: Set a windows service name. Default vsoagent.host.agent_name
  • sv_user: Set a user name to run windows service. Possible values are "NT AUTHORITY\NetworkService", "NT AUTHORITY\LocalService" or any system valid username
  • sv_password: Set password with sv_user unless it is equal to NetworkService or LocalService
  • vsts_url: A target VSTS url
  • vsts_user: A user to connect with VSTS
  • vsts_token: A personal access token from VSTS. See
  • vsts_pool: A pool name on VSTS
  • work_folder: Set different workspace location. Default is "install_dir/_work"

Examples

Install, configure, restart and remove a build agent.
Check [tests](test/cookbooks/windows-basic/recipes/default.rb) for more examples.

include_recipe 'vsts_build_agent::default'

vsts_build_agent_windows 'agent' do
  install_dir 'c:\\agents\\agent1'
  sv_user 'vagrant'
  sv_password 'vagrant'
  vsts_url 'https://<account>.visualstudio.com'
  vsts_pool 'default'
  vsts_user 'builder'
  vsts_token 'my_secret_token_from_vsts'
  action :install
end

vsts_build_agent_windows 'agent' do
  action :restart
end

vsts_build_agent_windows 'agent' do
  vsts_token 'my_secret_token_from_vsts'
  action :remove
end

xplat

This resource installs and configures a build agent on linux or macosx host

Actions

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

Parameters

  • agent_name: Name attribute. The name of build agent
  • install_dir: A target directory to install build agent
  • user: Set a user to run build agent.
  • group: Set a group to run build agent.
  • sv_name: Set a service name. Default vsoagent.host.agent_name
  • sv_envs: Set hash of environment variables to pass into an agent process
  • sv_session: For MacOsX only. Set a LaunchAgent session.
  • vsts_url: A target VSTS url
  • vsts_user: A user to connect with VSTS
  • vsts_token: A personal access token from VSTS. See
  • vsts_pool: A pool name on VSTS

Examples

Install, configure, restart and remove build agent.
Check [tests](test/cookbooks/xplat-basic/recipes/default.rb) for more examples.

include_recipe 'vsts_build_agent::default'

if platform_family?('mac_os_x')
  include_recipe 'homebrew'
end

include_recipe 'nodejs::default'
include_recipe 'nodejs::npm'

vsts_build_agent_xplat 'xplat_agent' do
  install_dir "/home/vagrant/agents/xplat_agent"
  user 'vagrant'
  group 'vagrant'
  sv_envs(
    'PATH' => '/usr/local/bin/:/opt/local/bin:/sbin:/usr/sbin:/bin:/usr/bin',
    'TEST' => 'agent1'
    )
  vsts_url 'https://account.visualstudio.com'
  vsts_pool 'default'
  vsts_user 'builder'
  vsts_token 'my_secret_token_from_vsts'
  action :install
end

vsts_build_agent_xplat 'xplat_agent' do
  action :restart
end

vsts_build_agent_xplat 'xplat_agent' do
  vsts_token 'my_secret_token_from_vsts'
  action :remove
end

How to contribute

Check [Contribution Guide](CONTRIBUTING.md) and [Testing Guide](TESTING.md)

Dependent cookbooks

runit >= 0.0.0
windows >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.2 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.2 failed this metric

FC052: Metadata uses the deprecated "suggests" keyword: vsts_build_agent/metadata.rb:16
FC066: Ensure chef_version is set in metadata: vsts_build_agent/metadata.rb:1
FC070: Ensure supports metadata defines valid platforms: vsts_build_agent/metadata.rb:1
FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: vsts_build_agent/libraries/helpers.rb:36
FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: vsts_build_agent/libraries/helpers.rb:52
FC085: Resource using new_resource.updated_by_last_action to converge resource: vsts_build_agent/providers/windows.rb:91
FC085: Resource using new_resource.updated_by_last_action to converge resource: vsts_build_agent/providers/windows.rb:121
FC085: Resource using new_resource.updated_by_last_action to converge resource: vsts_build_agent/providers/windows.rb:133
FC085: Resource using new_resource.updated_by_last_action to converge resource: vsts_build_agent/providers/xplat.rb:133
FC085: Resource using new_resource.updated_by_last_action to converge resource: vsts_build_agent/providers/xplat.rb:173
FC085: Resource using new_resource.updated_by_last_action to converge resource: vsts_build_agent/providers/xplat.rb:202
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.1.2 passed this metric

Testing File Metric
            

0.1.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number