cf-resource
cf-resource copied to clipboard
vars_files can never be resolved to paths that work
Concourse 5.5.1 vars_files can never be resolved to paths that work.
... inside resources
- name: development
type: cf
source:
api: ...
username: ...
password: ...
organization: ...
space: ...
... inside tasks of the pipeline
- put: development
inputs: [put]
params:
manifest: put/manifest.yml
vars_files:
- put/<path to file>
Always fails with vars file file not found from the cf push command.
Incorrect Usage: The specified path 'put/sreteam.yml' does not exist.
And the file does exist, as checked by prior steps.
I have seen other versions of this with the magic directory /tmp/build/put/
It would seem that the working directory of the cf push
command isn't /tmp/build/
Workaround:
After reading some code I found that if I define path parameter, now vars file will be relative to that folder because it will chdir into it first before running the command.
We're having the same issue. @ShoryuKyzan can you explain your workaround in more detail?
Bit late but incase this helps someone, just put the path to the vars files relative to the path parameter like:
- put: cf
params:
path: first-input-directory
manifest: first-input-directory/manfiest.yml
vars_files:
- ../second-input-directory/vars.yml
facing issue 'Expected to find variables' error even after defining vars_files with relative to path And all the parameters defined in vars file matches with manifest's, no issue with parameters definition