Open hamstercat opened 8 years ago
I've added system.debug to true to my release, and I got additional information:
2016-05-15T16:08:15.2794489Z Cleaning up files 2016-05-15T16:08:15.3536163Z ##[error]System.NotImplementedException: The method or operation is not implemented. 2016-05-15T16:08:15.3536163Z ##[error] at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.InternalPowerShellHostUI.PromptForChoice(String caption, String message, Collection
1 choices, Int32 defaultChoice) 2016-05-15T16:08:15.3536163Z ##[error] at System.Management.Automation.Internal.Host.InternalHostUserInterface.PromptForChoice(String caption, String message, Collection
1 choices, Int32 defaultChoice) 2016-05-15T16:08:15.3546158Z ##[error] at System.Management.Automation.MshCommandRuntime.InquireHelper(String inquireMessage, String inquireCaption, Boolean allowYesToAll, Boolean allowNoToAll, Boolean replaceNoWithHalt) 2016-05-15T16:08:15.3546158Z ##[error] at System.Management.Automation.MshCommandRuntime.DoShouldContinue(String query, String caption, Boolean supportsToAllOptions, Boolean& yesToAll, Boolean& noToAll) 2016-05-15T16:08:15.3546158Z ##[error] at System.Management.Automation.MshCommandRuntime.ShouldContinue(String query, String caption, Boolean& yesToAll, Boolean& noToAll) 2016-05-15T16:08:15.3556167Z ##[error] at System.Management.Automation.Cmdlet.ShouldContinue(String query, String caption, Boolean& yesToAll, Boolean& noToAll) 2016-05-15T16:08:15.3556167Z ##[error] at Microsoft.PowerShell.Commands.RemoveItemCommand.ProcessRecord() 2016-05-15T16:08:15.3556167Z ##[error] at System.Management.Automation.CommandProcessor.ProcessRecord() 2016-05-15T16:08:15.3566162Z ##[debug]Files after cleaning up:
Hi @hamstercat, Are you using it as a build or a release task?
@FernandoMorais, I'm using it as a release task. In my build I have a step that publish files, and I then take those files in order to feed this extension.
@hamstercat it's the right way to use it.
Please, send me more information about some points below:
@FernandoMorais here is more info.
Deployment queue: I'm not sure what that is, I have a build that finishes with "Copy and Publish Build Artifacts", which triggers my Release Agent name: Hosted Agent, version: 1.99.0, OSVersion: Microsoft Windows NT 6.2.9200.0 Variables: None (only system.debug to true for the last trace)
I've taken a screenshot of my environment configuration, I blanked the credentials from it.
I found the deployment queue if it can help, it says "Hosted".
I am facing the same problem!
But I am on Default agent
@FernandoMorais ?
2016-10-21T02:36:59.2956469Z Cleaning up files
2016-10-21T02:36:59.2956469Z
2016-10-21T02:36:59.2956469Z
2016-10-21T02:36:59.3581266Z ##[error]System.NotImplementedException: The method or operation is not implemented.
2016-10-21T02:36:59.3581266Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.InternalPowerShellHostUI.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
2016-10-21T02:36:59.3581266Z at System.Management.Automation.Internal.Host.InternalHostUserInterface.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
2016-10-21T02:36:59.3581266Z at System.Management.Automation.MshCommandRuntime.InquireHelper(String inquireMessage, String inquireCaption, Boolean allowYesToAll, Boolean allowNoToAll, Boolean replaceNoWithHalt)
2016-10-21T02:36:59.3581266Z at System.Management.Automation.MshCommandRuntime.DoShouldContinue(String query, String caption, Boolean supportsToAllOptions, Boolean& yesToAll, Boolean& noToAll)
2016-10-21T02:36:59.3581266Z at System.Management.Automation.MshCommandRuntime.ShouldContinue(String query, String caption, Boolean& yesToAll, Boolean& noToAll)
2016-10-21T02:36:59.3581266Z at System.Management.Automation.Cmdlet.ShouldContinue(String query, String caption, Boolean& yesToAll, Boolean& noToAll)
2016-10-21T02:36:59.3581266Z at Microsoft.PowerShell.Commands.RemoveItemCommand.ProcessRecord()
2016-10-21T02:36:59.3581266Z at System.Management.Automation.CommandProcessor.ProcessRecord()
2016-10-21T02:36:59.6706479Z Files cleaned
Hi guys! I was waiting the release of the new system, so now I'll evolve the extension to work on it. I'll need some days to finish that and I'll keep you in touch!
Hi guys!
I've just created a new release release and found an error at de default commit message attr. I changed ir and published a new version of the extension. Everything is running OK here!
Could you test with this new one (1.0.3)? I recommend you to create a new release to ensure everything is running as expected.
Please send me the config you are using for:
Hey @FernandoMorais , I am still getting the same error. Everything seems to be okay but the release error. Please see the attached log and environment setup (it's pretty straightforward). Let me know if you need anything. Thanks for your help! ReleaseLogs_14.zip
I'm also having this issue.
Same here... Works perfect if I turn off "stop on error" in TFS. So the deployment gets through but with warnings.
Hi guys! I can't reproduce the error, I'll look into logs sent here trying to discovery what is going wrong.
Updating: at logs sent by @GreenOn I found is this error line:
2016-11-10T06:16:24.4082222Z Cleaning up files
2016-11-10T06:16:24.4082222Z
2016-11-10T06:16:24.4082222Z
2016-11-10T06:16:24.5002722Z ##[error]System.NotImplementedException: The method or operation is not implemented.
2016-11-10T06:16:24.5002722Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.InternalPowerShellHostUI.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
2016-11-10T06:16:24.5002722Z at System.Management.Automation.Internal.Host.InternalHostUserInterface.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
2016-11-10T06:16:24.5002722Z at System.Management.Automation.MshCommandRuntime.InquireHelper(String inquireMessage, String inquireCaption, Boolean allowYesToAll, Boolean allowNoToAll, Boolean replaceNoWithHalt, Boolean hasSecurityImpact)
2016-11-10T06:16:24.5002722Z at System.Management.Automation.MshCommandRuntime.DoShouldContinue(String query, String caption, Boolean hasSecurityImpact, Boolean supportsToAllOptions, Boolean& yesToAll, Boolean& noToAll)
2016-11-10T06:16:24.5002722Z at System.Management.Automation.MshCommandRuntime.ShouldContinue(String query, String caption, Boolean& yesToAll, Boolean& noToAll)
2016-11-10T06:16:24.5002722Z at System.Management.Automation.Cmdlet.ShouldContinue(String query, String caption, Boolean& yesToAll, Boolean& noToAll)
2016-11-10T06:16:24.5002722Z at Microsoft.PowerShell.Commands.RemoveItemCommand.ProcessRecord()
2016-11-10T06:16:24.5002722Z at System.Management.Automation.CommandProcessor.ProcessRecord()
2016-11-10T06:16:24.8642733Z Files cleaned
This is the piece of code that is generating the error:
Write-Host "Cleaning up files"
Get-ChildItem -Recurse -Force | `
?{ $_.FullName -notlike "*.git*" } | `
Remove-Item -Force
Write-Verbose "Files after cleaning up: "
Get-ChildItem -Recurse -Force | %{ Write-Verbose $_.FullName }
Write-Host "Files cleaned"
I think that it`s caused by a prompt before remove. I'll change this piece of code to do it automatically.
Yup, that's the stuff. I was just gathering a log to upload.
Hi @GioCirque! I'm changing the remove command to have a " -Confirm:$false" parameter.
Hi All! I've just published the 1.0.6 version, please check if it is ok now!
Edit: You should edit the Release definition and choose the 1.* version!
Unfortunately I now get this error in the Release definition editor:
Tasks 'Push to Heroku: ' are not valid for deploy phase 'Run on agent' in environment Alpha. Add Agent based tasks and try again.
And, there's no version 1.* available to select. Maybe I'm missing a step?
Might have just taken some time to update. I'm seeing a v1.* now, and just kicked off a new release.
Nope, still the same issue.
2017-03-17T19:34:52.3398855Z ==============================================================================
2017-03-17T19:34:52.3398855Z Task : Push To Heroku
2017-03-17T19:34:52.3398855Z Description : Updates an app using Heroku Git.
2017-03-17T19:34:52.3398855Z Version : 1.0.6
2017-03-17T19:34:52.3398855Z Author : Boosting.my
2017-03-17T19:34:52.3398855Z Help : [More Information](https://github.com/BoostingMy/vsts-heroku-tasks/wiki)
2017-03-17T19:34:52.3398855Z ==============================================================================
2017-03-17T19:34:52.3528856Z Preparing task execution handler.
2017-03-17T19:34:56.2526828Z Executing the powershell script: D:\a\_tasks\PushToHeroku_90e55fc3-9daa-4f11-b946-66338210ec51\1.0.6\PushToHeroku.ps1
2017-03-17T19:34:56.8043856Z Setting working directory to 'D:\a\r1\a\heroku'
2017-03-17T19:34:56.8043856Z
2017-03-17T19:34:56.8043856Z
2017-03-17T19:34:56.8143856Z D:\a\r1\a\heroku
2017-03-17T19:34:56.8173849Z Cloning heroku repository
2017-03-17T19:34:56.8173849Z
2017-03-17T19:34:56.8173849Z
2017-03-17T19:34:59.2405789Z git clone https://vsts:********@git.heroku.com:443/********-services.git
2017-03-17T19:34:59.2415768Z [git] Cloning into '********-services'...
2017-03-17T19:34:59.3105770Z Heroku cloned
2017-03-17T19:34:59.3105770Z
2017-03-17T19:34:59.3105770Z
2017-03-17T19:34:59.3105770Z Setting working directory to 'D:\a\r1\a\heroku\********-services'
2017-03-17T19:34:59.3105770Z
2017-03-17T19:34:59.3105770Z
2017-03-17T19:34:59.3135774Z Cleaning up files
2017-03-17T19:34:59.3135774Z
2017-03-17T19:34:59.3135774Z
2017-03-17T19:35:00.0388308Z ##[error]System.NotImplementedException: The method or operation is not implemented.
2017-03-17T19:35:00.0388308Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.InternalPowerShellHostUI.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
2017-03-17T19:35:00.0388308Z at System.Management.Automation.Internal.Host.InternalHostUserInterface.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
2017-03-17T19:35:00.0398322Z at System.Management.Automation.MshCommandRuntime.InquireHelper(String inquireMessage, String inquireCaption, Boolean allowYesToAll, Boolean allowNoToAll, Boolean replaceNoWithHalt, Boolean hasSecurityImpact)
2017-03-17T19:35:00.0398322Z at System.Management.Automation.MshCommandRuntime.DoShouldContinue(String query, String caption, Boolean hasSecurityImpact, Boolean supportsToAllOptions, Boolean& yesToAll, Boolean& noToAll)
2017-03-17T19:35:00.0398322Z at System.Management.Automation.MshCommandRuntime.ShouldContinue(String query, String caption, Boolean& yesToAll, Boolean& noToAll)
2017-03-17T19:35:00.0398322Z at System.Management.Automation.Cmdlet.ShouldContinue(String query, String caption, Boolean& yesToAll, Boolean& noToAll)
2017-03-17T19:35:00.0398322Z at Microsoft.PowerShell.Commands.RemoveItemCommand.ProcessRecord()
2017-03-17T19:35:00.0408313Z at System.Management.Automation.CommandProcessor.ProcessRecord()
2017-03-17T19:35:00.0408313Z Files cleaned
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z Copying files from 'D:\a\r1\a\CI Build\Services'
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z Files copied
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z Writing .gitignore file
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z .gitignore written
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z Initializing git config
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z
2017-03-17T19:35:00.0408313Z git config --local user.name "Gio Palacino"
2017-03-17T19:35:00.0408313Z git config --local user.email "vsts@********-services.git.heroku.com"
2017-03-17T19:35:00.0418314Z Git config initialized
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z Adding files
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z git add .
2017-03-17T19:35:00.0418314Z [git] warning: LF will be replaced by CRLF in Procfile.
2017-03-17T19:35:00.0418314Z [git] The file will have its original line endings in your working directory.
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z [git] warning: LF will be replaced by CRLF in runtime.txt.
2017-03-17T19:35:00.0418314Z The file will have its original line endings in your working directory.
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z Files added
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z Committing changes
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z
2017-03-17T19:35:00.0418314Z git commit -m "Pushed from Release-0.0.076.01-04 - ."
2017-03-17T19:35:00.0418314Z [git] On branch master
2017-03-17T19:35:00.0418314Z [git] Your branch is up-to-date with 'origin/master'.
2017-03-17T19:35:00.0418314Z [git] nothing to commit, working tree clean
2017-03-17T19:35:00.0418314Z Changes committed
2017-03-17T19:35:00.0428310Z
2017-03-17T19:35:00.0428310Z
2017-03-17T19:35:00.0428310Z Starting to push changes
2017-03-17T19:35:00.0428310Z
2017-03-17T19:35:00.0428310Z
2017-03-17T19:35:00.7916759Z git push origin master
2017-03-17T19:35:00.7926754Z [git] Everything up-to-date
2017-03-17T19:35:00.7926754Z Push finished.
2017-03-17T19:35:00.7926754Z
2017-03-17T19:35:00.7926754Z
2017-03-17T19:35:00.8226762Z ##[error]PowerShell script completed with 1 errors.
2017-03-17T19:35:00.8236758Z ##[section]Finishing: Push to Heroku:
Yup, I am getting the same error with v1.0. Error was at the cleaning files. Same as above.
Yes @GioCirque , that's the line! I've changed it to this in 1.0.6:
Write-Host "Cleaning up files"
Get-ChildItem -Recurse -Force | `
?{ $_.FullName -notlike "*.git*" } | `
Remove-Item -Force -Confirm:$false
Write-Verbose "Files after cleaning up: "
Get-ChildItem -Recurse -Force | %{ Write-Verbose $_.FullName }
Write-Host "Files cleaned"
But it seems no results...
Please, change or set this environment variable:
After that, try another release attempt and send me the logs (be careful to hide sensitive data).
Debug log attached: tasklog_6.txt
Great @GioCirque! I'll try to reproduce the error with the same project structure. Until the final solution, please use the Continue On Error option.
@GioCirque, please send me the "Current agent version" in logs and the "Deployment queue" in "Run on agent" option.
2017-03-18T00:38:24.5389969Z ##[section]Starting: Release
2017-03-18T00:38:24.5579785Z Current agent version: '2.112.0
Hi, are there any news ? I can't get it working even after selecting 'Continue On Error' option. Failing with the same error mentioned above: System.NotImplementedException: The method or operation is not implemented.
@FernandoMorais, II'm not sure what the "Deployment queue" is and I'm not seeing anything labeled as such. I can offer this image. Is this what you're looking for?
@GioCirque click over "Run on agent" so you see agent configurations.
Hi @Jossif!!! I'm working in a solution for this error, it's in line 115 when the scripts remove files pulled from Heroku.
Guys, I'm working in another way to clear files pulled from Heroku, before coping new builded ones. This is required to remove files removed in newer build.
If you have some options I would appreciate. :)
Ahh, I see. Thanks for explaining that @FernandoMorais. Here it is:
Thanks @GioCirque, I finally have reproduced the error.
I've temporarily removed the faulting code until I find a way to do that without errors.
In some posts from vsts-taks repo say that we must update to the new PowerShell3 mode... I'm now working to upgrade or even change the task to the node mode (I think it would be a better way).
Thank you all for the patience, soon everything will be ok!
Thanks for the update and work on the task, @FernandoMorais
Is there any progress on this? Does this extension now work for building/pushing builds to Heroku?
I'm using this extension to push my app to Heroku, and the push itself is working. The release finishes, and my code is deployed correctly to Heroku. The problem is that my release always fail in VSTS because an error occurs in the script. Here is the relevant log part:
From the logs, the error seems to occur from between line 113 and line 115.
Do you have any ideas what could be causing the clean to fail?