build-image icon indicating copy to clipboard operation
build-image copied to clipboard

Make this repo more accurately reflect Netlify builds

Open morancj opened this issue 5 years ago • 0 comments

According to https://github.com/netlify/build-image/issues/118#issuecomment-364566072,

The only piece that happens "outside that" is the initial git clone which creates the repository directory and happens using the deploy key that is installed in your repository settings. That looks like this:

git clone <your project> ; cd <project checkout> && git submodule update -f --init

That's not quite correct, as README.md#build-environment-variables states:

Your local buildbot emulator doesn't have access to build environment variables set in the Netlify UI or netlify.toml file.

I propose:

  • Move the git submodule operation somewhere more visible;
  • Stop overwriting /usr/local/bin/build and /usr/local/bin/run-build-functions.sh in the docker image with the build scripts. This would only be useful for testing (in my case, replacing the clone command). Instead, leave the scripts there, and document how to add locally-changed versions for local debugging;
  • Parse netlify.toml in the local docker build as you do in production; or support .env files and document their usage.

morancj avatar Jul 07 '20 12:07 morancj