Deploy and start a windows service on remote machine using Gitlab pipeline

Viewed 344

I started using Gitlab CI/CD and it is my yml file:

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\

Now I need to deploy a Windows Service(WinService.csproj in my solution) on a remote machine, How can I do it in my yml file?

0 Answers
Related