We've got an interesting situation I was hoping for some insight into. Our client would like developers to explicitly to always state their buildpacks (either on the CLI or in the manifest) when pushing their apps, so I've been tasked to creating a buildpack that will sit at priority one in the list of buildpacks. The buildpack should output a message to the developer, and just fails.
Currently, I've gotten the failure part working (I just return 1 at the end of the "release" script), but what I've not yet been able to do is get it to output anything. I'm using bash for this buildpack, and here are the scripts themselves (modeled after [1]):
detect:
#!/usr/bin/env bash
echo "----> Using the fail buildpack"
echo "----> If you're here, you didn't explicitly set your buildpack info."
echo "-----> This buildpack will now fail."
compile:
#!/usr/bin/env bash
echo "----> You must specify a buildpack on the command line (-b) or in your manifest.yml file"
release:
#!/usr/bin/env bash
exit 255
My question is simple. What should I do to get those echo statements to appear when you run `cf push`? Do those three scripts need to complete successfully and then just run a script that fails?