Document custom buildpack git branch url format
Following https://github.com/cloudfoundry/dea_ng/pull/90 custom buildpack urls support branch specifiers (e.g. https://github.com/Orange-OpenSource/java-buildpack.git#stable_v1, but its not documented. I'm submitting a docs PR. Would be useful to have this documented into the cf help output which currently only displays master branch example
$ cf-v6.3.0.exe push --help
NAME:
push - Appuyez une nouvelle application ou les modifications à synchroniser à une application existante
ALIAS:
p
USAGE:
Appuyez une seule application (avec ou sans un manifeste):
cf-v6.3.0.exe push APP [-b BUILDPACK_NAME] [-c COMMANDE] [-d DOMAINE] [-f MANIFEST_PATH] [-i NOMBRES_INSTANCES] [-k DISC] [-m MEMOIRE] [-n HÔTE] [-p PATH] [-s PILE] [-t TEMPS_E
XPIRÉE]
[--no-hostname] [--no-manifest] [--no-route] [--no-start]
Appuyez plusieurs applications avec un manifeste: cf-v6.3.0.exe push [-f MANIFEST_PATH]
OPTIONS:
-b Personnalisé buildpack par nom (par exemple mon-buildpack) ou GIT URL (par exemple https://github.com/heroku/heroku-buildpack-play.git)
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/75205334.
@gberche-orange Thanks for the doc PR and this request to update the built-in help text.
@lcddave Do you want us to move this to the CLI tracker?
Thanks @krishicks && @dliebreich CF Community Pair
@dliebreich The CLI help isn't meant to be a full command reference. However this change is fine. Please move.
@gberche-orange Is this what you are requesting?
-b Custom buildpack by name (e.g. my-buildpack) or GIT URL with optional branch (e.g. https://github.com/heroku/heroku-buildpack-play.git#stable)
@goehmen yes.
Further more, it seems that the git url format may also contain a commit hash, even if the backend message is kind of confusing, reporting failure to checkout the specified branch. It might be useful at times to further target a specific immutable commit hash, or avoid creating branches.
$ cf push buildpack-hash -b https://github.com/cloudfoundry/java-buildpack.git#793f793c7b5c61c793ebdc7d37c4f47a824c9a0a -p ./travel.war
Creating app buildpack-hash [...]
OK
[...]
Starting app buildpack-hash in org [...] as [...] ...
OK
-----> Downloaded app package (24M)
Cloning into '/tmp/buildpacks/java-buildpack'...
warning: Could not find remote branch 793f793c7b5c61c793ebdc7d37c4f47a824c9a0a to clone.
fatal: Remote branch 793f793c7b5c61c793ebdc7d37c4f47a824c9a0a not found in upstream origin
Cloning into '/tmp/buildpacks/java-buildpack'...
Note: checking out '793f793c7b5c61c793ebdc7d37c4f47a824c9a0a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 793f793... Add SSL debugging
-----> Java Buildpack Version: 793f793 | https://github.com/cloudfoundry/java-buildpack.git#793f793
-----> Downloading Open Jdk JRE 1.8.0_25 from https://download.run.pivotal.io/openjdk/lucid/x86_64/openjdk-1.8.0_25.tar.gz (1.2s)
Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.3s)
[...]
So the help msg could be enhanced as follows
-b Custom buildpack by name (e.g. my-buildpack) or GIT URL with optional branch or commit hash (e.g. https://github.com/heroku/heroku-buildpack-play.git#stable)
So, this has been in for a while now. Closing the issue.