I can run the web application by using dotnet run
on the .gitlab-ci.yml
script.
stages:
- build
build:
stage: build
before_script:
- 'dotnet restore'
script:
- echo "Building the My Application"
- "dotnet publish Eitms.Decoder.sln -c release"
- "cd C:\\MyFolderContaints\\Eitms.Decoder.Backend"
- "dotnet run"
only:
- release
But how I can publish into the IIS? anyone can show the step?
Thanks
After view the script from HERE, still not success yet. Did I do something wrong here?
stages:
- build
- deploy
build:
stage: build
before_script:
- 'dotnet restore'
script:
- echo "Building the app"
- "dotnet publish Eitms.Decoder.sln -c release"
artifacts:
untracked: true
only:
- release
deploy_staging:
stage: deploy
script:
- echo "Deploy to IIS"
- "dotnet publish Eitms.Decoder.Backend\\Eitms.Decoder.Backend.csproj -c release -o C:\\Secret Path\\PRODUCTION\\Secret Project"
dependencies:
- build
only:
- release
I don't know is it still actual or not and also i never used GitLab CI but looking on provided scripts i think you need just to copy (using CMD commands like xcopy) files into IIS folder after publish like when you want to do same using CMD .bat file
Steps
e.g (just for example)
dotnet publish "Eitms.Decoder.Backend\\Eitms.Decoder.Backend.csproj" -c release -o "C:\\Secret Path\\PRODUCTION\\Secret Project"
appcmd stop apppool /apppool.name:"Secret Project APP POOL"
xcopy "C:\\Secret Path\\PRODUCTION\\Secret Project" "C:\\inetpub\\wwwroot\\Secret Project" /s /e
appcmd start apppool /apppool.name:"Secret Project APP POOL"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With