Replies: 3 comments 4 replies
-
+1 |
Beta Was this translation helpful? Give feedback.
-
Found the issue in the code. services/tasks/LocalJob.go function "getShellArgs" Line#175. It only adds the script name (t.Template.Playbook) to the args, but it never append the t.Template.Arguments and t.Task.Arguments to the "args" array. |
Beta Was this translation helpful? Give feedback.
-
Python templates are not working for me, I'm using Sempahore 2.10.22-e44910d-1721658299 I wrote a simple python script to print out arguments that the script receives : import sys num_args = len(sys.argv) - 1 print(f'Number of arguments passed: {num_args}') Print the argumentsif num_args > 0: and then I tried to run the template multiple times using 'args' , 'CLI args in task' and I see there are no arguments being fetched from Semaphore |
Beta Was this translation helpful? Give feedback.
-
I tried to setup bash/python script template, but I could not get the arguments to pass to the actual script. I added "arg" in the "Args" section, also tried manually entering the CLI args json array ["arg1","arg2"]. but script never pickup those. I also watch the actual command line it launches; I do not see any arguments in the command line. it just like 'bash myscript.sh'. Did I miss anything? Anyone has example with template setup include arguments to the script (bash/python)?
I searched Q&A section and did not see any answers related to this topic.
Here is the test bash script:
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions