gitlab ci 将文件路径传递给 powershell 时出现 yml 错误
gitlab ci yml error on passing file path to powershell
试图在 gitlab ci yml 中通过 powershell 调用 mstest.exe
。
当我将路径指定为 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe
时,powershell
给我一个错误提示 C:\program no such cmdlet function exists
。
当我在引号中给出路径时,出现无效的 yml 错误:
This GitLab CI configuration is invalid: (<unknown>): found unknown escape character while parsing a quoted scalar at line 26 column 17
test_job:
stage: test
variables:
MSTestPath: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe"
TestContainer: "/testcontainer: +$ProjectDLL"
TestName: "/test:+$TestName"
TestSettings: "/testsettings: +$TestSettingsPath"
script:
- echo "testing..."
- powershell '&' $MSTestPatch $TestContainer $TestName $TestSettings
only:
- master
tags:
- migration
我想在我的跑步者(这是我的 windows 机器)中使用 gitlab CI 执行我的 mstests,使用 powershell 作为 shell.
您可以使用\"C:\Program Files (x86)\Microsoft Visual Studio 14.0\"
试图在 gitlab ci yml 中通过 powershell 调用 mstest.exe
。
当我将路径指定为 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe
时,powershell
给我一个错误提示 C:\program no such cmdlet function exists
。
当我在引号中给出路径时,出现无效的 yml 错误:
This GitLab CI configuration is invalid: (<unknown>): found unknown escape character while parsing a quoted scalar at line 26 column 17
test_job:
stage: test
variables:
MSTestPath: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe"
TestContainer: "/testcontainer: +$ProjectDLL"
TestName: "/test:+$TestName"
TestSettings: "/testsettings: +$TestSettingsPath"
script:
- echo "testing..."
- powershell '&' $MSTestPatch $TestContainer $TestName $TestSettings
only:
- master
tags:
- migration
我想在我的跑步者(这是我的 windows 机器)中使用 gitlab CI 执行我的 mstests,使用 powershell 作为 shell.
您可以使用\"C:\Program Files (x86)\Microsoft Visual Studio 14.0\"