deis/deis — pull request #960 by gabrtv (2014-05-12 18:01:33+00:00)
Title: Expose runtime configuration during slugbuilder execution

Fixes #462.

This PR uses a new Config hook to grab the latest app configuration from the controllerand expose it to slugbuilder using `-e` flags. While this works, it is not a very good mechanism for handling user-defined inputs on the builder. We must consider this as we move to refactor the builder in Go.

Example of setting a custom BUILDPACK_URL:

```console
$ deis create
Creating application... done, created humble-autoharp
Git remote deis added
$ deis config:set BUILDPACK_URL=https://github.com/dpiddy/heroku-buildpack-ruby-minimal
Creating config... done, v2

=== humble-autoharp
BUILDPACK_URL: https://github.com/dpiddy/heroku-buildpack-ruby-minimal
gabriel@delta:~/workspace/src/github.com/opdemand/example-ruby-sinatra$ git push deis master
Counting objects: 92, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (50/50), done.
Writing objects: 100% (92/92), 19.97 KiB | 0 bytes/s, done.
Total 92 (delta 40), reused 85 (delta 37)
-----> Fetching custom buildpack
Cloning into '/tmp/buildpacks/custom'...
-----> Ruby app detected
-----> Using bundler-1.5.2
-----> Using ruby-1.9.3
-----> Installing dependencies
Fetching gem metadata from http://rubygems.org/..........
Fetching additional metadata from http://rubygems.org/..
Using bundler (1.5.2)
Installing rack (1.5.2)
Installing tilt (1.3.6)
Installing rack-protection (1.5.0)
Installing sinatra (1.4.2)
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
```

Note this particular buildpack doesn't contain a `bin/release` and errors with:
```
/tmp/builder/build.sh: line 94: /tmp/buildpacks/custom/bin/release: No such file or directory
Slugbuilder returned error code
```

.. but that's not our problem.