需要帮助为GitLab CI设置脚本

时间:2016-11-21 10:00:13

标签: continuous-integration gitlab gitlab-ci

我正在尝试为GitLab CI设置脚本,如下所示:

variables:
  PROJECT_NAME: "Camps"
before_script:
  - echo "starting build for %PROJECT_NAME%"
  - echo "Restoring NuGet Packages..."
  - D:\Camps\nuget.exe restore "%PROJECT_NAME%.sln"
stages:
  - build
  - test
build:
  stage: build
  script:
  - echo "Release build..."
  - '"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Release /verbosity:quiet "%PROJECT_NAME%.sln"'
  artifacts:
    untracked: true
test:
  stage: test
  script:
  - echo "starting tests"
  - cd %PROJECT_NAME%Tests/bin/Release
  - '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe" /testcontainer:%PROJECT_NAME%Tests.dll'
  dependencies:
  - build

但是在改变之后我总是收到这个错误:

Cloning into '/builds/andreyshedko/camps'...
Checking out d79fda3b as master...
/bin/bash: line 50: D:Campsnuget.exe: command not found
$ echo "starting build for %PROJECT_NAME%"
starting build for %PROJECT_NAME%
$ echo "Restoring NuGet Packages..."
Restoring NuGet Packages...
$ D:\Camps\nuget.exe restore "%PROJECT_NAME%.sln"
ERROR: Build failed: exit code 1

我做错了什么?我之前应该安装Runner吗?

0 个答案:

没有答案