cf-resource icon indicating copy to clipboard operation
cf-resource copied to clipboard

If path param is a directory, it is not passed to cf push

Open sartan opened this issue 8 years ago • 1 comments

I'm deploying a .net core app, specifying both the path and manifest parameters. As the documentation implies, I'm expecting the path in my pipeline to take precedence over the path in the manifest. However, in my case the path does not point to a single artifact (i.e., jar), but rather a directory with a bunch of dlls.

If I'm reading the code correctly, when path is a directory, we navigate into that directory and push from there, but never specify the -p flag. Therefore, the pipeline attempts to use the path in the manifest, which is not the desired behavior.

https://github.com/concourse/cf-resource/blob/783280d98c69b0de44eb8678aef14b91542c2353/out/cloud_foundry.go#L47-L60

relevant snippet of pipeline.yml:

jobs:
- name: build-and-deploy
  plan:
  - get: my-app
    trigger: true
  - task: build and test
    file: my-app/ci/build.yml
  - put: deploy
    params:
      manifest: my-app/manifest.yml
      path: build-output # <-- the built dlls are placed here

manifest.yml :

---
applications:
- name: my-app
  path: src/MyApp/bin/Release/netcoreapp1.1/publish/
  random-route: true

sartan avatar Oct 04 '17 21:10 sartan

It looks like this was fixed 9 months ago in https://github.com/concourse/cf-resource/commit/e07c4c5a154cfb6a2950d84c07b53a70c7513e7d ?

philandstuff avatar Nov 14 '19 09:11 philandstuff