Call JIRA ACLI Commands from a tool

Prasanna Jyothi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 3, 2024

I have multiple commands that I am trying to call from a txt file. They run fine from cmd line. I need to automate this process via SQL Server agent job or  python script. How do I call the acli text file from any of those applications? Any help would be much appreciated.

 

SQL server command: - Failing

EXEC xp_cmdshell 'acli.bat jiradc -a run -f E:\JiraCloud_Files\ACLI_Command_Calls\test_multiple_acli_commands.txt\acli.bat'

 

Python script:-- Failing

 

import subprocess

from jira import JIRA

# Path to your batch file
batch_file_path = r'acli.bat jiradc -a run -f E:\JiraCloud_Files\ACLI_Command_Calls\test_multiple_acli_commands.txt' # failed


#batch_file_path = r'C:\full\path\to\your\file\acli.bat'


# Call the batch file using subprocess
#subprocess.run([batch_file_path])

subprocess.run(['acli.bat', 'jiradc', '-a', 'run', '-f', 'E:\JiraCloud_Files\ACLI_Command_Calls\test_multiple_acli_commands.txt'], shell = True)

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events