passenger 5.2.3 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +13 -0
  3. data/CONTRIBUTORS +5 -1
  4. data/build/agent.rb +22 -2
  5. data/build/cxx_tests.rb +41 -5
  6. data/build/misc.rb +4 -1
  7. data/build/support/cxx_dependency_map.rb +1746 -908
  8. data/build/support/vendor/cxx_hinted_parser/CxxHintedParser.sublime-project +8 -0
  9. data/build/support/vendor/cxx_hinted_parser/Gemfile +5 -0
  10. data/build/support/vendor/cxx_hinted_parser/Gemfile.lock +30 -0
  11. data/{src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core → build/support/vendor/cxx_hinted_parser}/LICENSE.md +1 -1
  12. data/build/support/vendor/cxx_hinted_parser/README.md +95 -0
  13. data/build/support/vendor/cxx_hinted_parser/Rakefile +4 -0
  14. data/{src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/initialize.rb → build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser.rb} +2 -9
  15. data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +239 -0
  16. data/dev/ci/README.md +15 -2
  17. data/dev/ci/lib/set-container-envvars.sh +6 -0
  18. data/dev/ci/lib/setup-container.sh +4 -1
  19. data/dev/ci/scripts/debug-console-wrapper.sh +3 -1
  20. data/dev/ci/setup-host +5 -0
  21. data/dev/ci/tests/binaries/Jenkinsfile +105 -0
  22. data/dev/ci/tests/binaries/build-linux +38 -0
  23. data/dev/ci/tests/binaries/build-macos +40 -0
  24. data/dev/ci/tests/binaries/prepare-macos +38 -0
  25. data/dev/ci/tests/binaries/test-linux +45 -0
  26. data/dev/ci/tests/binaries/test-macos +38 -0
  27. data/dev/ci/tests/debian/Jenkinsfile +2 -2
  28. data/dev/ci/tests/rpm/Jenkinsfile +1 -1
  29. data/dev/configkit-schemas/index.json +3 -24
  30. data/dev/vagrant/nginx_rakefile +0 -1
  31. data/package.json +15 -5
  32. data/resources/templates/error_renderer/.editorconfig +19 -0
  33. data/resources/templates/error_renderer/with_details/README.md +9 -0
  34. data/resources/templates/error_renderer/with_details/dist/bundle.js +33 -0
  35. data/resources/templates/error_renderer/with_details/dist/styles.css +17 -0
  36. data/resources/templates/error_renderer/with_details/src/DetailsView.jsx +52 -0
  37. data/resources/templates/error_renderer/with_details/src/GetHelpView.jsx +61 -0
  38. data/resources/templates/error_renderer/with_details/src/JourneyView.css +50 -0
  39. data/resources/templates/error_renderer/with_details/src/JourneyView.jsx +621 -0
  40. data/resources/templates/error_renderer/with_details/src/PageMain.css +114 -0
  41. data/resources/templates/error_renderer/with_details/src/PageMain.jsx +136 -0
  42. data/resources/templates/error_renderer/with_details/src/ProblemDescriptionView.jsx +14 -0
  43. data/resources/templates/error_renderer/with_details/src/ProcessDetailsView.jsx +56 -0
  44. data/resources/templates/error_renderer/with_details/src/SolutionDescriptionView.css +5 -0
  45. data/resources/templates/error_renderer/with_details/src/SolutionDescriptionView.jsx +15 -0
  46. data/resources/templates/error_renderer/with_details/src/SummaryView.jsx +35 -0
  47. data/resources/templates/error_renderer/with_details/src/SystemComponentView.css +34 -0
  48. data/resources/templates/error_renderer/with_details/src/SystemComponentView.jsx +168 -0
  49. data/resources/templates/error_renderer/with_details/src/SystemComponentsView.css +13 -0
  50. data/resources/templates/error_renderer/with_details/src/SystemComponentsView.jsx +116 -0
  51. data/resources/templates/error_renderer/with_details/src/Tab.jsx +12 -0
  52. data/resources/templates/error_renderer/with_details/src/Tabs.jsx +104 -0
  53. data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.css +3446 -0
  54. data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.js +293 -0
  55. data/resources/templates/error_renderer/with_details/src/bootstrap/config.json +401 -0
  56. data/resources/templates/error_renderer/with_details/src/index.html.template +22 -0
  57. data/resources/templates/error_renderer/with_details/src/index.jsx +23 -0
  58. data/resources/templates/error_renderer/with_details/webpack.config.js +47 -0
  59. data/resources/templates/error_renderer/without_details/dist/bundle.js +1 -0
  60. data/resources/templates/error_renderer/without_details/dist/styles.css +1 -0
  61. data/resources/templates/{undisclosed_error.html.template → error_renderer/without_details/src/index.html.template} +7 -11
  62. data/resources/templates/error_renderer/without_details/src/index.js +1 -0
  63. data/resources/templates/{error_layout.css → error_renderer/without_details/src/main.css} +5 -2
  64. data/resources/templates/error_renderer/without_details/webpack.config.js +42 -0
  65. data/src/agent/AgentMain.cpp +3 -3
  66. data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +13 -0
  67. data/src/agent/Core/ApplicationPool/Common.h +3 -4
  68. data/src/agent/Core/ApplicationPool/Context.h +27 -17
  69. data/src/agent/Core/ApplicationPool/Group.h +3 -1
  70. data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +2 -12
  71. data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +55 -10
  72. data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +1 -1
  73. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
  74. data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +13 -6
  75. data/src/agent/Core/ApplicationPool/Implementation.cpp +16 -100
  76. data/src/agent/Core/ApplicationPool/Options.h +8 -65
  77. data/src/agent/Core/ApplicationPool/Pool.h +4 -21
  78. data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +1 -60
  79. data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +10 -13
  80. data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +3 -8
  81. data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +2 -34
  82. data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
  83. data/src/agent/Core/ApplicationPool/Process.cpp +17 -12
  84. data/src/agent/Core/ApplicationPool/Process.h +146 -93
  85. data/src/agent/Core/ApplicationPool/Session.h +2 -2
  86. data/src/agent/Core/ApplicationPool/Socket.h +28 -27
  87. data/src/agent/Core/Config.h +1 -3
  88. data/src/agent/Core/ConfigChange.cpp +2 -4
  89. data/src/agent/Core/Controller.h +2 -8
  90. data/src/agent/Core/Controller/BufferBody.cpp +0 -2
  91. data/src/agent/Core/Controller/CheckoutSession.cpp +12 -24
  92. data/src/agent/Core/Controller/Config.h +1 -9
  93. data/src/agent/Core/Controller/ForwardResponse.cpp +0 -34
  94. data/src/agent/Core/Controller/Hooks.cpp +0 -7
  95. data/src/agent/Core/Controller/InitRequest.cpp +0 -43
  96. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +0 -4
  97. data/src/agent/Core/Controller/Request.h +1 -35
  98. data/src/agent/Core/Controller/SendRequest.cpp +0 -32
  99. data/src/agent/Core/CoreMain.cpp +19 -32
  100. data/src/agent/Core/SpawningKit/Config.h +329 -55
  101. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +369 -0
  102. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h.cxxcodebuilder +307 -0
  103. data/src/agent/Core/SpawningKit/Context.h +211 -0
  104. data/src/agent/Core/SpawningKit/DirectSpawner.h +112 -122
  105. data/src/agent/Core/SpawningKit/DummySpawner.h +59 -20
  106. data/src/agent/Core/SpawningKit/ErrorRenderer.h +117 -0
  107. data/src/agent/Core/SpawningKit/Exceptions.h +1157 -0
  108. data/src/agent/Core/SpawningKit/Factory.h +24 -17
  109. data/src/agent/Core/SpawningKit/{BackgroundIOCapturer.h → Handshake/BackgroundIOCapturer.h} +48 -18
  110. data/src/agent/Core/SpawningKit/Handshake/Perform.h +1650 -0
  111. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +582 -0
  112. data/src/agent/Core/SpawningKit/Handshake/Session.h +91 -0
  113. data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +100 -0
  114. data/src/agent/Core/SpawningKit/Journey.h +561 -0
  115. data/src/agent/Core/SpawningKit/PipeWatcher.h +41 -18
  116. data/src/agent/Core/SpawningKit/README.md +534 -0
  117. data/src/agent/Core/SpawningKit/Result.h +182 -7
  118. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +69 -0
  119. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h.cxxcodebuilder +110 -0
  120. data/src/agent/Core/SpawningKit/SmartSpawner.h +1027 -562
  121. data/src/agent/Core/SpawningKit/Spawner.h +70 -1134
  122. data/src/agent/Core/SpawningKit/UserSwitchingRules.h +3 -33
  123. data/src/agent/README.md +2 -3
  124. data/src/agent/Shared/ApiServerUtils.h +2 -3
  125. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +932 -0
  126. data/src/agent/Watchdog/Config.h +1 -3
  127. data/src/agent/Watchdog/WatchdogMain.cpp +2 -1
  128. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -0
  129. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +5 -0
  130. data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +22 -13
  131. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +5 -0
  132. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +3 -0
  133. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +13 -0
  134. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
  135. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +13 -0
  136. data/src/cxx_supportlib/Constants.h +3 -1
  137. data/src/cxx_supportlib/Exceptions.h +0 -121
  138. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +7 -6
  139. data/src/cxx_supportlib/LoggingKit/Logging.h +3 -1
  140. data/src/cxx_supportlib/Utils.cpp +42 -0
  141. data/src/cxx_supportlib/Utils.h +7 -0
  142. data/src/cxx_supportlib/Utils/IOUtils.cpp +58 -0
  143. data/src/cxx_supportlib/Utils/IOUtils.h +13 -0
  144. data/src/cxx_supportlib/Utils/JsonUtils.h +130 -23
  145. data/src/cxx_supportlib/Utils/ScopeGuard.h +9 -4
  146. data/src/cxx_supportlib/Utils/StrIntUtils.cpp +7 -0
  147. data/src/cxx_supportlib/Utils/StrIntUtils.h +1 -0
  148. data/src/cxx_supportlib/Utils/SystemTime.h +1 -1
  149. data/src/cxx_supportlib/Utils/Timer.h +1 -1
  150. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +6 -4
  151. data/src/cxx_supportlib/vendor-copy/adhoc_lve.h +1 -0
  152. data/src/helper-scripts/node-loader.js +54 -59
  153. data/src/helper-scripts/rack-loader.rb +63 -60
  154. data/src/helper-scripts/rack-preloader.rb +125 -72
  155. data/src/helper-scripts/wsgi-loader.py +100 -43
  156. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +120 -112
  157. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +15 -8
  158. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +142 -142
  159. data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +26 -15
  160. data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +3 -0
  161. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +76 -70
  162. data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +114 -99
  163. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +170 -156
  164. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +38 -35
  165. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +5 -1
  166. data/src/ruby_supportlib/phusion_passenger.rb +5 -5
  167. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +14 -1
  168. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +8 -0
  169. data/src/ruby_supportlib/phusion_passenger/common_library.rb +0 -3
  170. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +0 -1
  171. data/src/ruby_supportlib/phusion_passenger/constants.rb +2 -0
  172. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +646 -238
  173. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +117 -95
  174. data/src/ruby_supportlib/phusion_passenger/packaging.rb +0 -1
  175. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +5 -1
  176. data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +92 -69
  177. data/src/ruby_supportlib/phusion_passenger/public_api.rb +0 -17
  178. data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +0 -3
  179. data/src/ruby_supportlib/phusion_passenger/request_handler.rb +4 -5
  180. data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +0 -22
  181. metadata +64 -67
  182. data/resources/templates/error_layout.html.template +0 -86
  183. data/resources/templates/general_error.html.template +0 -1
  184. data/resources/templates/general_error_with_html.html.template +0 -1
  185. data/src/agent/Core/ApplicationPool/ErrorRenderer.h +0 -131
  186. data/src/agent/Core/SpawningKit/Options.h +0 -41
  187. data/src/agent/Core/UnionStation/Connection.h +0 -173
  188. data/src/agent/Core/UnionStation/Context.h +0 -536
  189. data/src/agent/Core/UnionStation/StopwatchLog.h +0 -147
  190. data/src/agent/Core/UnionStation/Transaction.h +0 -249
  191. data/src/agent/SpawnPreparer/SpawnPreparerMain.cpp +0 -208
  192. data/src/cxx_supportlib/UnionStationFilterSupport.cpp +0 -67
  193. data/src/cxx_supportlib/UnionStationFilterSupport.h +0 -1622
  194. data/src/nodejs_supportlib/phusion_passenger/log_express.js +0 -106
  195. data/src/nodejs_supportlib/phusion_passenger/log_mongodb.js +0 -202
  196. data/src/nodejs_supportlib/phusion_passenger/ustreporter.js +0 -227
  197. data/src/nodejs_supportlib/phusion_passenger/ustrouter_connector.js +0 -448
  198. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/CONFIG.md +0 -37
  199. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Gemfile +0 -17
  200. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Gemfile.lock +0 -59
  201. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/README-API.md +0 -5
  202. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/README.md +0 -117
  203. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Rakefile +0 -115
  204. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb +0 -423
  205. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/api.rb +0 -238
  206. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/connection.rb +0 -67
  207. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/context.rb +0 -281
  208. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/lock.rb +0 -62
  209. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/log.rb +0 -66
  210. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/message_channel.rb +0 -157
  211. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter.rb +0 -150
  212. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/basics.rb +0 -199
  213. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/controllers.rb +0 -187
  214. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/misc.rb +0 -303
  215. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/view_rendering.rb +0 -91
  216. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/simple_json.rb +0 -396
  217. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/spec_helper.rb +0 -279
  218. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/time_point.rb +0 -39
  219. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/transaction.rb +0 -173
  220. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/utils.rb +0 -177
  221. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version.rb +0 -32
  222. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version_data.rb +0 -44
  223. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.example +0 -16
  224. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis +0 -20
  225. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis-with-sudo +0 -18
  226. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/union_station_hooks_core.gemspec +0 -23
  227. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile +0 -14
  228. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile.lock +0 -45
  229. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/LICENSE.md +0 -19
  230. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/README.md +0 -104
  231. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Rakefile +0 -160
  232. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails.rb +0 -200
  233. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/action_controller_extension.rb +0 -45
  234. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/action_view_subscriber.rb +0 -55
  235. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_record_subscriber.rb +0 -41
  236. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_support_benchmarkable_extension.rb +0 -47
  237. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_support_cache_subscriber.rb +0 -79
  238. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/exception_logger.rb +0 -57
  239. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version.rb +0 -32
  240. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version_data.rb +0 -44
  241. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/union_station_hooks_rails.gemspec +0 -34
