6

I've been using the GitLab CI runner on Windows for a couple of years now, and am wondering why it takes a long time between when the compile has actually completed before GitLab deems that the job has completed.

Here's a few screen grabs to show what I'm talking about. This one shows that the compilation is complete:

enter image description here

MSBuild is complete, so the build stage is complete. The 31 second time is the time it took MSBuild to finish, but there was another minute or so of getting packages from NuGet and Bower and NPM before that. Here's a picture of the current job running time:

enter image description here

But then GitLab sits with the 3 dots for another two minutes or so before it decides the job has actually succeeded:

enter image description here

enter image description here

I turned on CI_DEBUG_TRACE but it didn't show much that seemed useful to me. I've also played around with caching and artifacts but turned them off because the artifacts were too big and it didn't significantly change the build time. Here's the .gitlab-ci.yml file:

stages:
 - build
 - test

before_script:
  - '.nuget\\nuget.exe restore <name>.sln'
  - 'call bower install'
  - 'call npm install'
  - 'call gulp'

cache:

build:
 stage: build
 dependencies: []
 script:
  - '"C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\MSBuild.exe" <name>.sln /t:ReBuild /p:Configuration=Release'
 retry: 2

test:
 stage: test
 dependencies: []
 script:
  - '"C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\MSBuild.exe" <name>.sln /t:ReBuild /p:Configuration=Release'
  - ".\\packages\\xunit.runner.console.2.3.1\\tools\\net452\\xunit.console.exe UnitTest\\bin\\Release\\UnitTest.dll"
 retry: 2

A couple of minutes doesn't seem too bad except it's happening with each stage in the pipeline, so it adds up quickly.

In the past that 2-minute delay didn't happen, but I don't know what might have changed or what I might have done to cause it. The runner is the latest version.

Any ideas or suggestions?

AlfieJ
  • 339
  • 1
  • 5
  • 15
  • Possibly due to it's high development pace - GitLab currently faces quite a lot of downtimes and errors. We've the same issues with GitLab in our company. CI servers have reduced resources sometimes, sometimes they are down totally, API is often down, http is often down with 500' errors. It's worth checking [status page](https://status.gitlab.com/) to be up to date. – trust512 May 07 '18 at 22:10
  • This happens with my team, but with delay of 5-10 minutes. – Rafael Duque Estrada Jan 25 '19 at 18:30
  • uh, the first comment doesn't make sense. GitLab only had self-hosted Windows runners at the time of posting, so it has nothing to do with their "CI servers". OP: Assuming you're using a self-hosted runner, how is the runner configured? – Arty-chan Mar 17 '23 at 15:48

0 Answers0