Downloads and makes flyway available in a folder to be easily called from your application.
For Windows:
cf push myApp -s windows2016 -m 512m --no-start -b binary_buildpack
cf v3-push myApp -b https://github.com/rossr3-pivotal/flyway-buildpack.git -b hwc_buildpackFor Linux:
cf push myApp -m 512m --no-start -b binary_buildpack
cf v3-push myApp -b https://github.com/rossr3-pivotal/flyway-buildpack.git -b "your last buildpack"For testing Linux, I used the PHP buildpack and this simple app to validate that the environment variable(s) were set correctly.
The buildpack sets the environment variable PCF_FLYWAY_BINDIR to point to the folder where the flyway app is located.
You would then call flyway from your application using
For Windows:
%PCF_FLYWAY_BINDIR%/flyway [options] [command]For Linux:
$PCF_FLYWAY_BINDIR\flyway [options] [command]See the flyway documentation for more details