Skip to content

Instantly share code, notes, and snippets.

@jkutner
Last active July 6, 2020 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkutner/d54af306952171bc512cdc07b6b00fd6 to your computer and use it in GitHub Desktop.
Save jkutner/d54af306952171bc512cdc07b6b00fd6 to your computer and use it in GitHub Desktop.
[[build.buildpacks]]
id = "cnb/make"
version = "1.0"
[[build.buildpacks]]
uri = "https://github.com/heroku/nodejs-engine-buildpack/releases/download/v0.4.4/nodejs-engine-buildpack-v0.4.4.tgz"
[[build.buildpacks]]
uri = "docker://gcr.io/projectriff/node-function:0.6.1"
[[build.buildpacks]]
uri = "cnb://buildpacks.io/cnb/make"
[[build.buildpacks]]
api = "0.3"
shell = "bash"
inline = """
rake war
rake db:migrate
"""
@jabrown85
Copy link

Maybe we move the definition of the buildpack to its own table in project.toml. Something like:

[[buildpacks.inline]]
name = "mybp"
api = "0.3"
shell = "bash" # optional
version = "latest" # optional
detect = """
  exit 0
""" # optional
build = """
  rake war
  rake db:migrate
"""

[[build.buildpacks]]
id = "cnb/make"
version = "1.0"

[[build.buildpacks]]
uri = "https://github.com/heroku/nodejs-engine-buildpack/releases/download/v0.4.4/nodejs-engine-buildpack-v0.4.4.tgz"

[[build.buildpacks]]
uri = "docker://gcr.io/projectriff/node-function:0.6.1"

[[build.buildpacks]]
uri = "cnb://buildpacks.io/cnb/make"

[[build.buildpacks]]
id = "mybp" # this references the inline by name only

That way it's more like pack build --buildpack mycustomone. This could also pave the way for buildpack.toml support. This might not fit your idea though. It's a bit closer to packfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment