Hi. Having polling enabled in a pipeline job in a situation there is a script approval required the build fails with:
Started by an SCM change
org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use
at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(ScriptApproval.java:466)
at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:117)
at org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition.create(CpsFlowDefinition.java:64)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:298)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
It's ok. However, after a minute (or time defined in a cron expression) the job is triggered again and again (filling up the space defined in build retention).
It seems that Jenkins in that situation doesn't recognize that a given SCM commit has been already built.
Should I consider it as a bug or it can be configured somehow?
Marcin