I have one stage and one job in that stage in my pipeline. I am running the script by going into the project location and then entering "mvn clean test"
script:
- echo "starting maven compile"
- cd "Desktop\automated-test-scripts\mavenAutomatedSetupTesting"
- "mvn clean test"
it starts the job displays the first echo message and my testng.xml file gets triggered everything looks good so far but then the pipeline never stops even on build failure (my maven project finishes the test execution and tells me how many test cases passed or failed) but the pipeline is still on-going and keeps running until the runner times out then it shows this message
see this image the execution took less than 2 mins but the pipeline went on until runner timed out (set to 15 mins)
the same file runs perfectly fine when I run it through Command prompt from my pc and finishes automatically how it is supposed to finish but when ran from a gitlab pipeline it never terminates the job
before_script
section that were still alive after thescript
finished. It is a GitLab issue gitlab.com/gitlab-org/gitlab-runner/-/issues/3228. My solution was to kill the background processes myself before the end of thescript
section.