Closed elwynelwyn closed 4 years ago
The Renovate task is currently failing in Azure Pipelines for me due to this issue, and unfortunately the Bash task workaround doesn't seem to be working.
Actually, when you look at the Readme.md, you can see that I was using the task Yarn Tool Installer
, and everything was working fine.
A few months ago, it stopped working because of an issue that in renovate, he was not able to find the path of yarn (like you!!!) I tried many things without any success :(
Today I don't use the task Yarn Tool Installer
and renovate is using npm
directly. It's working... but without yarn!
But I agree that it would be good to be more integrated... So what are the options?
//Project is going back to active :)
With npx, you would not globally install Renovate at all. So lines ~50 - 60 would go away. Then your runRenovate
would change to
const runRenovate: ExecutionOptions = { tool: 'npx', arguments: `renovate@${renovateOptionsVersion} ${renovateArgs}` }
npx will take care of installing renovate and then runs it, all in one.
You can get the path to the bin folder by executing yarn global bin
. You can then save this into a variable, and in your runRenovate
if it is yarn capable you can do
{ tool: yarnBinPath + 'renovate'` ...
I will then need to install npx globally first. So is it really better?
I will correct it now and see your feedback 👍
For 1., no, npx
is available everywhere npm
is available (it installs with npm, from version 5.2.0 onwards)
@elwynelwyn can you have a look? I merged with the "manual search of the bin path".
And now see that with npx... we can remove a LOT of lines! Hummm... what is the best?
Looks good! Thank you for making the change!
I'm just setting this up on a new pipeline, and I've selected a
Hosted Ubuntu 1604
from theAzure Pipelines
agent pool.This Ubuntu instance has yarn installed, however the yarn globals bin directory is not in the $PATH.
This means that the Renovate task successfully does the global yarn install of the
renovate
package, but when it comes time to run, fails with an error thatrenovate
can not be found.My workaround was to add a new Bash task in the pipeline before Renovate, which runs this:
It would be great though if this was not necessary. A couple of options come to mind. One would be to run
renovate
vianpx
. This would add a dependency on having a recent version of npm available, but it would mean there is no need for the global install. Another would be to figure out the absolute path to the Renovate binary by using theyarn global bin
command.