41.StressTest-publish.sh 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. set -e
  2. #---------------------------------------------------------------------
  3. # 参数
  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. echo '41.StressTest-publish.sh #1 发布CL压测'
  11. publishPath=$basePath/Publish/release/release/StressTest
  12. mkdir -p $publishPath
  13. docker run -i --rm \
  14. --env LANG=C.UTF-8 \
  15. -v $basePath:/root/code \
  16. -v $NUGET_PATH:/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压测net6.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压测net6.0/CmServer
  28. echo 'copy bat'
  29. \cp -rf /root/code/Publish/ReleaseFile/StressTest/CL压测/. /root/code/Publish/release/release/StressTest/CL压测net6.0
  30. "
  31. #---------------------------------------------------------------------
  32. echo '41.StressTest-publish.sh #2 发布Sers压测'
  33. # for netVersion in net6.0 netcoreapp2.1
  34. for netVersion in net6.0
  35. do
  36. appPath=${basePath}/Publish/release/release/Station\(${netVersion}\)
  37. #----------------------------------------------
  38. #单体压测
  39. echo "(x.5)单体压测${netVersion}"
  40. targetPath=${publishPath}/单体压测${netVersion}
  41. mkdir -p $targetPath
  42. echo "(x.x.1)copy ServiceCenter"
  43. \cp -rf $appPath/ServiceCenter/. $targetPath/ServiceCenter
  44. echo "(x.x.2)copy demo"
  45. \cp -rf $appPath/Demo/wwwroot/. $targetPath/ServiceCenter/wwwroot
  46. \cp -rf $appPath/Demo/Did.SersLoader.Demo.dll $targetPath/ServiceCenter
  47. \cp -rf $appPath/Demo/Did.SersLoader.Demo.pdb $targetPath/ServiceCenter
  48. \cp -rf $appPath/Demo/Did.SersLoader.Demo.xml $targetPath/ServiceCenter
  49. echo "(x.x.3)copy Robot"
  50. \cp -rf $appPath/Robot/wwwroot/. $targetPath/ServiceCenter/wwwroot
  51. \cp -rf $appPath/Robot/App.Robot.Station.dll $targetPath/ServiceCenter
  52. \cp -rf $appPath/Robot/App.Robot.Station.pdb $targetPath/ServiceCenter
  53. \cp -rf $appPath/Robot/App.Robot.Station.xml $targetPath/ServiceCenter
  54. echo "(x.x.4)copy ReleaseFile"
  55. \cp -rf $basePath/Publish/ReleaseFile/StressTest/单体压测/. $targetPath
  56. #----------------------------------------------
  57. #分布式压测
  58. echo "(x.6)分布式压测${netVersion}"
  59. targetPath=${publishPath}/分布式压测${netVersion}
  60. mkdir -p $targetPath
  61. echo "(x.x.1)copy station"
  62. \cp -rf $appPath/ServiceCenter $targetPath
  63. \cp -rf $appPath/Demo $targetPath
  64. \cp -rf $appPath/Robot $targetPath
  65. echo "(x.x.2)copy ReleaseFile"
  66. \cp -rf $basePath/Publish/ReleaseFile/StressTest/分布式压测/. $targetPath
  67. done