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

Normalize paths when mapping generic files to docker #1343

Merged
merged 2 commits into from
Jun 2, 2020

Conversation

cchafer
Copy link
Contributor

@cchafer cchafer commented May 22, 2020

Fixes #1329

@lightbend-cla-validator

Hi @cchafer,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@lightbend-cla-validator

Hi @cchafer,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@muuki88
Copy link
Contributor

muuki88 commented May 22, 2020

Thanks a lot for tackling this issue. I'll be unavailable the next week to review this with the appropriate time.

Could you add a sbt-test that verifies this behaviour. Bonus points if there's one on Windows, Linux and MacOS 🤯♥️

@cchafer
Copy link
Contributor Author

cchafer commented May 25, 2020

I would like to say yes, but to be honest, I think I won't be able to do it.
i'm working on MacOS, and :

  1. Sbt native packager doesn't compile on catalina with JDK 11 installed (I can create a new ticket for that)
  2. Coding, on macOs, a pluging that needs to create a dockerfile on windows, to be used on linux, is.... quite slow and complicated :D I had to create docker images just for that, and test process is SO slow...
  3. And the most important : I do not understand your codebase enough...
  4. I don't even think this is doable, since the docker part of native-packager just doesn't work at all on Docker for Windows....

Juste tu resume, I'd be happy to help, but without more help / guidance, I'm afraid I can't.

@cchafer
Copy link
Contributor Author

cchafer commented May 25, 2020

Just one example to make my point, sbt-test/entrypoint/test :
$ exec grep -q -F 'ENTRYPOINT ["/bin/sh", "-c", "env"]' target/docker/stage/Dockerfile
I'm quite confident this line won't ever work on WIndows. If not because of exec then because of grep.
So, how to test a Windows only behaviour using a test suite definitely not working on Windows ?

@muuki88
Copy link
Contributor

muuki88 commented May 27, 2020

Thanks a lot for taking the time to consider this 🥰 I fully understand if this is too cumbersome to do 😊

I'll merge and release this next week and maybe I'll find someone who has time and a dev setup that allows easier testing.

Regarding the setting. We can always start without and introduce later.

@muuki88 muuki88 merged commit f7d02ac into sbt:master Jun 2, 2020
@muuki88
Copy link
Contributor

muuki88 commented Jun 2, 2020

v1.7.3 is on its way

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

Successfully merging this pull request may close these issues.

Error due to path separator inconsistency on windows
3 participants