2017-11-15 10 views
1

私はgitlab-ciでciを設定しようとしています。私はそれについていくつか質問があります。dotnetはダミーのためにgitlab-ciで公開する

  1. gitlab-ciにロールバックメカニズムがないようです。デプロイメントステージが失敗した場合、ロールバックを気にする必要がありますか?
  2. "dotnet publish Solution.sln -c release"スクリプトを使用する予定です。しかし、このソリューションでは複数のプロジェクトがあります。 1つのclasslibと2つのapiを持っています。 (AdminApiやUserApiなど)。そして、これら2つのapiはIISの異なるサイトをホストしています。この場合、どのようにparamsでdotnet publishスクリプトを設定できますか?
  3. iisフォルダにパブリッシュ出力を移動するためにxcopyのようなものを使用する必要がありますか?

答えて

2

私は、iisの各ウェブサイトにapp_offile.htm_を「We'll back soon message」とhtmlで入れました。

そして私はこのgitlab-ci.yml

stages: - build - test - deploy build: stage: build script: - echo "Building the app" - "dotnet publish MySolution.sln -c release" artifacts: untracked: true only: - dev test: stage: test script: echo "Running tests" artifacts: untracked: true dependencies: - build only: - dev deploy_staging: stage: deploy script: - echo "Deployintg to staging server Admin" - ren c:\\inetpub\\vhosts\\xxx\\admin\\app_offline.htm_ app_offline.htm - dotnet publish PathToAdmin.csproj -c release -o c:\\inetpub\\vhosts\\xxx\\admin - ren c:\\inetpub\\vhosts\\xxx\\admin\\app_offline.htm app_offline.htm_ - echo "Deployintg to staging server User" - ren c:\\inetpub\\vhosts\\xxx\\user\\app_offline.htm_ app_offline.htm - dotnet publish PathToUser.csproj -c release -o c:\\inetpub\\vhosts\\xxx\\user - ren c:\\inetpub\\vhosts\\xxx\\user\\app_offline.htm app_offline.htm_ dependencies: - build only: - dev

と私の問題を解決してきました
関連する問題