41.StressTest-publish.sh 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. set -e
  2. #---------------------------------------------------------------------
  3. #(x.1)参数
  4. args_="
  5. export basePath=/root/temp/svn
  6. # "
  7. #---------------------------------------------------------------------
  8. #(x.2)
  9. publishPath=$basePath/Publish/release/release/StressTest
  10. mkdir -p $publishPath
  11. echo ------------------------------------------------------------------
  12. echo '(x.3)发布CL压测'
  13. docker run -i --rm \
  14. --env LANG=C.UTF-8 \
  15. -v $basePath:/root/code \
  16. -v $basePath/Publish/release/.nuget:/root/.nuget \
  17. serset/dotnet:sdk-6.0 \
  18. bash -c "
  19. set -e
  20. echo 'publish Client'
  21. cd /root/code/dotnet/Library/Sers/Sers.CL/Test/CommunicationManage/CmClient
  22. dotnet build --configuration Release
  23. dotnet publish --configuration Release --output /root/code/Publish/release/release/StressTest/CL压测net5.0/CmClient
  24. echo 'publish Server'
  25. cd /root/code/dotnet/Library/Sers/Sers.CL/Test/CommunicationManage/CmServer
  26. dotnet build --configuration Release
  27. dotnet publish --configuration Release --output /root/code/Publish/release/release/StressTest/CL压测net5.0/CmServer
  28. echo 'copy bat'
  29. \cp -rf /root/code/Publish/ReleaseFile/StressTest/CL压测/. /root/code/Publish/release/release/StressTest/CL压测net5.0
  30. "
  31. echo ------------------------------------------------------------------
  32. echo '(x.4)发布Sers压测'
  33. for netVersion in netcoreapp2.1 net5.0
  34. do
  35. appPath=${basePath}/Publish/release/release/Station\(${netVersion}\)
  36. #----------------------------------------------
  37. #单体压测
  38. echo "(x.5)单体压测${netVersion}"
  39. targetPath=${publishPath}/单体压测${netVersion}
  40. mkdir -p $targetPath
  41. echo "(x.x.1)copy ServiceCenter"
  42. \cp -rf $appPath/ServiceCenter/. $targetPath/ServiceCenter
  43. echo "(x.x.2)copy demo"
  44. \cp -rf $appPath/Demo/wwwroot/. $targetPath/ServiceCenter/wwwroot
  45. \cp -rf $appPath/Demo/Did.SersLoader.Demo.dll $targetPath/ServiceCenter
  46. \cp -rf $appPath/Demo/Did.SersLoader.Demo.pdb $targetPath/ServiceCenter
  47. \cp -rf $appPath/Demo/Did.SersLoader.Demo.xml $targetPath/ServiceCenter
  48. echo "(x.x.3)copy Robot"
  49. \cp -rf $appPath/Robot/wwwroot/. $targetPath/ServiceCenter/wwwroot
  50. \cp -rf $appPath/Robot/App.Robot.Station.dll $targetPath/ServiceCenter
  51. \cp -rf $appPath/Robot/App.Robot.Station.pdb $targetPath/ServiceCenter
  52. \cp -rf $appPath/Robot/App.Robot.Station.xml $targetPath/ServiceCenter
  53. echo "(x.x.4)copy ReleaseFile"
  54. \cp -rf $basePath/Publish/ReleaseFile/StressTest/单体压测/. $targetPath
  55. #----------------------------------------------
  56. #分布式压测
  57. echo "(x.6)分布式压测${netVersion}"
  58. targetPath=${publishPath}/分布式压测${netVersion}
  59. mkdir -p $targetPath
  60. echo "(x.x.1)copy station"
  61. \cp -rf $appPath/ServiceCenter $targetPath
  62. \cp -rf $appPath/Demo $targetPath
  63. \cp -rf $appPath/Robot $targetPath
  64. echo "(x.x.2)copy ReleaseFile"
  65. \cp -rf $basePath/Publish/ReleaseFile/StressTest/分布式压测/. $targetPath
  66. done