artifactory-user-plugins
artifactory-user-plugins copied to clipboard
cleanDockerImages: dryRun=false is not honored
curl --silent --show-error --request POST 'http://<url>/artifactory/api/plugins/execute/cleanDockerImages?params=dryRun=false'
Returns the following JSON
{
"status": "okay",
"dryRun": true,
"deleted": [
]
}
It seems the groovy syntax is not honoring the above configuration for dryRun
in cleanDockerImages.groovy file.
Can you check by changing the below line from
def dryRun = params['dryRun'] ? params['dryRun'][0] as boolean : false
to
def dryRun = params['dryRun'] ? params['dryRun'][0].toBoolean() : false
or
def dryRun = params['dryRun'] ? new Boolean(params['dryRun'][0]) : false
The above change works for me. You can find the above line here.