Hi, I am trying to pass parameters in jenkinsfile while running the terraform plan. Can someone please help?
parameters { stringParam(envName: 'work', defaultValue: 'gamma', choices:['gamma', 'epsilon', 'referecne'],description: 'Workspace/environment file to use for deployment') stringParam(dirName: 'directory', defaultValue: 'workitems', choices:['workitems', 'services', 'ssr', 'user-mgmt']) stringParam(branchName: 'branchname', defaultValue: 'test_jenkins_microservices', choices:['test_jenkins_microservices', 'master']) } docker run -e -c " cd ${WORKSPACE}; ls -l; export TF_LOG=TRACE; chmod +x terraform; terraform plan --var-file 'common.tfvars.json' --var-file='vars/${params.work}.tfvars.json'" -- 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/CAKRLcHgrbO601MrRwdoFrnAVLOUDrimdQbXrdoKiK9QXyqp5TQ%40mail.gmail.com.