Closed jessedobbelaere closed 4 years ago
If you can create a reproduction repo then I can debug it. We'll need:
config.js
you usePresumably a composer.json/lock with a single dependency is enough to reproduce it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs.
hi @rarkins sorry to open this few months old issue. What I did was do some debugging myself:
"ignoreScripts": true,
to my renovate.json
filedist/manager/composer/artifacts.js
to print out the value of config.ignoreScripts
ignoreScripts
at all 🤔 it printed undefined
as the value for ignoreScripts.I had a look at dist/config/definitions.js
and saw that the ignoreScripts
has a stage: 'package'
:
{
name: 'ignoreScripts',
description:
'Configure this to true if trustLevel is high but you wish to skip running scripts when updating lock files',
stage: 'package',
type: 'boolean',
default: false,
},
If I remove the stage: 'package'
from ignoreScripts
– just like other options such as ignoreNpmrc
– it works and composer.ignoreScripts
returns true
and composer succesfully adds the --no-scripts
argument 🎉
I wonder what the stage: 'package'
does in definitions.ts and should it be there for the ignoreScripts
option? What do you suggest as a fix? Remove it, or should it actually be in the package stage?
That line can be removed. Great troubleshooting!
Which Renovate are you using?
Renovate Open Source CLI
Which platform are you using?
GitLab self-hosted
Have you checked the logs? Don't forget to include them if relevant
What would you like to do?
In https://github.com/renovatebot/renovate/pull/4963 the possibility for an
ignoreScripts
config setting was added because we run withtrustLevel: high
but we needed to skip the composer post-install scripts as php extensions, db connection, etc are not available in the renovate container.I tried to add the
ignoreScripts: true
setting today. We have a global config with trustLevel high:Then, in our repository with PHP code, we have the
ignoreScripts
set to true:But as you see in the logs above, it does not find the
config.ignoreScripts
in https://github.com/renovatebot/renovate/blob/master/lib/manager/composer/artifacts.ts#L120-L123 so it keeps on running the scripts.I was wondering if my config is correct regarding the
"ignoreScripts": true
. I tried debugging with aconsole.log(JSON.stringify(config));
in thedist/manager/composer/artifacts.js
but I don't see the ignoreScripts defined in the config at all.