Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Error: deploy_mrp_app.sh: No such file or directory #150

Open
Hoyg opened this issue Sep 10, 2018 · 8 comments
Open

Release Error: deploy_mrp_app.sh: No such file or directory #150

Hoyg opened this issue Sep 10, 2018 · 8 comments

Comments

@Hoyg
Copy link

Hoyg commented Sep 10, 2018

Unable to proceed beyond this issue..

The release logs are as below -

##[debug]Evaluating condition for step: 'PowerShell Script'
2018-09-10T06:43:40.5222453Z ##[debug]Evaluating: succeeded()
2018-09-10T06:43:40.5222647Z ##[debug]Evaluating succeeded:
2018-09-10T06:43:40.5222961Z ##[debug]=> True
2018-09-10T06:43:40.5223374Z ##[debug]Result: True
2018-09-10T06:43:40.5223615Z ##[section]Starting: PowerShell Script
2018-09-10T06:43:40.5229333Z ==============================================================================
2018-09-10T06:43:40.5229823Z Task : PowerShell
2018-09-10T06:43:40.5229923Z Description : Run a PowerShell script on Windows, macOS, or Linux.
2018-09-10T06:43:40.5230030Z Version : 2.136.0
2018-09-10T06:43:40.5230113Z Author : Microsoft Corporation
2018-09-10T06:43:40.5230211Z Help : More Information
2018-09-10T06:43:40.5230318Z ==============================================================================
2018-09-10T06:43:42.0631216Z ##[debug]VstsTaskSdk 0.9.0 commit 6c48b16164b9a1c9548776ad2062dad5cd543352
2018-09-10T06:43:42.3118284Z ##[debug]Entering D:\a_tasks\PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1\2.136.0\powershell.ps1.
2018-09-10T06:43:42.3230935Z ##[debug]Loading resource strings from: D:\a_tasks\PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1\2.136.0\task.json
2018-09-10T06:43:42.3790454Z ##[debug]Loaded 11 strings.
2018-09-10T06:43:42.3862610Z ##[debug]SYSTEM_CULTURE: 'en-US'
2018-09-10T06:43:42.3871372Z ##[debug]Loading resource strings from: D:\a_tasks\PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1\2.136.0\Strings\resources.resjson\en-US\resources.resjson
2018-09-10T06:43:42.4157001Z ##[debug]Loaded 11 strings.
2018-09-10T06:43:42.5039729Z ##[debug]INPUT_ERRORACTIONPREFERENCE: 'continue'
2018-09-10T06:43:42.5121801Z ##[debug]INPUT_FAILONSTDERR: 'false'
2018-09-10T06:43:42.5122608Z ##[debug] Converted to bool: False
2018-09-10T06:43:42.5160072Z ##[debug]INPUT_IGNORELASTEXITCODE: 'false'
2018-09-10T06:43:42.5927712Z ##[debug] Converted to bool: False
2018-09-10T06:43:42.5954142Z ##[debug]INPUT_WORKINGDIRECTORY: 'D:\a\r1\a_MRP-CI\drop\deploy'
2018-09-10T06:43:42.6087302Z ##[debug]Asserting container path exists: 'D:\a\r1\a_MRP-CI\drop\deploy'
2018-09-10T06:43:42.6113605Z ##[debug]INPUT_TARGETTYPE: 'filePath'
2018-09-10T06:43:42.6149950Z ##[debug]INPUT_FILEPATH: 'D:\a\r1\a_MRP-CI\drop\deploy\SSH-MRP-Artifacts.ps1'
2018-09-10T06:43:42.6173316Z ##[debug]Asserting leaf path exists: 'D:\a\r1\a_MRP-CI\drop\deploy\SSH-MRP-Artifacts.ps1'
2018-09-10T06:43:42.6219819Z ##[debug]INPUT_ARGUMENTS: '-sshUser puladmin -sshPassword P2ssw0rd@12345 -sshTarget pulmrp.southeastasia.cloudapp.azure.com'
2018-09-10T06:43:42.6500003Z Generating script.
2018-09-10T06:43:42.6555630Z Formatted command: . 'D:\a\r1\a_MRP-CI\drop\deploy\SSH-MRP-Artifacts.ps1' -sshUser puladmin -sshPassword P2ssw0rd@12345 -sshTarget pulmrp.southeastasia.cloudapp.azure.com
2018-09-10T06:43:42.6686190Z ##[debug]AGENT_VERSION: '2.140.0'
2018-09-10T06:43:42.6787901Z ##[debug]AGENT_TEMPDIRECTORY: 'D:\a_temp'
2018-09-10T06:43:42.6811030Z ##[debug]Asserting container path exists: 'D:\a_temp'
2018-09-10T06:43:42.7337387Z ##[debug]Asserting leaf path exists: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
2018-09-10T06:43:42.7491300Z ##[debug]Entering Invoke-VstsTool.
2018-09-10T06:43:42.7610956Z ##[debug] Arguments: '-NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a_temp\48d02684-2b75-4d9a-88d8-9e5c5c89376c.ps1'"'
2018-09-10T06:43:42.7630048Z ##[debug] FileName: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
2018-09-10T06:43:42.7650777Z ##[debug] WorkingDirectory: 'D:\a\r1\a_MRP-CI\drop\deploy'
2018-09-10T06:43:42.7698681Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a_temp\48d02684-2b75-4d9a-88d8-9e5c5c89376c.ps1'"
2018-09-10T06:43:49.2237077Z The server's host key is not cached in the registry. You
2018-09-10T06:43:49.2238650Z have no guarantee that the server is the computer you
2018-09-10T06:43:49.2238733Z think it is.
2018-09-10T06:43:49.2238833Z The server's ssh-ed25519 key fingerprint is:
2018-09-10T06:43:49.2238923Z ssh-ed25519 256 36:97:00:47:3a:7c:b3:9b:f9:1f:5c:83:33:a8:e2:09
2018-09-10T06:43:49.2239476Z If you trust this host, enter "y" to add the key to
2018-09-10T06:43:49.2239581Z PuTTY's cache and carry on connecting.
2018-09-10T06:43:49.2239765Z If you want to carry on connecting just once, without
2018-09-10T06:43:49.2239864Z adding the key to the cache, enter "n".
2018-09-10T06:43:49.2239969Z If you do not trust this host, press Return to abandon the
2018-09-10T06:43:49.2240057Z connection.
2018-09-10T06:43:54.1448149Z Store key in cache? (y/n) Using username "puladmin".
2018-09-10T06:43:54.1448355Z Remote working directory is /home/puladmin
2018-09-10T06:43:54.1449590Z mkdir /tmp/mrpdeploy_73ec0524-af4e-42bf-b00e-ec763b206a93: OK
2018-09-10T06:43:54.1449879Z Remote directory is now /tmp/mrpdeploy_73ec0524-af4e-42bf-b00e-ec763b206a93
2018-09-10T06:43:54.1450109Z mkdir /tmp/mrpdeploy_73ec0524-af4e-42bf-b00e-ec763b206a93/deploy: OK
2018-09-10T06:43:54.1450296Z Remote directory is now /tmp/mrpdeploy_73ec0524-af4e-42bf-b00e-ec763b206a93/deploy
2018-09-10T06:43:54.1450638Z local: unable to open ./MRP-CI/deploy/MongoRecords.js
2018-09-10T06:43:55.3527035Z The server's host key is not cached in the registry. You
2018-09-10T06:43:55.3527669Z have no guarantee that the server is the computer you
2018-09-10T06:43:55.3527900Z think it is.
2018-09-10T06:43:55.3528180Z The server's ssh-ed25519 key fingerprint is:
2018-09-10T06:43:55.3528344Z ssh-ed25519 256 36:97:00:47:3a:7c:b3:9b:f9:1f:5c:83:33:a8:e2:09
2018-09-10T06:43:55.3528459Z If you trust this host, enter "y" to add the key to
2018-09-10T06:43:55.3528569Z PuTTY's cache and carry on connecting.
2018-09-10T06:43:55.3528659Z If you want to carry on connecting just once, without
2018-09-10T06:43:55.3528751Z adding the key to the cache, enter "n".
2018-09-10T06:43:55.3528878Z If you do not trust this host, press Return to abandon the
2018-09-10T06:43:55.3528976Z connection.
2018-09-10T06:43:57.2203723Z Reading package lists...
2018-09-10T06:43:57.3682534Z Building dependency tree...
2018-09-10T06:43:57.3684669Z Reading state information...
2018-09-10T06:43:57.4638739Z dos2unix is already the newest version (6.0.4-1).
2018-09-10T06:43:57.4639031Z 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2018-09-10T06:43:57.4653529Z Store key in cache? (y/n) dos2unix: deploy_mrp_app.sh: No such file or directory
2018-09-10T06:43:57.4653686Z dos2unix: Skipping deploy_mrp_app.sh, not a regular file.
2018-09-10T06:43:57.4703066Z bash: ./deploy_mrp_app.sh: No such file or directory
2018-09-10T06:43:57.4755272Z ##[debug]$LASTEXITCODE: 127
2018-09-10T06:43:58.3526561Z ##[debug]Exit code: 1
2018-09-10T06:43:58.3530519Z ##[debug]Leaving Invoke-VstsTool.
2018-09-10T06:43:58.3583504Z ##[error]PowerShell exited with code '1'.
2018-09-10T06:43:58.3592568Z ##[debug]Processed: ##vso[task.logissue type=error]PowerShell exited with code '1'.
2018-09-10T06:43:58.3593789Z ##[debug]Processed: ##vso[task.complete result=Failed]Error detected
2018-09-10T06:43:58.3593974Z ##[debug]Leaving D:\a_tasks\PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1\2.136.0\powershell.ps1.
2018-09-10T06:43:58.3595166Z ##[section]Finishing: PowerShell Script

