Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cloudfoundry: use an older buildpack version

Cloundfoundry recently updated its Java buildpack to version 2.5 (including java 8 and tomcat 8). I still would like to use version 2.4 since my app hasn't been upgraded to java 8 yet. What is the easiest way to do so?

I can push the app using

cf push app -b https://github.com/cloudfoundry/java-buildpack

but how can I specify to use release 2.4 (https://github.com/cloudfoundry/java-buildpack/releases/tag/v2.4)? Apparently specifying the tag URL instead doesn't work.

like image 820
obecker Avatar asked Sep 30 '14 08:09

obecker


People also ask

What is a Cloud Foundry Buildpack?

Buildpacks provide framework and runtime support for apps. Buildpacks typically examine your apps to determine what dependencies to download and how to configure the apps to communicate with bound services. When you push an app, Cloud Foundry automatically detects an appropriate buildpack for it.

How do I find the Java Buildpack version in PCF?

Go to sub-dir: src -> build packs -> java-buildpacks-release -> releases/java-buildpack-release, you can see the Java Buildpack version is 3.6.


1 Answers

To specify a branch with "cf push -b", put a "#" before the branch name. In your example, you would use

$ cf push app -b https://github.com/cloudfoundry/java-buildpack#v2.4

This might give you some strange messages about the buildpack clone being in "detatched HEAD" state, but that can be ignored.

You should be able to run your app on the Java 8 JRE even though it was compiled with an earlier JDK. Are you getting errors when running your app on the Java 8 JRE?

Use directly the version number in the url - without "tags/": java-buildpack#tags/v2.4 -> java-buildpack#v2.4

like image 98
Scott Frederick Avatar answered Sep 30 '22 16:09

Scott Frederick