I installed jenkins in local windows machine. Then i installed terraform plug in and did the config changed in global tool configuration in jenkins but when i run the jenkin pipeline i get 'terraform' is not recognized as an internal or external command, operable program or batch file.
Code :
pipeline {
agent any
stages {
stage('Hello') {
steps {
bat 'terraform --version'
echo 'Hello World'
}
}
}
}
can you help me what i am doing wrong in this?
Started by user admin
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\actimize2
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Hello)
[Pipeline] script
[Pipeline] {
[Pipeline] tool
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: No tool named terraform found
Finished: FAILURE

agent. - Matt Schuchard