41.压测-copy.sh 2.8 KB

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