使用 Gitlab 管道在远程机器上部署和启动 Windows 服务

时间:2021-06-01 04:20:14

标签: gitlab yaml windows-services gitlab-ci continuous-deployment

我开始使用 Gitlab CI/CD,它是我的 yml 文件:

variables:
 EXE_LOCAL_TEMP_FOLDER: 'c:\TMP'
 DEPLOY_FOLDER: 'c:\MyProject_Release'

stages:
- build
- deploy

build:
   stage: build
   script:
    - nuget restore
    - msbuild MySolution.sln /t:Build  /p:Configuration=Release
    - xcopy /y MyProject\bin\Release\*.* $EXE_LOCAL_TEMP_FOLDER\
deploy:
   stage: deploy
   when : manual
   script:
     - xcopy /y c:\TMP\*.* $DEPLOY_FOLDER\

现在我需要在远程机器上部署 Windows 服务(我的解决方案中的WinService.csproj),我该如何在我的 yml 文件中执行此操作?

0 个答案:

没有答案