@@ -13,6 +13,7 @@ export CCACHE_COMPRESS=1
13
13
  export CCACHE_COMPRESSLEVEL=3
14
14
  export CCACHE_BASEDIR="$PASSENGER_ROOT"
15
15
  export CCACHE_SLOPPINESS=time_macros
16
+ export CCACHE_LOGFILE="$(pwd)/buildout/testlogs/ccache.log"
16
17
  # We want Bundler invocations to be explicit. For example,
17
18
  # when running 'rake test:install_deps', we do not want
18
19
  # to invoke Bundler there because the goal might be to
@@ -20,6 +21,11 @@ export CCACHE_SLOPPINESS=time_macros
20
21
  # which we may not have yet.
21
22
  export NOEXEC_DISABLE=1
22
23
 
24
+ if [[ "$EXECUTOR_NUMBER" != "" ]]; then
25
+ (( TEST_PORT_BASE=64000+EXECUTOR_NUMBER*10 ))
26
+ export TEST_PORT_BASE
27
+ fi
28
+
23
29
  if [[ "$OS" = macos ]]; then
24
30
  # Ensure that Homebrew tools can be found
25
31
  export PATH=$PATH:/usr/local/bin
@@ -30,7 +30,10 @@ run chmod g+x,o+x "$HOME"
30
30
  echo
