41.StressTest-publish.sh 2.9 KB

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