Include DeploymentTags property to desired state

This commit is contained in:
Baurzhan Konurbayev 2019-07-09 10:51:08 -04:00
Родитель 9c763f177d
Коммит 4fda33544d
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -7,7 +7,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url 'https://github.com/Microsoft/vsts-agent-cookbook' if respond_to?(:source_url)
issues_url 'https://github.com/Microsoft/vsts-agent-cookbook/issues' if respond_to?(:issues_url)
chef_version '>= 12.4' if respond_to?(:chef_version)
version '3.0.1'
version '3.1.0'
%w(ubuntu debian redhat centos mac_os_x windows).each do |operating_system|
supports operating_system

Просмотреть файл

@ -30,7 +30,7 @@ property :vsts_token, String, sensitive: true, desired_state: false
# Deployment Groups
property :deploymentGroup, [TrueClass, FalseClass], default: false
property :deploymentGroupName, String
property :deploymentGroupTags, String, desired_state: false
property :deploymentGroupTags, String
property :projectName, String
property :collectionName, String, default: 'DefaultCollection'
@ -49,6 +49,7 @@ load_current_value do
work_folder state['work_folder']
deploymentGroup state['deploymentGroup']
deploymentGroupName state['deploymentGroupName']
deploymentGroupTags state['deploymentGroupTags']
projectName state['projectName']
collectionName state['collectionName']
@ -174,6 +175,7 @@ action :install do
work_folder: new_resource.work_folder,
deploymentGroup: new_resource.deploymentGroup,
deploymentGroupName: new_resource.deploymentGroupName,
deploymentGroupTags: new_resource.deploymentGroupTags,
projectName: new_resource.projectName,
collectionName: new_resource.collectionName)
Chef::Log.info "'#{new_resource.agent_name}' agent was installed"