31
31
 
32
32
  header2 "Removing previous build products"
33
- run rm -rf buildout
33
+ run rm -rf buildout/*
34
+ run mkdir buildout/testlogs
35
+ run rm -f test/test.log
36
+ run rm -rf /tmp/psg-test-* /tmp/passenger-error-*.html
34
37
  echo
35
38
 
36
39
  # shellcheck source=../lib/set-container-envvars.sh
@@ -12,8 +12,10 @@ if ! "$@"; then
12
12
  echo "-----------------------------"
13
13
  echo
14
14
  echo "*** An error occurred ***"
15
+
15
16
  if [[ "$DEBUG_CONSOLE" == 1 ]]; then
16
- echo "DEBUG_CONSOLE set to 1, so launching a debugging console..."
17
+ echo
18
+ echo "*** DEBUG_CONSOLE set to 1, so launching a debugging console..."
17
19
  echo
18
20
  # shellcheck source=../lib/set-container-envvars.sh
19
21
  set +e
@@ -44,6 +44,11 @@ run mkdir -p "$CACHE_DIR/ccache"
44
44
  run mkdir -p "$CACHE_DIR/yarn"
45
45
  echo
46
46
 
47
+ # Directory must exist so that Jenkinsfile can run archiveArtefacts().
48
+ header2 "Creating buildout directory"
49
+ run mkdir -p buildout buildout/testlogs
50
+ echo
51
+
47
52
  if [[ "$OS" = macos ]]; then
48
53
  export CI_COMMAND="./dev/ci/setup-host $*"
49
54
  exec "$PASSENGER_ROOT/dev/ci/scripts/debug-console-wrapper.sh" \
@@ -0,0 +1,105 @@
1
+ JOB_NAME_AS_ID = null
2
+
3
+ def setupLinuxTest(enablerFlag, architecture, block) {
4
+ if (enablerFlag) {
5
+ node('linux') {
6
+ withEnv([
7
+ "OUTPUT_DIR=${env.WORKSPACE}/output-linux-${architecture}",
8
+ "CACHE_DIR=${env.JENKINS_HOME}/cache/${env.JOB_NAME_AS_ID}/linux-${architecture}/executor-${env.EXECUTOR_NUMBER}",
9
+ "ARCHITECTURE=${architecture}"
10
+ ], block)
11
+ }
12
+ } else {
13
+ echo 'Test skipped.'
14
+ }
15
+ }
16
+
17
+ def setupMacosTest(enablerFlag, block) {
18
+ if (enablerFlag) {
19
+ node('macos') {
20
+ withEnv([
21
+ "OUTPUT_DIR=${env.WORKSPACE}/output-macos",
22
+ "CACHE_DIR=${env.JENKINS_HOME}/cache/${env.JOB_NAME_AS_ID}/macos/executor-${env.EXECUTOR_NUMBER}",
23
+ "RUNTIME_DIR=${env.JENKINS_HOME}/cache/${env.JOB_NAME_AS_ID}/macos/executor-${env.EXECUTOR_NUMBER}/runtime"
24
+ ], block)
25
+ }
26
+ } else {
27
+ echo 'Test skipped.'
28
+ }
29
+ }
30
+
31
+ pipeline {
32
+ agent { node { label 'master-pipeline' } }
33
+
34
+ options {
35
+ buildDiscarder(logRotator(numToKeepStr: '10'))
36
+ timeout(time: 45, unit: 'MINUTES')
37
+ disableConcurrentBuilds()
38
+ timestamps()
39
+ ansiColor('xterm')
40
+ }
41
+
42
+ parameters {
43
+ booleanParam(name: 'LINUX_X86', defaultValue: true, description: 'Linux x86 binaries')
44
+ booleanParam(name: 'LINUX_X86_64', defaultValue: true, description: 'Linux x86_64 binaries')
45
+ booleanParam(name: 'MACOS', defaultValue: true, description: 'macOS binaries')
46
+ }
47
+
48
+ stages {
49
+ stage('Initialize') {
50
+ steps {
51
+ script {
52
+ // The syntaxes 'env.FOO = FOO = ...' and 'FOO = env.FOO = ...'
53
+ // do not work for some reason; one of them will become null.
54
+ // So we split the assignments in two separate statements.
55
+
56
+ env.JOB_NAME_AS_ID = env.JOB_NAME.replace(' ', '-')
57
+ JOB_NAME_AS_ID = env.JOB_NAME_AS_ID
58
+
59
+ if (env.JOB_NAME.indexOf('Enterprise') != -1) {
60
+ env.ENTERPRISE = '1'
61
+ } else {
62
+ env.ENTERPRISE = '0'
63
+ }
64
+
65
+ // For debugging purposes
66
+ sh 'env | sort'
67
+ }
68
+ }
69
+ }
70
+
71
+ stage('Build') {
72
+ steps {
73
+ script {
74
+ parallel(
75
+ 'Linux x86': {
76
+ setupLinuxTest(params.LINUX_X86, 'x86') {
77
+ checkout scm
78
+ sh './dev/ci/tests/binaries/build-linux'
79
+ archiveArtifacts artifacts: 'output-linux-x86/**/*'
80
+ sh './dev/ci/tests/binaries/test-linux'
81
+ }
82
+ },
83
+ 'Linux x86_64': {
84
+ setupLinuxTest(params.LINUX_X86_64, 'x86_64') {
85
+ checkout scm
86
+ sh './dev/ci/tests/binaries/build-linux'
87
+ archiveArtifacts artifacts: 'output-linux-x86_64/**/*'
88
+ sh './dev/ci/tests/binaries/test-linux'
89
+ }
90
+ },
91
+ 'macOS': {
92
+ setupMacosTest(params.MACOS) {
93
+ checkout scm
94
+ sh './dev/ci/tests/binaries/prepare-macos'
95
+ sh './dev/ci/tests/binaries/build-macos'
96
+ archiveArtifacts artifacts: 'output-macos/**/*'
97
+ sh './dev/ci/tests/binaries/test-macos'
98
+ }
99
+ }
100
+ )
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env bash
2
+ # This script is from the "Passenger binaries test" Jenkins job. It builds
3
+ # generic Linux binaries for a specific architecture.
4
+ #
5
+ # Required environment variables:
6
+ #
7
+ # WORKSPACE
8
+ # ARCHITECTURE
9
+ #
10
+ # Optional environment variables:
11
+ #
12
+ # PASSENGER_ROOT (defaults to $WORKSPACE)
13
+ # OUTPUT_DIR (defaults to $WORKSPACE/output)
14
+ # CACHE_DIR (defaults to $WORKSPACE/cache)
15
+
16
+ set -e
17
+ SELFDIR=$(dirname "$0")
18
+ cd "$SELFDIR/../../../../packaging/binaries"
19
+ # shellcheck source=../../../../packaging/binaries/shared/lib/library.sh
20
+ source "./shared/lib/library.sh"
21
+
22
+ require_envvar WORKSPACE "$WORKSPACE"
23
+ require_envvar ARCHITECTURE "$ARCHITECTURE"
24
+
25
+ PASSENGER_ROOT="${PASSENGER_ROOT:-$WORKSPACE}"
26
+ OUTPUT_DIR="${OUTPUT_DIR:-$WORKSPACE/output}"
27
+ CACHE_DIR="${CACHE_DIR:-$WORKSPACE/cache}"
28
+
29
+ run mkdir -p "$OUTPUT_DIR"
30
+ run mkdir -p "$CACHE_DIR"
31
+
32
+ run ./linux/build \
33
+ -p "$PASSENGER_ROOT" \
34
+ -c "$CACHE_DIR" \
35
+ -o "$OUTPUT_DIR" \
36
+ -a "$ARCHITECTURE" \
37
+ -j 1 \
38
+ passenger nginx
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bash
2
+ # This script is from the "Passenger binaries test" Jenkins job. It builds
3
+ # generic macOS binaries.
4
+ #
5
+ # Required environment variables:
6
+ #
7
+ # WORKSPACE
8
+ #
9
+ # Optional environment variables:
10
+ #
11
+ # PASSENGER_ROOT (defaults to $WORKSPACE)
12
+ # OUTPUT_DIR (defaults to $WORKSPACE/output)
13
+ # CACHE_DIR (defaults to $WORKSPACE/cache)
14
+ # RUNTIME_DIR (defaults to $CACHE_DIR/runtime)
15
+
16
+ set -e
17
+ SELFDIR=$(dirname "$0")
18
+ cd "$SELFDIR/../../../../packaging/binaries"
19
+ # shellcheck source=../../../../packaging/binaries/shared/lib/library.sh
20
+ source "./shared/lib/library.sh"
21
+
22
+ require_envvar WORKSPACE "$WORKSPACE"
23
+
24
+ PASSENGER_ROOT="${PASSENGER_ROOT:-$WORKSPACE}"
25
+ OUTPUT_DIR="${OUTPUT_DIR:-$WORKSPACE/output}"
26
+ CACHE_DIR="${CACHE_DIR:-$WORKSPACE/cache}"
27
+ RUNTIME_DIR="${RUNTIME_DIR:-$CACHE_DIR/runtime}"
28
+
29
+ RUNTIME_VERSION=$(cat shared/definitions/macos_runtime_version)
30
+
31
+ run mkdir -p "$OUTPUT_DIR"
32
+ run mkdir -p "$CACHE_DIR"
33
+
34
+ run ./macos/build \
35
+ -p "$PASSENGER_ROOT" \
36
+ -r "$RUNTIME_DIR/$RUNTIME_VERSION" \
37
+ -c "$CACHE_DIR" \
38
+ -o "$OUTPUT_DIR" \
39
+ -j 1 \
40
+ passenger nginx
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env bash
2
+ # This script is from the "Passenger binaries test" Jenkins job. It set ups
3
+ # a runtime directory for the "build-macos" script.
4
+ #
5
+ # Required environment variables:
6
+ #
7
+ # WORKSPACE
8
+ #
9
+ # Optional environment variables:
10
+ #
11
+ # PASSENGER_ROOT (defaults to $WORKSPACE)
12
+ # OUTPUT_DIR (defaults to $WORKSPACE/output)
13
+ # CACHE_DIR (defaults to $WORKSPACE/cache)
14
+ # RUNTIME_DIR (defaults to $CACHE_DIR/runtime)
15
+
16
+ set -e
17
+ SELFDIR=$(dirname "$0")
18
+ cd "$SELFDIR/../../../../packaging/binaries"
19
+ # shellcheck source=../../../../packaging/binaries/shared/lib/library.sh
20
+ source "./shared/lib/library.sh"
21
+
22
+ require_envvar WORKSPACE "$WORKSPACE"
23
+
24
+ PASSENGER_ROOT="${PASSENGER_ROOT:-$WORKSPACE}"
25
+ OUTPUT_DIR="${OUTPUT_DIR:-$WORKSPACE/output}"
26
+ CACHE_DIR="${CACHE_DIR:-$WORKSPACE/cache}"
27
+ RUNTIME_DIR="${RUNTIME_DIR:-$CACHE_DIR/runtime}"
28
+
29
+ RUNTIME_VERSION=$(cat shared/definitions/macos_runtime_version)
30
+
31
+ run mkdir -p "$OUTPUT_DIR"
32
+ run mkdir -p "$CACHE_DIR"
33
+ run mkdir -p "$RUNTIME_DIR/$RUNTIME_VERSION"
34
+
35
+ run ./macos/setup-runtime \
36
+ -c "$CACHE_DIR" \
37
+ -o "$RUNTIME_DIR/$RUNTIME_VERSION" \
38
+ -j 1
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env bash
2
+ # This script is from the "Passenger binaries test" Jenkins job. It runs
3
+ # runs tests on the binaries generated by the "build-linux" script.
4
+ #
5
+ # Required environment variables:
6
+ #
7
+ # WORKSPACE
8
+ # ARCHITECTURE
9
+ #
10
+ # Optional environment variables:
11
+ #
12
+ # PASSENGER_ROOT (defaults to $WORKSPACE)
13
+ # OUTPUT_DIR (defaults to $WORKSPACE/output)
14
+ # ENTERPRISE
15
+
16
+ set -e
17
+ SELFDIR=$(dirname "$0")
18
+ cd "$SELFDIR/../../../../packaging/binaries"
19
+ # shellcheck source=../../../../packaging/binaries/shared/lib/library.sh
20
+ source "./shared/lib/library.sh"
21
+
22
+ require_envvar WORKSPACE "$WORKSPACE"
23
+ require_envvar ARCHITECTURE "$ARCHITECTURE"
24
+
25
+ PASSENGER_ROOT="${PASSENGER_ROOT:-$WORKSPACE}"
26
+ OUTPUT_DIR="${OUTPUT_DIR:-$WORKSPACE/output}"
27
+
28
+ EXTRA_TEST_PARAMS=()
29
+ if [[ "$ENTERPRISE" = 1 ]]; then
30
+ EXTRA_TEST_PARAMS=(-L /etc/passenger-enterprise-license)
31
+ fi
32
+
33
+ run mkdir -p "$OUTPUT_DIR"
34
+ run mkdir -p "$CACHE_DIR"
35
+
36
+ run ./linux/package \
37
+ -i "$OUTPUT_DIR" \
38
+ -o "$OUTPUT_DIR" \
39
+ -a "$ARCHITECTURE"
40
+ run ./linux/test \
41
+ -p "$PASSENGER_ROOT" \
42
+ -i "$OUTPUT_DIR" \
43
+ -I "$OUTPUT_DIR" \
44
+ -a "$ARCHITECTURE" \
45
+ "${EXTRA_TEST_PARAMS[@]}"
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env bash
2
+ # This script is from the "Passenger binaries test" Jenkins job. It runs
3
+ # runs tests on the binaries generated by the "build-macos" script.
4
+ #
5
+ # Required environment variables:
6
+ #
7
+ # WORKSPACE
8
+ #
9
+ # Optional environment variables:
10
+ #
11
+ # PASSENGER_ROOT (defaults to $WORKSPACE)
12
+ # OUTPUT_DIR (defaults to $WORKSPACE/output)
13
+ # RUNTIME_DIR (defaults to $WORKSPACE/cache/runtime)
14
+
15
+ set -e
16
+ SELFDIR=$(dirname "$0")
17
+ cd "$SELFDIR/../../../../packaging/binaries"
18
+ # shellcheck source=../../../../packaging/binaries/shared/lib/library.sh
19
+ source "./shared/lib/library.sh"
20
+
21
+ require_envvar WORKSPACE "$WORKSPACE"
22
+
23
+ PASSENGER_ROOT="${PASSENGER_ROOT:-$WORKSPACE}"
24
+ OUTPUT_DIR="${OUTPUT_DIR:-$WORKSPACE/output}"
25
+ RUNTIME_DIR="${RUNTIME_DIR:-$WORKSPACE/cache/runtime}"
26
+
27
+ RUNTIME_VERSION=$(cat shared/definitions/macos_runtime_version)
28
+
29
+ run mkdir -p "$OUTPUT_DIR"
30
+
31
+ run ./macos/package \
32
+ -i "$OUTPUT_DIR" \
33
+ -o "$OUTPUT_DIR"
34
+ run ./macos/test \
35
+ -p "$PASSENGER_ROOT" \
36
+ -r "$RUNTIME_DIR/$RUNTIME_VERSION" \
37
+ -i "$OUTPUT_DIR" \
38
+ -I "$OUTPUT_DIR"
@@ -27,7 +27,7 @@ def testDebianPackages(distro, params) {
27
27
  }
