-
Notifications
You must be signed in to change notification settings - Fork 286
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
Need a way to shorten cycle times when developing a buildpack #54
Comments
One problem with running |
I just want to be able to see it run quickly. The experience of waiting for |
I think that you need to create your environment in a complaint way. That means setting the environment as-if you were inside the build image itself, but without being within the build image. The spec defines this entire environment, including paths and environment variables ( |
This is what I have been doing:
It works. I guess all I'm looking for here is some authoritative way of doing the env and stdin set up, e.g. a new command in |
That's an interesting idea. There's an existing pattern where commands do things like |
The |
Right now the |
We could also do some optimizations to make |
#25 says
So that sounds like it's not yet what I need? I want to run my buildpack that I am trying (against all reason) to debug. Ideally I'd like to not run it in a container. But I suppose I don't mind, as long as I can control the container it runs in. If it is running in a container, I probably want to be able to use other buildpacks - e.g. to install openjdk using one of Ben's things, and use that in my UPDATE: realized that's probably what @ekcasey was saying. |
Re-reading #25 it looks like I can supply multiple buildpacks. It's not clear to me yet what that means. How does a buildpack ID correspond to a) my local buildpack, b) someone else's? When I have a |
@dsyer - you should be able to just pass in multiple |
That's the bit I didn't understand yet. How does |
@dsyer - Pack points to a builder image - it uses Until we implement #11 - using a custom builder is the only way to pass in a custom buildpack. Is there a specific reason you are looking to avoid creating your own builder - just curious? its pretty straightforward (but undocumented :/) if you follow these commands -
Sample builder.toml
|
That’s what I have been doing. It’s straightforward but indirect and very slow. Short cycle times is what this is about remember. |
Multiple buildpacks can cooperate in both the detection and build phases to support multi-stage builds or build extensions. Happy to go into more detail about this if you'd like.
We plan to address this with #11 and additionally a way to keep the container around after a build for debugging purposes.
After #11 is implemented, passing a number of local buildpack directories in via the |
This shortens the dev cycle for buildpack authors [#54] NOTE: We chose to copy the buildpack in to "detect" and "build" rather than copy to workspace and reuse it, since changing the buildpacks directory causes problems with the "/buildpacks" directory structure. Specifically the fact that "latest" is often a symlink to a version.
This shortens the dev cycle for buildpack authors [#54] NOTE: We chose to copy the buildpack in to "detect" and "build" rather than copy to workspace and reuse it, since changing the buildpacks directory causes problems with the "/buildpacks" directory structure. Specifically the fact that "latest" is often a symlink to a version.
To shorten dev cycles when developing a buildpack I have found it useful (essential) to be able to run the
detect
andbuild
locally. In doing that I found that many existing buildpacks (ones built with libpack probably) make assumptions about env vars, so they barf, for example, ifPACK_STACK_ID
is not set. That's useful to know (and not obvious from any documentation I managed to grok), but it means I can't usePACK_STACK_ID
as a signal that I'm running in pack (or some kind of platform). I have adoptedPACK_PLAN_PATH
as such a signal (it's not mandatory for any of the packs that I have tried, and it is always there when running in pack), but it might not be stable. So what I need, I think, is something that is "just there", and doesn't mean anything other than that we are running inpack build
.The text was updated successfully, but these errors were encountered: