Code Monkey home page Code Monkey logo

azure-pipelines-agent-macos-cookbook's Introduction

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"
}

azure-pipelines-agent-macos-cookbook's People

Contributors

jazaval avatar microsoft-github-policy-service[bot] avatar rodreag avatar v-anshie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-pipelines-agent-macos-cookbook's Issues

Agent recipe assumes `brew` is already installed

A converge of the vsts_agent recipe fails if you don't run a homebrew default recipe first. It looks like the kitchen suite for this cookbook includes this, so testing this cookbook won't repro until you remove that from the suite run-list.

           Error executing action `install` on resource 'vsts_agent_macos[agent_one]'
           ================================================================================

           Chef::Exceptions::CannotDetermineHomebrewOwner
           ----------------------------------------------
           homebrew_package[git] (/tmp/kitchen/cache/cookbooks/vsts_agent_macos/resources/vsts_agent_macos.rb line 87) had an error: Chef::Exceptions::CannotDetermineHomebrewOwner: Could not find the "brew" executable in /usr/local/bin or anywhere on the path.

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/vsts_agent_macos/recipes/vsts_agent.rb

             1: vsts_agent_macos 'agent_one' do
             2:   action %i(install configure install_service start_service)
             3: end

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/vsts_agent_macos/recipes/vsts_agent.rb:1:in `from_file'

           vsts_agent_macos("agent_one") do
             action [:install, :configure, :install_service, :start_service]
             default_guard_interpreter :default
             declared_type :vsts_agent_macos
             cookbook_name "vsts_agent_macos"
             recipe_name "vsts_agent"
             agent_name "agent_one"
           end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.