I am learning jenkins on my own and I do not have much experience. I just found out about warnings-ng plugin and I am trying to get acces to tokens in my pipeline:
pipeline {
agent any
stages {
stage('analysis') {
steps {
script{
bat'''
cppcheck "C:/Users/anton/Desktop/railway" --xml --xml-version=2 . 2> cppcheck.xml
'''
}
}
}
stage('Test'){
steps {
script {
def cppCheck = scanForIssues tool: cppCheck(pattern: 'cppcheck.xml')
publishIssues issues: [cppCheck]
echo "${ANALYSIS_ISSUES_COUNT}"
}
}
}
}
}
as mentioned in the warnings-ng documentation but I get an error No such property: ANALYSIS_ISSUES_COUNT for class: groovy.lang.Binding how would be the right syntax to access the token? or is there anything needed to do before accessing to it, as far as I understood I just need the token macro plugin installed, which I have, and the warnings-ng plugin provided those tokens to be accessible, am I wrong?