Merge pull request #34 from baurzhan-konurbayev/feature/convergable_deployment_tags

Include DeploymentTags property to desired state
This commit is contained in:
Eammon Hanlon 2020-03-23 10:09:34 -07:00 коммит произвёл GitHub
Родитель 9c763f177d 4fda33544d
Коммит d0d62e7682
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
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) 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) issues_url 'https://github.com/Microsoft/vsts-agent-cookbook/issues' if respond_to?(:issues_url)
chef_version '>= 12.4' if respond_to?(:chef_version) 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| %w(ubuntu debian redhat centos mac_os_x windows).each do |operating_system|
supports operating_system supports operating_system

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

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