I’ve got project on gitlab.com. I need to perform some local actions on my computer using specific application after commit. So i’ve installed windows shell runner, registered and it works as should be. I’ve started with .gitlab-ci.yml file, which is very simple:
When i test it locally using such command: gitlab-runner-windows-amd64.exe exec shell start
everything is working fine, but when i tried to use it online, got error:
Executing "step_script" stage of the job script
$ echo "Hello world"
Hello world
$ echo $TEST_DIR
C:\xxx\gitlab-runner\builds\xxx\0\xxx\tools\xxx-test\project.xx
$ echo $CI_PROJECT_DIR
C:\xxx\gitlab-runner\builds\xxx\0\xxx\tools\xxx-test\
$ my_tool -p '$TEST_DIR'
Cleaning up file based variables
ERROR: Job failed: exit status 1
Is there possibility to run my_tool as described in yml file (my_tool -p some_path) online? Maybe there is an error in syntax and such command should be written different way?
Hi @robal
It seems the exist status comes from my_tool. I would run it in debug mode or add some more troubleshooting outputs to figure out why it fails.
Actually my_tool has implemented logging functionality (both for console and file), but no output is produced on both channels. So i wonder if there should be met some particular conditions to get it running.
I don’t know what your tests are, but the command you run first my_tool -p '$TEST_DIR' does not do any variable expansion since you have it in single quotes. Is your tool properly handling if you send ‘$TEST_DIR’ as string to it?
Seems that this is not problem with application itself. I’m trying to run UI application, which causes crash of runner instance (cannot be closed or stopped). Got set of Windows logs, maybe this could help to find root cause (tested on other computer and it works):
Got yet another observation - when using online and runner operates as windows service it doesn’t work (doesn’t starts any of my local tool). But when i run runner from command like, e.g (to have full debug):
gitlab-runner-windows-amd64.exe --debug --log-level info --log-format json run