Use caller node installation (containerHandler) #4999
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I always experience issues when I run dockerized jobs in my Azure DevOps pipeline. The issue being that the docker image does not find the node installation path that the containerHandlerInvoker.js expects. I have, however, found a way to solve my issues.
Instead of using the handler from the stdin, we use the handler directly from the caller node. As such, my docker containers do not need to have the exact node version installed at the given path.
Now, I can easily apply this if I run a local agent. However, for the default agents, it's more involved to get in the way.
This is why I propose a PR. If you see another fix, or if I'm wrong, I'd be glad to hear why 👍🏼
I feel like the steps should be able to run if
process.execPath
resolves to a correct node path, even ifstdinData.handler
does not.Cheers