build-bash__41.extra-publish.sh 3.0 KB

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