Access scanner context within Jenkins Pipeline?

Nevermind, i’ll go with the web api call after the waitForQualityGate() step.

Edit = for others with that problem, here is how to get the id for the web call

Note = pwd() or WORKSPACE don’t work on a Jenkins node

reportTask = findFiles(glob: '**/**/report-task.txt')
ceTaskId = readProperties(file: reportTask[0].toString())['ceTaskId']

then use ceTaskId with the web api call