I have a playground pipeline and I am trying to start using cppcheck, but 
when I execute the command in the cmd (I am running windows 10) it works 
fine, but if executing the command inside the pipeline, it returns 
```'cppcheck' is not recognized as an internal or external command``` I 
have installed the plugin and restarted Jenkins... what am I missing then? 
. This is the sample pipeline:
```
pipeline {
    agent any    
    stages {
        stage('Static Analysis') {
            steps {
                script{
                    env.FAILED_STAGE=env.STAGE_NAME
                    bat'cppcheck "D:/Source/Game"'
                }
            }
        }
    }
}
```

however the exactly same command, copied and pasted into the cmd, works 
just fine, analyze the folder and gives me the cppcheck.xml file. 

Also if running the pipeline like this it seems to work just fine:
```
        stage('Static Analysis') {
            steps {
                script{
                    bat'call  "C:\\Program Files\\Cppcheck\\cppcheck.exe" 
D:\\Source\\Game  --xml --xml-version=2 . 2> cppcheck.xml'
                }
            }
        }
```

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/04691194-8864-411b-bd34-2ed8e20ab9fan%40googlegroups.com.

Reply via email to