Even lab - "https://github.com/Microsoft/PartsUnlimitedMRP/blob/gh-pages/_posts/2018-01-08-200.3x-CICD-CDwithLocalAgent.md" fails with "There was an error loading the template from URI 'https://raw.githubusercontent.com/Microsoft/PartsUnlimitedMRP/master/docs/HOL_Continuous-Deployment-Using-Custom-Agent/env/ContinuousDeploymentCustomAgentPartsUnlimitedMRP.json'. Ensure that the template is publicly accessible and does not have any comments."

Quick help would be appreciated!

Hoysala

@eamonnk
Copy link
Contributor

eamonnk commented Sep 10, 2018

Hi,

Thee were some broken links to the deployment templates, they've been updated now for both the Continuous Deployment with VSTS and VSTS Hosted Agent and Continuous Deployment with VSTS and Local Agent on a Linux VM and they seem to be deploying fine now.

If you run into any more problems let us know.

Thanks,
Eamonn

@Hoyg
Copy link
Author

Hoyg commented Sep 11, 2018

The fix hasnt helped much since I think the issue is with copy and publish build artifacts in the CI build. Since we dont have the tasks separately, you might have to change the tasks. The agent is still unable to find the deploy mrp app shell script while executing the Artifacts powershell script.

@eamonnk
Copy link
Contributor

