In our project we have one workflow which relies on python numpy matrices to assign appropriate user. There is no issue with calling python from scriptrunner script and getting its value. However, the numpy matrix needs some calculated value to determine which user it will return, and that value is calculated by another script
It goes like this
The -> means "calls" in this context
groovy script -> python User matrix -> python Value calculation script
If it's called like that everything works. But we need to move that value calculation script to groovy and need to call that groovy script from within python matrix script.
So it will go like this
groovy script -> python User matrix -> groovy Value calculation script
The issue is, python matrix cannot call groovy script. It just returns an error stating it doesn't have necessary file permissions. All the groovy scripts, and groovy executable on the server were chmod 777 to see if it will help. It didn't.
How can we do this?
Code for calling groovy from within python looks like this
amount = subprocess.Popen(["/root/.sdkman/candidates/groovy/4.0.3/bin/groovy",
"/home/jira-home/scripts/valueCalcScript.groovy",
sys.argv[1],
sys.argv[5],
"additionalArg"
],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
).communicate()