28
28
 
29
29
  pipeline {
30
- agent any
30
+ agent { node { label 'master-pipeline' } }
31
31
 
32
32
  options {
33
33
  buildDiscarder(logRotator(numToKeepStr: '10'))
@@ -41,8 +41,8 @@ pipeline {
41
41
  booleanParam(name: 'trusty', defaultValue: true, description: 'Test Ubuntu 14.04 packages')
42
42
  booleanParam(name: 'xenial', defaultValue: true, description: 'Test Ubuntu 16.04 packages')
43
43
  booleanParam(name: 'artful', defaultValue: true, description: 'Test Ubuntu 17.10 packages')
44
+ booleanParam(name: 'bionic', defaultValue: true, description: 'Test Ubuntu 18.04 packages')
44
45
 
45
- booleanParam(name: 'wheezy', defaultValue: true, description: 'Test Debian 7 packages')
46
46
  booleanParam(name: 'jessie', defaultValue: true, description: 'Test Debian 8 packages')
47
47
  booleanParam(name: 'stretch', defaultValue: true, description: 'Test Debian 9 packages')
48
48
  }
@@ -13,7 +13,7 @@ def setupTest(enablerFlag, distribution, architecture, block) {
13
13
  }
14
14
 
15
15
  pipeline {
16
- agent any
16
+ agent { node { label 'master-pipeline' } }
17
17
 
18
18
  options {
19
19
  buildDiscarder(logRotator(numToKeepStr: '10'))
@@ -289,7 +289,7 @@
289
289
  "type" : "unsigned integer"
290
290
  },
291
291
  "server_software" : {
292
- "default_value" : "Phusion_Passenger/5.2.3",
292
+ "default_value" : "Phusion_Passenger/5.3.0",
293
293
  "has_default_value" : "static",
294
294
  "type" : "string"
295
295
  },
@@ -324,13 +324,6 @@
324
324
  "has_default_value" : "static",
325
325
  "type" : "boolean"
326
326
  },
327
- "ust_router_address" : {
328
- "type" : "string"
329
- },
330
- "ust_router_password" : {
331
- "secret" : true,
332
- "type" : "string"
333
- },
334
327
  "vary_turbocache_by_cookie" : {
335
328
  "type" : "string"
336
329
  }
@@ -794,7 +787,7 @@
794
787
  "type" : "string"
795
788
  },
796
789
  "server_software" : {
797
- "default_value" : "Phusion_Passenger/5.2.3",
790
+ "default_value" : "Phusion_Passenger/5.3.0",
798
791
  "has_default_value" : "static",
799
792
  "type" : "string"
800
793
  },
@@ -836,13 +829,6 @@
836
829
  "has_default_value" : "static",
837
830
  "type" : "boolean"
838
831
  },
839
- "ust_router_address" : {
840
- "type" : "string"
841
- },
842
- "ust_router_password" : {
843
- "secret" : true,
844
- "type" : "string"
845
- },
846
832
  "vary_turbocache_by_cookie" : {
847
833
  "type" : "string"
848
834
  },
@@ -1519,7 +1505,7 @@
1519
1505
  "type" : "string"
1520
1506
  },
1521
1507
  "server_software" : {
1522
- "default_value" : "Phusion_Passenger/5.2.3",
1508
+ "default_value" : "Phusion_Passenger/5.3.0",
1523
1509
  "has_default_value" : "static",
1524
1510
  "type" : "string"
1525
1511
  },
@@ -1574,13 +1560,6 @@
1574
1560
  "has_default_value" : "static",
1575
1561
  "type" : "boolean"
1576
1562
  },
1577
- "ust_router_address" : {
1578
- "type" : "string"
1579
- },
1580
- "ust_router_password" : {
1581
- "secret" : true,
1582
- "type" : "string"
1583
- },
1584
1563
  "vary_turbocache_by_cookie" : {
1585
1564
  "type" : "string"
1586
1565
  },