0

I do have following setup:

  • a win PC with gitlab-runner installed (working)
  • a powershell script running on the same PC is starting an application
  • a gitlab server to connect this local PC and starting the powershell script

Now when starting the powershell script directly from the local PC, the application starts and terminates after done - working as expected. When starting the same powershell script with the gitlab server (yml-file) then I can see that the application has been started (new process in taskmanager) but it is not running as well it never terminates.

When manually end the task I see that gitlab terminates again.

Question:

  • what could be the root cause?
  • is it possible to run the powershell script with gitlab-runner? I think there is a way with the command "exec". How does the command looks like when calling the powershell script?
  • is it possible to run the application not in the background in order to see whats going on?
  • others?

thanks in advance

2 Answers 2

1

I think there is a bug with the gitlab runner on windows. No matter which shell you configure in the config.toml the runner will always use cmd.exe for an exec local run.

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
1

Specify the --shell argument to override the default cmd.exe shell:

> gitlab-runner exec shell your_job --shell pwsh

If you run this locally in your project, it outputs to .builds/, so add this to your .gitignore because git will see it and think you might want to add a submodule.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.