I tried to use gitlab ci, I registred profile on gitlab.com with project on .NET, create repository, installed and started windows runner, And created .gitlab-ci.yml
stages:
- build
before_script:
- git submodule sync --recursive
- git submodule update --init --recursive
job:
stage: build
script: ‘“C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe” “Enterprise.sln”’
After commit I got result:
Running with gitlab-runner 11.5.0 (3afdaba6)
on docker-auto-scale fa6cab46
Using Docker executor with image ruby:2.5 …
Pulling docker image ruby:2.5 …
Using docker image sha256:7834f5f61ba80e65515163209a3f952fcd1d11f9ce4420ba63d952e5b52b77e1 for ruby:2.5 …
Running on runner-fa6cab46-project-10034105-concurrent-0 via runner-fa6cab46-srm-1545532159-06e39300…
Cloning repository…
Cloning into ‘/builds/Ikjkh/horse’…
Checking out f25afa2e as new-name…
Skipping Git submodules setup
git submodule sync --recursive git submodule update --init --recursive
$ “C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe” “Enterprise.sln”
/bin/bash: line 74: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe: command not found
ERROR: Job failed: exit code 1
I can’t undestand where I made error , please help, I am noob in gitlab
Thank all for help. I found solution my problem:
For success build I disabled all shared runners and use tags for connection with runner on my computer
this is last version .gitlab-ci.yml:
stages:
- build
before_script: - ‘‘C:\Nuget\nuget.exe’ restore ‘Enterprise.sln’’
job:
stage: build
tags: - test
script: ‘‘C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.ex e’ ‘Enterprise.sln’’