microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.51k stars 2.62k forks source link

Windows Machine File Copy Task not working properly #583

Closed apieraf closed 8 years ago

apieraf commented 9 years ago

Hello, I'm testing the new Build System of VSO and I can't copy any file into my server. Last week this task worked fine but this week it doesn't work. After spending hours searching if something had changed in my server configuration or in my Build configuration I've discovered that the script version changed from 1.0.7 to 1.0.9.

Please, could you take a look on my last friday log (1.0.7): (NOTE: The IPs of both logs are different,don't take into account)

2015-09-16T11:19:38.3997061Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\tasks\WindowsMachineFileCopy\1.0.7\WindowsMachineFileCopy.ps1

2015-09-16T11:19:40.3797770Z ##[debug]Entering script WindowsMachineFileCopy.ps1

2015-09-16T11:19:40.3797770Z ##[debug]environmentName = group1

2015-09-16T11:19:40.3807775Z ##[debug]resourceFilteringMethod = machineNames

2015-09-16T11:19:40.3817774Z ##[debug]machineNames = 

2015-09-16T11:19:40.3817774Z ##[debug]sourcePath = C:\a\e3184712\Prova\WebApplication1\bin

2015-09-16T11:19:40.3827774Z ##[debug]targetPath = C:\Deploy

2015-09-16T11:19:40.3837772Z ##[debug]copyFilesInParallel = true

2015-09-16T11:19:40.3837772Z ##[debug]cleanTargetBeforeCopy = false

2015-09-16T11:19:40.6497889Z ##[debug]Starting Get-EnvironmentResources cmdlet call on environment name: group1 with machine filter: 

2015-09-16T11:19:44.2623050Z ##[debug]Completed Get-EnvironmentResources cmdlet call for environment name: group1 with machine filter

2015-09-16T11:19:44.2623050Z ##[debug]Starting Invoke-EnvironmentOperation cmdlet call on environment name: group1 with operation name: Copy Files

2015-09-16T11:19:44.7207957Z ##[debug]Completed Invoke-EnvironmentOperation cmdlet call on environment name: group1 with operation name: Copy Files

2015-09-16T11:19:44.7227965Z ##[debug]envOperationId = 8df664e1-ed2e-49b7-8878-7ccf668403ce

2015-09-16T11:19:44.7427958Z ##[debug]Get Resource properties for 52.19.74.97

2015-09-16T11:19:44.7457966Z ##[debug]       Starting Get-EnvironmentProperty cmdlet call on environment name: group1 with resource name: 52.19.74.97 and key: Microsoft-Vslabs-MG-Resource-FQDN

2015-09-16T11:19:44.9143001Z ##[debug]       Completed Get-EnvironmentProperty cmdlet call on environment name: group1 with resource name: 52.19.74.97 and key: Microsoft-Vslabs-MG-Resource-FQDN

2015-09-16T11:19:44.9152995Z ##[debug]       Resource fqdn - 52.19.74.97

2015-09-16T11:19:44.9183000Z ##[debug]       Starting Get-EnvironmentProperty cmdlet call on environment name: group1 with resource name: 52.19.74.97 and key: WinRM_Http

2015-09-16T11:19:45.0716581Z ##[debug]       Completed Get-EnvironmentProperty cmdlet call on environment name: group1 with resource name: 52.19.74.97 and key: WinRM_Http

2015-09-16T11:19:45.0766582Z ##[debug]       Resource 52.19.74.97 does not have any winrm port defined , use the default - 5985

2015-09-16T11:19:45.0816571Z ##[debug]       Resource Username - Administrator

2015-09-16T11:19:45.1176579Z Copy started for - '52.19.74.97'

2015-09-16T11:19:45.1186745Z ##[debug]Starting Invoke-ResourceOperation cmdlet call on environment name: group1 with resource name: 52.19.74.97 and environment operationId: 8df664e1-ed2e-49b7-8878-7ccf668403ce

2015-09-16T11:19:45.6153407Z ##[debug]Completed Invoke-ResourceOperation cmdlet call on environment name: group1 with resource name: 52.19.74.97 and environment operationId: 8df664e1-ed2e-49b7-8878-7ccf668403ce

2015-09-16T11:19:45.6160306Z ##[debug]ResourceOperationId = 9816e9ef-f5f8-4f57-b277-56d9e756216f

2015-09-16T11:19:45.6674515Z ##[debug]Loading .NET assembly:    Microsoft.IdentityModel.Clients.ActiveDirectory.dll

2015-09-16T11:19:45.7585014Z ##[debug]Loading .NET assembly:    Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
..................
..................

and the current week log (1.0.9):

2015-09-21T09:51:30.1103266Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\tasks\WindowsMachineFileCopy\1.0.9\WindowsMachineFileCopy.ps1

2015-09-21T09:51:30.2533124Z ##[debug]Entering script WindowsMachineFileCopy.ps1

2015-09-21T09:51:30.2543121Z ##[debug]environmentName = group1

2015-09-21T09:51:30.2553095Z ##[debug]resourceFilteringMethod = machineNames

2015-09-21T09:51:30.2563160Z ##[debug]machineNames = 

2015-09-21T09:51:30.2573106Z ##[debug]sourcePath = C:\a\e3184712\Prova\WebApplication1\bin

2015-09-21T09:51:30.2603708Z ##[debug]targetPath = C:\Deploy

2015-09-21T09:51:30.2619372Z ##[debug]copyFilesInParallel = true

2015-09-21T09:51:30.2643102Z ##[debug]cleanTargetBeforeCopy = false

2015-09-21T09:52:17.0119156Z ##[debug]Starting Get-EnvironmentResources cmdlet call on environment name: group1 with machine filter: 

2015-09-21T09:52:21.7915196Z ##[debug]Completed Get-EnvironmentResources cmdlet call for environment name: group1 with machine filter

2015-09-21T09:52:21.7925196Z ##[debug]Starting Invoke-EnvironmentOperation cmdlet call on environment name: group1 with operation name: Copy Files

2015-09-21T09:52:22.2649418Z ##[debug]Completed Invoke-EnvironmentOperation cmdlet call on environment name: group1 with operation name: Copy Files

2015-09-21T09:52:22.2679654Z ##[debug]envOperationId = 2021c252-1132-4eb3-964d-cda746017f09

2015-09-21T09:52:22.2979596Z ##[debug]Starting Get-EnvironmentProperty cmdlet call on environment name: group1 with key: Microsoft-Vslabs-MG-SkipCACheck

2015-09-21T09:52:22.4505734Z ##[debug]Completed Get-EnvironmentProperty cmdlet call on environment name: group1 with key: Microsoft-Vslabs-MG-SkipCACheck

2015-09-21T09:52:22.4607708Z ##[debug]Get Resource properties for 52.19.223.13 (ResourceId = 15)

2015-09-21T09:52:22.4675901Z ##[debug]       Starting Get-EnvironmentProperty cmdlet call on environment name: group1 with resource id: 15(Name : 52.19.223.13) and key: Microsoft-Vslabs-MG-Resource-FQDN

2015-09-21T09:52:22.5329895Z ##[error]A parameter cannot be found that matches parameter name 'ResourceId'.

2015-09-21T09:52:22.5329895Z ##[debug]       Completed Get-EnvironmentProperty cmdlet call on environment name: group1 with resource id: 15(Name : 52.19.223.13) and key: Microsoft-Vslabs-MG-Resource-FQDN

2015-09-21T09:52:22.5339901Z ##[debug]       Resource fqdn - 

2015-09-21T09:52:22.5389907Z ##[debug]   Starting Get-EnvironmentProperty cmdlet call on environment name: group1 with resource id: 15(Name : 52.19.223.13) and key: WinRM_Http

2015-09-21T09:52:22.5399890Z ##[error]A parameter cannot be found that matches parameter name 'ResourceId'.

2015-09-21T09:52:22.5409906Z ##[debug]   Completed Get-EnvironmentProperty cmdlet call on environment name: group1 with resource id: 15(Name : 52.19.223.13) and key: WinRM_Http

2015-09-21T09:52:22.5479960Z ##[debug]   Resource: 52.19.223.13 (Id : 15) does not have any winrm http port defined, checking for winrm https port

2015-09-21T09:52:22.5489894Z ##[debug]Starting Get-EnvironmentProperty cmdlet call on environment name: group1 with resource id: 15(Name : 52.19.223.13) and key: WinRM_Https

2015-09-21T09:52:22.5507294Z ##[error]A parameter cannot be found that matches parameter name 'ResourceId'.

2015-09-21T09:52:22.5517431Z ##[debug]Completed Get-EnvironmentProperty cmdlet call on environment name: group1 with resource id: 15(Name : 52.19.223.13) and key: WinRM_Https

2015-09-21T09:52:22.5517431Z ##[debug]   Resource: 52.19.223.13 (Id : 15) does not have any winrm https port or http port defined, using http port by default

2015-09-21T09:52:22.5737384Z ##[debug]       Resource Username - Administrator

2015-09-21T09:52:22.6247439Z Copy started for - ':5985'

2015-09-21T09:52:22.7467385Z ##[debug]Loading .NET assembly:    Microsoft.IdentityModel.Clients.ActiveDirectory.dll
..................
..................

I think that something is different between this two versions because my configuration is the same. Thanks in advance! César.

acesiddhu commented 9 years ago

Adding @bryanmacfarlane and @kmkumaran @apieraf Are you using hosted agent? If yes the error indicates that hosted agent does not have the latest (M88) dlls. The ‘ResourceId’ parameter error is because of that. Bryan can confirm when the hosted images will be refreshed.

To unblock yourselves, can you download and setup an agent with latest bits and give a try once again.

apieraf commented 9 years ago

Yes, we are using a hosted agent. So, don't worry. We can wait until the machines will be updated. Please notify me when that hapens. Thanks! César.