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

Helmfile image runs into line-endings issues when starting build from Windows #530

Open
johnwchadwick opened this issue Aug 30, 2021 · 1 comment

Comments

@johnwchadwick
Copy link

Affected builder image

gcr.io/cloud-builders-community/helmfile

Expected Behavior

docker run -it --rm --entrypoint /bin/bash gcr.io/insomnia-api-staging/helmfile -c "file /builder/helmfile.bash"
/builder/helmfile.bash: Bourne-Again shell script, ASCII text executable

Builds using the default entrypoint should succeed as expected.

Actual Behavior

docker run -it --rm --entrypoint /bin/bash gcr.io/insomnia-api-staging/helmfile -c "file /builder/helmfile.bash"
/builder/helmfile.bash: Bourne-Again shell script, ASCII text executable, with CRLF line terminators

Builds using the default entrypoint fail as follows:

standard_init_linux.go:228: exec user process caused: no such file or directory

Steps to Reproduce the Problem

  1. Clone GoogleCloudPlatform/cloud-builders-community on Windows
  2. cd cloud-builders-community/helmfile
  3. gcloud builds submit --config .\cloudbuild.yaml
  4. Start pipeline using resulting image
  5. Observe failure.

Additional Info

It'd be possible to fix this issue with a .gitattributes file to at least prevent autocrlf from touching bash scripts. However, as of now I don't see any such files in this repo.

This issue likely affects other images here. It'd probably be good to just use .gitattributes to entirely override autocrlf behavior.

@dgduncan
Copy link

dgduncan commented Feb 1, 2022

This affects the Firebase image as well

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