Continuous integration GitLab CI。不同用户的yml路径

Continuous integration GitLab CI。不同用户的yml路径,continuous-integration,gitlab,gitlab-ci,Continuous Integration,Gitlab,Gitlab Ci,我正在尝试为.net项目设置GitLab CI。现在我正在用yml文件编写脚本。我想知道的是:对于不同的团队成员,msbuild.exe和mstest.exe的路径可能不同,同一个yml脚本如何适用于不同的用户? 或者可能是我理解GitLab CI如何以错误的方式工作?指向mstest.exe和所有其他引用的可执行文件和文件的路径基于运行GitLab runner的计算机 你的机器或其他人的机器上有什么并不重要;只有构建服务器才重要,因此相应地编写gitlab.yml net yml文件示例

我正在尝试为.net项目设置GitLab CI。现在我正在用yml文件编写脚本。我想知道的是:对于不同的团队成员,msbuild.exe和mstest.exe的路径可能不同,同一个yml脚本如何适用于不同的用户?

或者可能是我理解GitLab CI如何以错误的方式工作?

指向mstest.exe和所有其他引用的可执行文件和文件的路径基于运行GitLab runner的计算机

你的机器或其他人的机器上有什么并不重要;只有构建服务器才重要,因此相应地编写gitlab.yml

net yml文件示例
    ##variables:
## increase indentation carefully, one space per cascade level.
## THIS IS YAML. NEVER USE TABS.
stages:
   - build
   - deploy

 #BUILD
# Builds all working branches
working:
  stage: build
  except:
   - master
  script:
   - echo "Build Stage"
   - echo "Restoring NuGet Packages..."
   - '"c:\nuget\nuget.exe" restore "SOLUTION PATH"'
   # - '"c:\nuget\nuget.exe" restore "ANOTHER ABSOLUTE PATH TO YOUR SOLUTION"'
   - ''
   - echo "Building Solutions..."
   - C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Release /verbosity:quiet "SOLUTION PATH"

# Builds all stable/master pushes
stable:
  stage: build
  only:
   - master
  script:
   - echo "Build Stage"
   - echo "Restoring NuGet Packages..."
   - '"c:\nuget\nuget.exe" restore "SOLUTION PATH"'
   # - '"c:\nuget\nuget.exe" restore "ANOTHER ABSOLUTE PATH TO YOUR SOLUTION"'
   - ''
   - echo "Building Solutions..."
   - C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Release /verbosity:quiet "SOLUTION PATH"

 
 
 
 #DEPLOY
 
  stage: deploy
  only: 
    - dev
  script:
   - echo "Deploy Stage"
#SEND TO YOUR DEV SERVER
  
  
  ## deploy latest master to the correct servers
  stage: deploy
   
  script:
  - echo "Deploy Stage"
  only: 
   - master
 #SEND TO YOUR PRODUCTION SERVER
 
  tags:
   - .NET
  #put tags here you put on your runners so you can hit the right runners when you push your code.

    

在runner中运行时,在哪里可以找到解决方案路径?解决方案路径是您正在构建的解决方案的路径。您可以相对于gitlab-ci.yml编写它。这是您想要构建的解决方案的路径。如果您想稍后参考它,您应该查看预定义的gitlab环境变量。您有任何部署示例吗?使用Xcopy或Robocopy根据需要移动您的文件。如果您使用的是严格意义上的windows计算机,则可能会遇到共享冲突。这是因为gitlab runner服务需要绑定到用户帐户才能跨网络复制作业。