5

I'm trying to use a regexp for path variable in cloudfoundry manifest however I couldn't find a way around. This is a Spring Boot application with JAR build.

suppose I have the path as below:

name: MyApp
path: build/libs/MyApp*.jar

It doesn't seem to work this way; all I'm trying to achieve is for cf to catch the only JAR file in build directory and push it.

Has anyone know a way around this?

Regards

neocorp
  • 569
  • 7
  • 20

2 Answers2

3

Just use command-line parameters with shell wildcard expansion. Remove the path field from manifest.yml and do something like this on a Unix-like OS:

$ cf push -p build/libs/MyApp*.jar

Scott Frederick
  • 4,184
  • 19
  • 22
  • Thank you Scott, but this is not what I'm looking tor actually. I'm actually trying to have this kind of ability within manifest.yml. – neocorp Aug 16 '17 at 06:03
  • "I'm actually trying to have this kind of ability within manifest.yml.". You're not going to get that ability in manifest.yml - it's not supported by the cf CLI. – Scott Frederick Aug 16 '17 at 16:51
2

The purpose of the app manifest is to be able to version the attributes you push your app with (e.g. by checking it in to source code management system with your app source).
Supporting regular expressions in app names, i.e. not declaring explicitly what file (or file version?) you are pushing goes against that. So that's not supported.

dkoper
  • 1,485
  • 9
  • 10