cloudfoundry-community / cf-resource

Concourse resource for interacting with Cloud Foundry
Apache License 2.0
35 stars 63 forks source link

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

Open sartan opened 7 years ago

sartan commented 7 years ago

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
philandstuff commented 5 years ago

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