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

Handle custom invocation images without #PORTER_INIT #2998

Conversation

kichristensen
Copy link
Contributor

What does this change

The documentation says that if the PORTER_INIT section is missing on the custom dockerfile, it will be placed right after the FROM section. This was not the case, instead it was place at the end of the file, resulting in a dockerfile not working with Porter.

What issue does it fix

Closes #2925

Notes for the reviewer

This could be considered a breaking chance, but it looks like the generated invocation image wouldn't work without this bug being fixed anyway. Also this change aligns with the documentation.

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

The documentation says that if the PORTER_INIT section is missing on the
custom dockerfile, it will be placed right after the FROM section. This
was not the case, instead it was place at the end of the file, resulting
in a dockerfile not working with Porter

Signed-off-by: Kim Christensen <kimworking@gmail.com>
These tests was assertion that the resulting Dockerfile was generated
with the bug fixed in the previous commit

Signed-off-by: Kim Christensen <kimworking@gmail.com>
@schristoff schristoff enabled auto-merge (squash) February 15, 2024 20:18
@kichristensen
Copy link
Contributor Author

@schristoff Are there anything outstanding before this can be merged?

@schristoff schristoff merged commit f0a68b3 into getporter:main Mar 23, 2024
15 checks passed
@kichristensen kichristensen deleted the handleCustomDockerfileWithoutPorterInit branch April 9, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Custom invocation image does not work if removing # PORTER_INIT
2 participants