cloudfoundry / cf-deployment-concourse-tasks

Apache License 2.0
23 stars 76 forks source link

bash trap for "update-integration-configs" task not respecting current directory #4

Closed aashah closed 7 years ago

aashah commented 7 years ago

We had the following error in our CI:

extracting cf admin password from mulan/deployment-vars.yml...
/tmp/build/ddaabd0b/integration-configs /tmp/build/ddaabd0b
updating CATs integration config file: mulan/cats_integration_config.json...
parse error: Expected another key-value pair at line 21, column 1
+ pushd integration-configs
cf-deployment-concourse-tasks/update-integration-configs/task: line 19: pushd: integration-configs: No such file or directory

The root cause was a trailing comma in our mulan/cats_integration_config.json, but the trap function commit_integration_configs in the update-integration-configs tried to navigate the filesystem using relative paths. I think the trap method specifically needs to be using absolute as it won't know what pwd might be.

cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/139875289

The labels on this github issue will be updated when the story is started.

aashah commented 7 years ago

Looks like this was accepted in the created story as well. Closing if that's cool.