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

Staging fails when pushed from Windows #1322

Closed
1 task
bendalby82 opened this issue Oct 24, 2017 · 3 comments
Closed
1 task

Staging fails when pushed from Windows #1322

bendalby82 opened this issue Oct 24, 2017 · 3 comments

Comments

@bendalby82
Copy link

bendalby82 commented Oct 24, 2017

Deployment type

  • Cloud Foundry Application (cf push)

Expected behaviour

  1. git clone stratos-ui repo locally on Windows 10
  2. cd statros-ui
  3. cf push
  4. App starts and can be visited at https://console.bosh-lite.com

Actual behaviour

cf push fails on Windows 10 machine.
cf push succeeds if executed from within bosh-lite Vagrant box (Linux env.)

Steps to reproduce the behavior

See steps 1-3 of Expected Behaviour
Make sure core.autocrlf=true in git config -l

Log output covering before error and any error statements

   2017-10-24T14:01:57.55+0100 [API/0] OUT Created app with guid d03ee883-93b5-41a8-97a5-cb9c18f49f32
   2017-10-24T14:01:58.39+0100 [API/0] OUT Updated app with guid d03ee883-93b5-41a8-97a5-cb9c18f49f32 ({"route"=>"830ee275-4c3b-429c-96ee-e7a5527970f9", :verb=>"add", :relation=>"routes", :related_guid=>"830ee275-4c3b-429c-96ee-e7a5527970f9"})
   2017-10-24T14:02:25.80+0100 [API/0] OUT Uploading bits for app with guid d03ee883-93b5-41a8-97a5-cb9c18f49f32
   2017-10-24T14:02:36.97+0100 [API/0] OUT Creating build for app with guid d03ee883-93b5-41a8-97a5-cb9c18f49f32
   2017-10-24T14:02:37.06+0100 [API/0] OUT Updated app with guid d03ee883-93b5-41a8-97a5-cb9c18f49f32 ({"state"=>"STARTED"})
   2017-10-24T14:02:37.07+0100 [STG/0] OUT Creating container
   2017-10-24T14:02:37.39+0100 [STG/0] OUT Successfully created container
   2017-10-24T14:02:37.71+0100 [STG/0] OUT Downloading app package...
   2017-10-24T14:02:38.60+0100 [STG/0] OUT Downloaded app package (8.7M)
   2017-10-24T14:02:38.60+0100 [STG/0] OUT Staging...
   2017-10-24T14:02:40.41+0100 [STG/0] OUT Stratos UI Buildpack
   2017-10-24T14:02:40.41+0100 [STG/0] OUT -----> Stack cflinuxfs2
   2017-10-24T14:02:40.41+0100 [STG/0] OUT -----> Download go 1.9
   2017-10-24T14:03:19.69+0100 [STG/0] OUT -----> Download glide 0.13.0
   2017-10-24T14:03:23.85+0100 [STG/0] OUT -----> Download Nodejs 6.11.3
   2017-10-24T14:03:31.27+0100 [STG/0] OUT -----> Checking versions
   2017-10-24T14:03:31.28+0100 [STG/0] OUT ---------> Node Version: v6.11.3
   2017-10-24T14:03:31.56+0100 [STG/0] OUT ---------> NPM Version: 3.10.10
   2017-10-24T14:03:31.63+0100 [STG/0] OUT ---------> Go Version: go version go1.9 linux/amd64
   2017-10-24T14:03:31.78+0100 [STG/0] OUT ---------> Glide Version: glide version v0.13.0
   2017-10-24T14:03:31.78+0100 [STG/0] OUT Cache directory [/tmp/cache/final] exists
   2017-10-24T14:03:31.79+0100 [STG/0] OUT -----> Running stratos build compile [13:03:31]
   2017-10-24T14:03:31.79+0100 [STG/0] ERR /tmp/buildpackdownloads/652661b4b3c6701c6981e0b449bf726e/bin/compile: /tmp/app/deploy/cloud-foundry/build.sh: /bin/bash^M: bad interpreter: No such file or directory
   2017-10-24T14:03:31.79+0100 [STG/0] ERR Failed to compile droplet: Failed to compile droplet: exit status 126
   2017-10-24T14:03:31.81+0100 [STG/0] OUT Exit status 223
   2017-10-24T14:03:31.81+0100 [STG/0] ERR Staging failed: STG: Exited with status 223
   2017-10-24T14:03:31.81+0100 [STG/0] OUT Stopping instance 3012b34c-e599-4082-b42d-e29403e462cd
   2017-10-24T14:03:31.82+0100 [STG/0] OUT Destroying container
   2017-10-24T14:03:32.63+0100 [STG/0] OUT Successfully destroyed container

Fix is probably just to document making sure you use right Git settings.

@irfanhabib
Copy link
Contributor

irfanhabib commented Oct 24, 2017

@bendalby82 The issue here is with core.autocrlf=true, line endings are converted to CRLF on windows, therefore it "corrupts" the script.

To avoid this issue, set core.autocrlf=input or false when cloning. We will update the docs to clarify that. Thanks

@bendalby82
Copy link
Author

Thanks Irfan, that would be perfect.

@irfanhabib
Copy link
Contributor

Closing this issue, we've added a .gitattributes file which overrides local configuration and makes sure the checkout uses LF for all files (except binaries).

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

2 participants