Conversation
| end | ||
|
|
||
| def project_dir | ||
| '/app' if node_build_id |
There was a problem hiding this comment.
I assume the project directory is always in /app directory on Heroku CI.
There was a problem hiding this comment.
It is as far as I know, and .git is not present.
There was a problem hiding this comment.
@mikescar Ok. Actually, we don't need to care about project_dir when Heroku provides branch and git commit via ENV vars. I use project_dir only when I need to detect branch/git hash because they are not available via ENV for CI provider. In case of Heroku they expose branch/git hash so we should be good. The knapsack_pro won't use project_dir.
| module CI | ||
| class Heroku < Base | ||
| def node_total | ||
| # not provided |
There was a problem hiding this comment.
It would be great to be able to read from Heroku ENV info how many parallel CI nodes we have. For instance we have 5 parallel jobs on Heroku then the value for node_total should be 5.
If Heroku won't expose ENV then we can manually set KNAPSACK_PRO_CI_NODE_TOTAL
| end | ||
|
|
||
| def node_index | ||
| # not provided |
There was a problem hiding this comment.
Here we should be able to read from Heroku ENV the index of current parallel node. It should start from 0. So in case when we have 5 node total then the node_index is within range 0 - 4.
If Heroku won't expose this node index then we can manually set KNAPSACK_PRO_CI_NODE_INDEX
|
Looks good to me. 👍 |
To test branch:
Heroku docs:
https://devcenter.heroku.com/articles/heroku-ci#quick-start
https://devcenter.heroku.com/articles/heroku-ci-parallel-test-runs