Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,378
Community Members
 
Community Events
168
Community Groups

Can I call and run a Python script from within a Groovy script?

I am using Jira automation to a run a Groovy script from Scriptrunner. Can I use that script to run a Python script? It's in the same directory, and it works successfully when I run it manually, but now I just need to run it automatically when the Groovy script is run.

1 answer

1 accepted

1 vote
Answer accepted

Hi @Alexis Evans 

You should be able to execute a command from your script.

https://groovy-lang.gitlab.io/101-scripts/basico/command_local-en.html

 

This command can be python ./mypytonscript.py for instance.

Regards

Thanks for the link, that's helpful!

One question I have is about how to actually execute the command. When you set a string equal to "command".execute() then does the command actually execute when the script is run? Or is there something else I have to do?

Suggest an answer

Log in or Sign up to answer