eamonnk commented Sep 11, 2018

Hi,

I'll step through the lab later today and have a look in more detail. From a quick lok through it theres been a good few changes since it was last udpated that need to be worked into the lab steps as well. It will be later today/tomorrow when I get back to you on it.

Thanks Again,
Eamonn

@Hoyg
Copy link
Author

Hoyg commented Sep 12, 2018 via email

@Hoyg
Copy link
Author

Hoyg commented Sep 14, 2018

Thank you!

Since I am working on a new scalesets HOL lab, it’d be helpful if the lab can be updated at the earliest.

Also, can I please have your email-address?

@eamonnk
Copy link
Contributor

eamonnk commented Sep 17, 2018

Hi,

I finally got around to getting through this lab again and am seeing the issue you mentioned, re the powershell script error in the release pipeline.

I'm continuing to dig into it but in the meantime if you want, have a look at self hosted or local agent lab, Continuous Deployment with VSTS and Local Agent on a Linux VM. Its basically the same lab but is using a different agent option with a Linux VM and uses the .sh deployment script directly, doesn't call the posh script. I just ran through it and its working as excpected. Some GUI changes obviously but you should be able to get through it without too much trouble.

I'll let you know as soon as I get an udpate for that lab published, and I'll touch base with you directly as well shortly.

Thanks Again,
Eamonn

@eamonnk
Copy link
Contributor

eamonnk commented Sep 20, 2018

Hi,

This back up and running now and the steps for the Continuous Integration with Visual Studio Team Services and Continuous Deployment with VSTS and VSTS Hosted Agent have both been updated and tested as working.

There were two issues which caused the lab to break,

  • firstly the default build source alias name value changed. The default value now places an underscore at the start of the default value, and this was breaking the .ps1 script logic.
  • The second issue was changes in the dos2unix package, which was called in the release pipeline during deployment.

Two files have been updated to address these issues the SSH-MRP-Artifacts.ps1 and the install_mrp_dependencies.sh

The copy and publish artifact, while deprecated, is still functioning fine, but we have removed it from the lab and replaced with two separate copy and publish artifact tasks as recommended.

Anyway, apologies it took longer than expected. Both these labs have been updated and should be working fine now, but if you encounter any problems just let us know.

Thanks,
Eamonn

@srivatsamarichi
Copy link

Hi @eamonnk the deployment still fails with the same error No such file or Directory. Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants