r10k 3.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (358) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +1 -0
  3. data/.github/pull_request_template.md +1 -0
  4. data/.github/workflows/docker.yml +56 -0
  5. data/.github/workflows/release.yml +36 -0
  6. data/.gitignore +9 -0
  7. data/.travis.yml +45 -0
  8. data/CHANGELOG.mkd +1759 -0
  9. data/CODEOWNERS +2 -0
  10. data/CONTRIBUTING.mkd +105 -0
  11. data/Gemfile +15 -0
  12. data/LICENSE +14 -0
  13. data/README.mkd +118 -0
  14. data/Rakefile +3 -0
  15. data/azure-pipelines.yml +86 -0
  16. data/bin/r10k +17 -0
  17. data/doc/common-patterns.mkd +44 -0
  18. data/doc/dynamic-environments.mkd +31 -0
  19. data/doc/dynamic-environments/configuration.mkd +669 -0
  20. data/doc/dynamic-environments/git-environments.mkd +75 -0
  21. data/doc/dynamic-environments/introduction.mkd +69 -0
  22. data/doc/dynamic-environments/master-configuration.mkd +40 -0
  23. data/doc/dynamic-environments/quickstart.mkd +201 -0
  24. data/doc/dynamic-environments/svn-environments.mkd +45 -0
  25. data/doc/dynamic-environments/usage.mkd +132 -0
  26. data/doc/dynamic-environments/workflow-guide.mkd +247 -0
  27. data/doc/faq.mkd +164 -0
  28. data/doc/git/cloning-and-mirroring.mkd +60 -0
  29. data/doc/git/providers.mkd +111 -0
  30. data/doc/puppetfile.mkd +309 -0
  31. data/doc/updating-your-puppetfile.mkd +38 -0
  32. data/docker/.gitignore +1 -0
  33. data/docker/.rspec +4 -0
  34. data/docker/Gemfile +11 -0
  35. data/docker/Makefile +89 -0
  36. data/docker/README.md +28 -0
  37. data/docker/r10k/Dockerfile +67 -0
  38. data/docker/r10k/adduser.sh +13 -0
  39. data/docker/r10k/docker-entrypoint.d/10-analytics.sh +30 -0
  40. data/docker/r10k/docker-entrypoint.sh +11 -0
  41. data/docker/r10k/release.Dockerfile +54 -0
  42. data/docker/spec/dockerfile_spec.rb +43 -0
  43. data/docker/spec/fixtures/Puppetfile +2 -0
  44. data/integration/Gemfile +19 -0
  45. data/integration/README.mkd +29 -0
  46. data/integration/Rakefile +77 -0
  47. data/integration/component/pre-suite/05_install_dev_r10k.rb +12 -0
  48. data/integration/files/README.mkd +4 -0
  49. data/integration/files/hiera.yaml +8 -0
  50. data/integration/files/modules/helloworld/manifests/init.pp +3 -0
  51. data/integration/files/modules/hieratest/manifests/init.pp +3 -0
  52. data/integration/files/modules/unicode/files/pretend_unicode +1 -0
  53. data/integration/files/modules/unicode/manifests/init.pp +6 -0
  54. data/integration/files/pre-suite/git_config.pp.erb +19 -0
  55. data/integration/files/pre-suite/prod_env.config +3 -0
  56. data/integration/files/r10k_conf.yaml.erb +9 -0
  57. data/integration/lib/README.mkd +4 -0
  58. data/integration/lib/git_utils.rb +205 -0
  59. data/integration/lib/master_manipulator.rb +205 -0
  60. data/integration/lib/r10k_utils.rb +222 -0
  61. data/integration/manifests/README.mkd +4 -0
  62. data/integration/pre-suite/00_pe_install.rb +6 -0
  63. data/integration/pre-suite/10_git_config.rb +48 -0
  64. data/integration/pre-suite/20_pe_r10k.rb +55 -0
  65. data/integration/pre-suite/README.mkd +5 -0
  66. data/integration/tests/Puppetfile/HTTP_PROXY_affects_forge_source.rb +72 -0
  67. data/integration/tests/Puppetfile/HTTP_PROXY_affects_git_source.rb +70 -0
  68. data/integration/tests/README.mkd +4 -0
  69. data/integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb +83 -0
  70. data/integration/tests/basic_functionality/negative/neg_deploy_with_invalid_r10k_yaml.rb +51 -0
  71. data/integration/tests/basic_functionality/negative/neg_deploy_with_missing_r10k_yaml.rb +28 -0
  72. data/integration/tests/basic_functionality/negative/neg_invalid_git_provider.rb +45 -0
  73. data/integration/tests/basic_functionality/negative/negative_bad_proxy.rb +34 -0
  74. data/integration/tests/basic_functionality/proxy_specified_in_configuration.rb +103 -0
  75. data/integration/tests/basic_functionality/proxy_with_pe_only_module.rb +128 -0
  76. data/integration/tests/basic_functionality/proxy_with_puppetfile.rb +61 -0
  77. data/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb +109 -0
  78. data/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb +108 -0
  79. data/integration/tests/command_line/deploy_env_without_mod_update.rb +76 -0
  80. data/integration/tests/command_line/negative/neg_deploy_env_with_module_update.rb +77 -0
  81. data/integration/tests/command_line/negative/neg_invalid_cmd_line_arg.rb +23 -0
  82. data/integration/tests/git_source/HTTP_proxy_and_git_source.rb +70 -0
  83. data/integration/tests/git_source/git_source_git.rb +128 -0
  84. data/integration/tests/git_source/git_source_ssh.rb +87 -0
  85. data/integration/tests/git_source/git_source_submodule.rb +70 -0
  86. data/integration/tests/git_source/negative/neg_git_broken_remote.rb +38 -0
  87. data/integration/tests/git_source/negative/neg_git_unauthorized_https.rb +46 -0
  88. data/integration/tests/git_source/negative/neg_git_unauthorized_ssh.rb +73 -0
  89. data/integration/tests/git_source/negative/neg_git_unicode_branch.rb +35 -0
  90. data/integration/tests/i18n/deploy_module_with_unicode_in_file_name.rb +64 -0
  91. data/integration/tests/purging/content_not_purged_at_root.rb +89 -0
  92. data/integration/tests/purging/default_purging.rb +125 -0
  93. data/integration/tests/purging/does_not_purge_files_on_white_list.rb +93 -0
  94. data/integration/tests/purging/invalid_whitelist_types.rb +63 -0
  95. data/integration/tests/user_scenario/basic_workflow/multi_env_1000_branches.rb +66 -0
  96. data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module.rb +111 -0
  97. data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module_static.rb +117 -0
  98. data/integration/tests/user_scenario/basic_workflow/multi_env_hiera.rb +100 -0
  99. data/integration/tests/user_scenario/basic_workflow/multi_env_multi_source.rb +133 -0
  100. data/integration/tests/user_scenario/basic_workflow/multi_source_custom_forge_git_module.rb +161 -0
  101. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_basedir.rb +46 -0
  102. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_forge_module.rb +48 -0
  103. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module.rb +45 -0
  104. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module_ref.rb +43 -0
  105. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_remote.rb +45 -0
  106. data/integration/tests/user_scenario/basic_workflow/negative/neg_branch_name_collision.rb +64 -0
  107. data/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +75 -0
  108. data/integration/tests/user_scenario/basic_workflow/negative/neg_duplicate_module_names.rb +44 -0
  109. data/integration/tests/user_scenario/basic_workflow/negative/neg_inaccessible_forge.rb +58 -0
  110. data/integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb +34 -0
  111. data/integration/tests/user_scenario/basic_workflow/negative/neg_invalid_puppet_file.rb +36 -0
  112. data/integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb +49 -0
  113. data/integration/tests/user_scenario/basic_workflow/negative/neg_read_only.rb +58 -0
  114. data/integration/tests/user_scenario/basic_workflow/negative/neg_specify_deleted_forge_module.rb +51 -0
  115. data/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +75 -0
  116. data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_git_module.rb +104 -0
  117. data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_module.rb +81 -0
  118. data/integration/tests/user_scenario/basic_workflow/single_env_custom_module.rb +49 -0
  119. data/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +75 -0
  120. data/integration/tests/user_scenario/basic_workflow/single_env_module_already_installed.rb +82 -0
  121. data/integration/tests/user_scenario/basic_workflow/single_env_module_last_release_deleted.rb +68 -0
  122. data/integration/tests/user_scenario/basic_workflow/single_env_non-existent_base_dir.rb +94 -0
  123. data/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb +93 -0
  124. data/integration/tests/user_scenario/basic_workflow/single_env_switch_forge_git_module.rb +117 -0
  125. data/integration/tests/user_scenario/basic_workflow/single_env_unicode_paths.rb +60 -0
  126. data/integration/tests/user_scenario/basic_workflow/single_env_upgrade_forge_mod_revert_change.rb +166 -0
  127. data/integration/tests/user_scenario/complex_workflow/multi_env_add_change_remove.rb +163 -0
  128. data/integration/tests/user_scenario/complex_workflow/multi_env_remove_re-add.rb +111 -0
  129. data/integration/tests/user_scenario/complex_workflow/multi_env_unamanaged.rb +78 -0
  130. data/integration/tests/user_scenario/complex_workflow/single_env_git_module_update.rb +100 -0
  131. data/lib/r10k.rb +11 -0
  132. data/lib/r10k/action/base.rb +31 -0
  133. data/lib/r10k/action/cri_runner.rb +72 -0
  134. data/lib/r10k/action/deploy.rb +9 -0
  135. data/lib/r10k/action/deploy/deploy_helpers.rb +34 -0
  136. data/lib/r10k/action/deploy/display.rb +89 -0
  137. data/lib/r10k/action/deploy/environment.rb +196 -0
  138. data/lib/r10k/action/deploy/module.rb +84 -0
  139. data/lib/r10k/action/puppetfile.rb +10 -0
  140. data/lib/r10k/action/puppetfile/check.rb +31 -0
  141. data/lib/r10k/action/puppetfile/cri_runner.rb +26 -0
  142. data/lib/r10k/action/puppetfile/install.rb +45 -0
  143. data/lib/r10k/action/puppetfile/purge.rb +28 -0
  144. data/lib/r10k/action/runner.rb +96 -0
  145. data/lib/r10k/action/visitor.rb +31 -0
  146. data/lib/r10k/cli.rb +51 -0
  147. data/lib/r10k/cli/deploy.rb +114 -0
  148. data/lib/r10k/cli/ext/logging.rb +15 -0
  149. data/lib/r10k/cli/help.rb +7 -0
  150. data/lib/r10k/cli/puppetfile.rb +74 -0
  151. data/lib/r10k/cli/version.rb +31 -0
  152. data/lib/r10k/deployment.rb +132 -0
  153. data/lib/r10k/deployment/config.rb +56 -0
  154. data/lib/r10k/environment.rb +37 -0
  155. data/lib/r10k/environment/bare.rb +16 -0
  156. data/lib/r10k/environment/base.rb +150 -0
  157. data/lib/r10k/environment/git.rb +81 -0
  158. data/lib/r10k/environment/name.rb +86 -0
  159. data/lib/r10k/environment/svn.rb +91 -0
  160. data/lib/r10k/environment/with_modules.rb +139 -0
  161. data/lib/r10k/errors.rb +61 -0
  162. data/lib/r10k/errors/formatting.rb +28 -0
  163. data/lib/r10k/feature.rb +56 -0
  164. data/lib/r10k/feature/collection.rb +23 -0
  165. data/lib/r10k/features.rb +20 -0
  166. data/lib/r10k/forge/module_release.rb +228 -0
  167. data/lib/r10k/git.rb +196 -0
  168. data/lib/r10k/git/alternates.rb +63 -0
  169. data/lib/r10k/git/cache.rb +108 -0
  170. data/lib/r10k/git/errors.rb +34 -0
  171. data/lib/r10k/git/rugged.rb +17 -0
  172. data/lib/r10k/git/rugged/bare_repository.rb +85 -0
  173. data/lib/r10k/git/rugged/base_repository.rb +93 -0
  174. data/lib/r10k/git/rugged/cache.rb +11 -0
  175. data/lib/r10k/git/rugged/credentials.rb +91 -0
  176. data/lib/r10k/git/rugged/thin_repository.rb +89 -0
  177. data/lib/r10k/git/rugged/working_repository.rb +145 -0
  178. data/lib/r10k/git/shellgit.rb +9 -0
  179. data/lib/r10k/git/shellgit/bare_repository.rb +43 -0
  180. data/lib/r10k/git/shellgit/base_repository.rb +137 -0
  181. data/lib/r10k/git/shellgit/cache.rb +11 -0
  182. data/lib/r10k/git/shellgit/thin_repository.rb +69 -0
  183. data/lib/r10k/git/shellgit/working_repository.rb +111 -0
  184. data/lib/r10k/git/stateful_repository.rb +95 -0
  185. data/lib/r10k/initializers.rb +67 -0
  186. data/lib/r10k/instance_cache.rb +32 -0
  187. data/lib/r10k/keyed_factory.rb +39 -0
  188. data/lib/r10k/logging.rb +109 -0
  189. data/lib/r10k/logging/terminaloutputter.rb +36 -0
  190. data/lib/r10k/module.rb +38 -0
  191. data/lib/r10k/module/base.rb +113 -0
  192. data/lib/r10k/module/forge.rb +177 -0
  193. data/lib/r10k/module/git.rb +109 -0
  194. data/lib/r10k/module/local.rb +36 -0
  195. data/lib/r10k/module/metadata_file.rb +31 -0
  196. data/lib/r10k/module/svn.rb +112 -0
  197. data/lib/r10k/puppetfile.rb +286 -0
  198. data/lib/r10k/settings.rb +194 -0
  199. data/lib/r10k/settings/collection.rb +123 -0
  200. data/lib/r10k/settings/container.rb +97 -0
  201. data/lib/r10k/settings/definition.rb +124 -0
  202. data/lib/r10k/settings/enum_definition.rb +30 -0
  203. data/lib/r10k/settings/helpers.rb +38 -0
  204. data/lib/r10k/settings/list.rb +107 -0
  205. data/lib/r10k/settings/loader.rb +99 -0
  206. data/lib/r10k/settings/mixin.rb +54 -0
  207. data/lib/r10k/settings/uri_definition.rb +19 -0
  208. data/lib/r10k/source.rb +42 -0
  209. data/lib/r10k/source/base.rb +74 -0
  210. data/lib/r10k/source/exec.rb +51 -0
  211. data/lib/r10k/source/git.rb +142 -0
  212. data/lib/r10k/source/hash.rb +182 -0
  213. data/lib/r10k/source/svn.rb +136 -0
  214. data/lib/r10k/source/yaml.rb +20 -0
  215. data/lib/r10k/source/yamldir.rb +32 -0
  216. data/lib/r10k/svn.rb +6 -0
  217. data/lib/r10k/svn/remote.rb +68 -0
  218. data/lib/r10k/svn/working_dir.rb +125 -0
  219. data/lib/r10k/util/attempt.rb +84 -0
  220. data/lib/r10k/util/basedir.rb +65 -0
  221. data/lib/r10k/util/commands.rb +31 -0
  222. data/lib/r10k/util/exec_env.rb +36 -0
  223. data/lib/r10k/util/license.rb +24 -0
  224. data/lib/r10k/util/platform.rb +42 -0
  225. data/lib/r10k/util/purgeable.rb +88 -0
  226. data/lib/r10k/util/setopts.rb +55 -0
  227. data/lib/r10k/util/subprocess.rb +84 -0
  228. data/lib/r10k/util/subprocess/result.rb +56 -0
  229. data/lib/r10k/util/subprocess/runner.rb +26 -0
  230. data/lib/r10k/util/subprocess/runner/jruby.rb +23 -0
  231. data/lib/r10k/util/subprocess/runner/posix.rb +103 -0
  232. data/lib/r10k/util/subprocess/runner/pump.rb +59 -0
  233. data/lib/r10k/util/subprocess/runner/windows.rb +23 -0
  234. data/lib/r10k/util/subprocess/subprocess_error.rb +24 -0
  235. data/lib/r10k/util/symbolize_keys.rb +35 -0
  236. data/lib/r10k/version.rb +6 -0
  237. data/locales/config.yaml +21 -0
  238. data/locales/r10k.pot +545 -0
  239. data/r10k.gemspec +50 -0
  240. data/r10k.yaml.example +112 -0
  241. data/spec/fixtures/empty/.empty +0 -0
  242. data/spec/fixtures/integration/git/puppet-boolean-bare.tar +0 -0
  243. data/spec/fixtures/module/forge/bad_module/metadata.json +1 -0
  244. data/spec/fixtures/module/forge/eight_hundred/Modulefile +8 -0
  245. data/spec/fixtures/module/forge/eight_hundred/metadata.json +19 -0
  246. data/spec/fixtures/unit/action/r10k.yaml +5 -0
  247. data/spec/fixtures/unit/action/r10k_cachedir.yaml +2 -0
  248. data/spec/fixtures/unit/action/r10k_generate_types.yaml +3 -0
  249. data/spec/fixtures/unit/action/r10k_puppet_path.yaml +3 -0
  250. data/spec/fixtures/unit/puppetfile/argument-error/Puppetfile +1 -0
  251. data/spec/fixtures/unit/puppetfile/default-branch-override/Puppetfile +5 -0
  252. data/spec/fixtures/unit/puppetfile/duplicate-module-error/Puppetfile +10 -0
  253. data/spec/fixtures/unit/puppetfile/invalid-syntax/Puppetfile +1 -0
  254. data/spec/fixtures/unit/puppetfile/load-error/Puppetfile +1 -0
  255. data/spec/fixtures/unit/puppetfile/name-error/Puppetfile +1 -0
  256. data/spec/fixtures/unit/puppetfile/valid-forge-with-version/Puppetfile +1 -0
  257. data/spec/fixtures/unit/puppetfile/valid-forge-without-version/Puppetfile +1 -0
  258. data/spec/fixtures/unit/util/purgeable/managed_one/expected_1 +0 -0
  259. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/subdir_expected_1 +0 -0
  260. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/subdir_unmanaged_1 +0 -0
  261. data/spec/fixtures/unit/util/purgeable/managed_one/unmanaged_1 +0 -0
  262. data/spec/fixtures/unit/util/purgeable/managed_two/expected_2 +0 -0
  263. data/spec/fixtures/unit/util/purgeable/managed_two/unmanaged_2 +0 -0
  264. data/spec/fixtures/unit/util/subprocess/runner/no-execute.sh +3 -0
  265. data/spec/integration/git/rugged/bare_repository_spec.rb +13 -0
  266. data/spec/integration/git/rugged/thin_repository_spec.rb +14 -0
  267. data/spec/integration/git/rugged/working_repository_spec.rb +48 -0
  268. data/spec/integration/git/shellgit/bare_repository_spec.rb +13 -0
  269. data/spec/integration/git/shellgit/thin_repository_spec.rb +14 -0
  270. data/spec/integration/git/shellgit/working_repository_spec.rb +13 -0
  271. data/spec/integration/git/stateful_repository_spec.rb +159 -0
  272. data/spec/matchers/exit_with.rb +28 -0
  273. data/spec/matchers/match_realpath.rb +18 -0
  274. data/spec/r10k-mocks.rb +3 -0
  275. data/spec/r10k-mocks/mock_config.rb +33 -0
  276. data/spec/r10k-mocks/mock_env.rb +15 -0
  277. data/spec/r10k-mocks/mock_source.rb +13 -0
  278. data/spec/shared-contexts/git-fixtures.rb +55 -0
  279. data/spec/shared-examples/deploy-actions.rb +69 -0
  280. data/spec/shared-examples/git-repository.rb +38 -0
  281. data/spec/shared-examples/git/bare_repository.rb +132 -0
  282. data/spec/shared-examples/git/thin_repository.rb +26 -0
  283. data/spec/shared-examples/git/working_repository.rb +207 -0
  284. data/spec/shared-examples/puppetfile-action.rb +39 -0
  285. data/spec/shared-examples/settings/ancestry.rb +44 -0
  286. data/spec/shared-examples/subprocess-runner.rb +83 -0
  287. data/spec/spec_helper.rb +40 -0
  288. data/spec/unit/action/cri_runner_spec.rb +72 -0
  289. data/spec/unit/action/deploy/deploy_helpers_spec.rb +38 -0
  290. data/spec/unit/action/deploy/display_spec.rb +31 -0
  291. data/spec/unit/action/deploy/environment_spec.rb +395 -0
  292. data/spec/unit/action/deploy/module_spec.rb +139 -0
  293. data/spec/unit/action/puppetfile/check_spec.rb +41 -0
  294. data/spec/unit/action/puppetfile/cri_runner_spec.rb +47 -0
  295. data/spec/unit/action/puppetfile/install_spec.rb +84 -0
  296. data/spec/unit/action/puppetfile/purge_spec.rb +42 -0
  297. data/spec/unit/action/runner_spec.rb +213 -0
  298. data/spec/unit/action/visitor_spec.rb +39 -0
  299. data/spec/unit/cli_spec.rb +9 -0
  300. data/spec/unit/deployment/config_spec.rb +33 -0
  301. data/spec/unit/deployment_spec.rb +162 -0
  302. data/spec/unit/environment/base_spec.rb +109 -0
  303. data/spec/unit/environment/git_spec.rb +97 -0
  304. data/spec/unit/environment/name_spec.rb +135 -0
  305. data/spec/unit/environment/svn_spec.rb +133 -0
  306. data/spec/unit/errors/formatting_spec.rb +84 -0
  307. data/spec/unit/feature_spec.rb +50 -0
  308. data/spec/unit/forge/module_release_spec.rb +213 -0
  309. data/spec/unit/git/alternates_spec.rb +116 -0
  310. data/spec/unit/git/cache_spec.rb +55 -0
  311. data/spec/unit/git/rugged/cache_spec.rb +29 -0
  312. data/spec/unit/git/rugged/credentials_spec.rb +109 -0
  313. data/spec/unit/git/shellgit/cache_spec.rb +27 -0
  314. data/spec/unit/git/stateful_repository_spec.rb +40 -0
  315. data/spec/unit/git_spec.rb +102 -0
  316. data/spec/unit/initializers_spec.rb +68 -0
  317. data/spec/unit/instance_cache_spec.rb +78 -0
  318. data/spec/unit/keyed_factory_spec.rb +51 -0
  319. data/spec/unit/logging/terminaloutputter_spec.rb +53 -0
  320. data/spec/unit/logging_spec.rb +68 -0
  321. data/spec/unit/module/base_spec.rb +72 -0
  322. data/spec/unit/module/forge_spec.rb +207 -0
  323. data/spec/unit/module/git_spec.rb +274 -0
  324. data/spec/unit/module/metadata_file_spec.rb +68 -0
  325. data/spec/unit/module/svn_spec.rb +178 -0
  326. data/spec/unit/module_spec.rb +29 -0
  327. data/spec/unit/puppetfile_spec.rb +300 -0
  328. data/spec/unit/settings/collection_spec.rb +123 -0
  329. data/spec/unit/settings/container_spec.rb +92 -0
  330. data/spec/unit/settings/definition_spec.rb +79 -0
  331. data/spec/unit/settings/enum_definition_spec.rb +20 -0
  332. data/spec/unit/settings/inheritance_spec.rb +38 -0
  333. data/spec/unit/settings/list_spec.rb +88 -0
  334. data/spec/unit/settings/loader_spec.rb +110 -0
  335. data/spec/unit/settings/uri_definition_spec.rb +23 -0
  336. data/spec/unit/settings_spec.rb +246 -0
  337. data/spec/unit/source/base_spec.rb +31 -0
  338. data/spec/unit/source/exec_spec.rb +81 -0
  339. data/spec/unit/source/git_spec.rb +185 -0
  340. data/spec/unit/source/hash_spec.rb +54 -0
  341. data/spec/unit/source/svn_spec.rb +196 -0
  342. data/spec/unit/source/yaml_spec.rb +42 -0
  343. data/spec/unit/source_spec.rb +10 -0
  344. data/spec/unit/svn/remote_spec.rb +21 -0
  345. data/spec/unit/svn/working_dir_spec.rb +56 -0
  346. data/spec/unit/util/attempt_spec.rb +82 -0
  347. data/spec/unit/util/commands_spec.rb +61 -0
  348. data/spec/unit/util/exec_env_spec.rb +56 -0
  349. data/spec/unit/util/purgeable_spec.rb +230 -0
  350. data/spec/unit/util/setopts_spec.rb +59 -0
  351. data/spec/unit/util/subprocess/result_spec.rb +36 -0
  352. data/spec/unit/util/subprocess/runner/posix_spec.rb +7 -0
  353. data/spec/unit/util/subprocess/runner/pump_spec.rb +79 -0
  354. data/spec/unit/util/subprocess/runner/windows_spec.rb +7 -0
  355. data/spec/unit/util/subprocess/subprocess_error_spec.rb +26 -0
  356. data/spec/unit/util/subprocess_spec.rb +65 -0
  357. data/spec/unit/util/symbolize_keys_spec.rb +67 -0
  358. metadata +582 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c2fbe395273c7e4fa08a3cb6fa552c05d4745c6c3f8add19b7fe7bb63c03b2d4
4
+ data.tar.gz: 7e59bb47f25fcac554075de51a4b37d55de612cdb43079a1212adf4d3c84707a
5
+ SHA512:
6
+ metadata.gz: 7925d5b8d45bcb502ce11a4d190048f3bcf03310ee42a9128a5ff66e72425a48269a35fba1177905a895175a096b45441fb2f0090e174ecd2bbd86217d5ed641
7
+ data.tar.gz: 796889d0936244967388973e0903e9011cc11b11a8fcb6b91bc083f13e8fb4e1400b96f79337f778576d04c917e3cc170b1094e124f3a05a8174b1de82d28824
@@ -0,0 +1 @@
1
+ docker/** text eol=lf
@@ -0,0 +1 @@
1
+ Please add all notable changes to the "Unreleased" section of the CHANGELOG.
@@ -0,0 +1,56 @@
1
+ name: Docker test and publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ env:
11
+ PUPPERWARE_ANALYTICS_STREAM: production
12
+ IS_LATEST: true
13
+ # Still need these env vars for README publishing
14
+ DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
15
+ DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
16
+
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - uses: actions/checkout@master
21
+ - uses: azure/docker-login@v1
22
+ with: # This doesn't seem to work unless we point directly to the secrets
23
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
24
+ password: ${{ secrets.DOCKERHUB_PASSWORD }}
25
+ - name: Set up Ruby 2.6
26
+ uses: actions/setup-ruby@v1
27
+ with:
28
+ ruby-version: 2.6.x
29
+ - run: gem install bundler
30
+ - name: Build container
31
+ working-directory: docker
32
+ run: make lint build test
33
+ - name: Publish container
34
+ working-directory: docker
35
+ run: |
36
+ make publish
37
+ - name: Build release container
38
+ env:
39
+ IS_RELEASE: true
40
+ working-directory: docker
41
+ run: |
42
+ if make prep; then
43
+ make lint build test
44
+ else
45
+ echo "Skipping release container building and testing"
46
+ fi
47
+ - name: Publish release container
48
+ env:
49
+ IS_RELEASE: true
50
+ working-directory: docker
51
+ run: |
52
+ if make prep; then
53
+ make publish
54
+ else
55
+ echo "Skipping release container publishing"
56
+ fi
@@ -0,0 +1,36 @@
1
+ name: Tag and release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths:
8
+ - 'lib/r10k/version.rb'
9
+
10
+ jobs:
11
+ release:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ with:
16
+ fetch-depth: '0'
17
+ - name: Bump version and push tag
18
+ uses: anothrNick/github-tag-action@1.17.2
19
+ env:
20
+ GITHUB_TOKEN: ${{ secrets.PUPPET_RELEASE_GH_TOKEN }}
21
+ DEFAULT_BUMP: patch
22
+ WITH_V: false
23
+ # Uncomment this if the tag and version file become out-of-sync and
24
+ # you need to tag at a specific version.
25
+ # CUSTOM_TAG:
26
+ - name: Build gem
27
+ uses: scarhand/actions-ruby@master
28
+ with:
29
+ args: build *.gemspec
30
+ - name: Publish gem
31
+ uses: scarhand/actions-ruby@master
32
+ env:
33
+ RUBYGEMS_AUTH_TOKEN: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
34
+ with:
35
+ args: push *.gem
36
+
@@ -0,0 +1,9 @@
1
+ /r10k*.gem
2
+ Gemfile.local
3
+ Gemfile.lock
4
+ .bundle
5
+ bundle
6
+ coverage
7
+ integration/log
8
+ integration/junit
9
+ integration/configs
@@ -0,0 +1,45 @@
1
+ ---
2
+ language: ruby
3
+ bundler_args: "--without system"
4
+ script: "bundle exec rspec --color --format documentation spec/unit"
5
+ notifications:
6
+ email: false
7
+ sudo: false
8
+ jdk:
9
+ - openjdk11
10
+ before_install: gem install bundler -v '< 2' --no-document
11
+ matrix:
12
+ include:
13
+ - stage: r10k tests
14
+ rvm: 2.7.0
15
+ - stage: r10k tests
16
+ rvm: 2.6.5
17
+ - stage: r10k tests
18
+ rvm: 2.5.0
19
+ - stage: r10k tests
20
+ rvm: 2.4.0
21
+ - stage: r10k tests
22
+ rvm: 2.3.0
23
+ - stage: r10k tests
24
+ rvm: jruby
25
+ - stage: r10k container tests
26
+ dist: focal
27
+ language: ruby
28
+ services:
29
+ - docker
30
+ rvm: 2.6.6
31
+ env:
32
+ - DOCKER_COMPOSE_VERSION=1.25.5
33
+ # necessary to prevent overwhelming TravisCI build output limits
34
+ - DOCKER_BUILD_FLAGS="--progress plain"
35
+ before_install:
36
+ - sudo rm /usr/local/bin/docker-compose
37
+ - curl --location https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname --kernel-name`-`uname --machine` > docker-compose
38
+ - chmod +x docker-compose
39
+ - sudo mv docker-compose /usr/local/bin
40
+ script:
41
+ - set -e
42
+ - cd docker
43
+ - make lint
44
+ - make build
45
+ - make test
@@ -0,0 +1,1759 @@
1
+ CHANGELOG
2
+ =========
3
+
4
+ Unreleased
5
+ ----
6
+
7
+ 3.5.2
8
+ -----
9
+
10
+ - (RK-319) Clean up tmp directories used for downloading modules
11
+
12
+ 3.5.1
13
+ -----
14
+
15
+ - Upgrade Rugged Gemfile dependency for local development to ~> 1.0
16
+
17
+ 3.5.0
18
+ -----
19
+
20
+ - Add exec environment source type. The exec source type allows for the
21
+ implementation of external environment sources
22
+ [#1042](https://github.com/puppetlabs/r10k/pull/1042).
23
+ - Improve atomicity of .r10k-deploy.json writes. Fixes
24
+ [#813](https://github.com/puppetlabs/r10k/issues/813)
25
+
26
+ 3.4.1
27
+ -----
28
+
29
+ - Add support for Ruby 2.7
30
+ - (RK-357) Restrict gettext and fast_gettext versions for compatibility with Ruby 2.4
31
+ - Bump cri to 2.15.10
32
+ - (RK-360) Allow overriding the cachedir in `deploy module`
33
+ - Bump puppet_forge to 2.3.0
34
+
35
+ 3.4.0
36
+ -----
37
+
38
+ - Switch to supported `colored2` gem
39
+ - Add YAML environment source types [#983](https://github.com/puppetlabs/r10k/pull/983), [#1002](https://github.com/puppetlabs/r10k/pull/1002). YAML source types use configuration files to define environments, rather than VCS branches, and support deploying modules to an environment without modifying a control-repo. YAML environment source types are experimental in this release
40
+
41
+ 3.3.3
42
+ -----
43
+
44
+ ### Changes
45
+
46
+ - Update minitar version to 0.9, to match the version installed with puppet-agent
47
+
48
+ 3.3.2
49
+ -----
50
+
51
+ ### Bug Fixes
52
+
53
+ - Switched to thread-safe OpenSSL::Digest creation. [#979](https://github.com/puppetlabs/r10k/issues/979)
54
+
55
+ 3.3.1
56
+ -----
57
+
58
+ ### Changes
59
+
60
+ - Updated thread pool error handling and logging
61
+
62
+ 3.3.0
63
+ -----
64
+
65
+ ### New Feature
66
+
67
+ - Adds support for installing modules concurrently
68
+
69
+ ### Bug Fixes
70
+
71
+ - (RK-343) Pins CRI dependency to 2.15.6 to resolve regression in options
72
+ parsing.
73
+
74
+ 3.2.1
75
+ ----
76
+
77
+ ### Changes
78
+
79
+ - Flag for overriding default branch configuration in Puppetfile
80
+ - Plumbing for internationalization
81
+ - Numerous test fixes and legacy docker work
82
+
83
+ 3.2.0
84
+ -----
85
+
86
+ ### Changes
87
+
88
+ - Add support for running `puppet generate types`
89
+
90
+ 3.1.1
91
+ -----
92
+
93
+ ### Changes
94
+
95
+ - (RK-335) Postrun `modifiedenvs` doesn't include environment prefixes
96
+
97
+ 3.1.0
98
+ -----
99
+
100
+ ### Changes
101
+
102
+ - Substitute environments acted on in postrun command.
103
+
104
+ Now post run commands that contain the string "$modifiedenvs"
105
+ (eg. ["/usr/local/bin/my-postrun-cmd", "--verbose", "$modifiedenvs"])
106
+ will have the string substituted with a space separated list
107
+ of environments acted upon (either a single environment if
108
+ specified on the command line or all environments).
109
+
110
+ Specifically this should allow users to easily wrap
111
+ `puppet generate types` and matches the terminology used
112
+ in g10k.
113
+
114
+ Many thanks to @raphink for the contribution.
115
+
116
+ 3.0.4
117
+ ----
118
+
119
+ ### Changes
120
+
121
+ - Flag for overriding default branch configuration in Puppetfile
122
+ - Plumbing for internationalization
123
+ - Numerous test fixes and legacy docker work
124
+
125
+ 3.0.3
126
+ ----
127
+
128
+ ### Changes
129
+
130
+ - (RK-324) Fix Ruby pipe bug affecting Ubuntu
131
+
132
+ 3.0.2
133
+ ----
134
+
135
+ ### Changes
136
+
137
+ - Minor test fixes.
138
+
139
+ 3.0.1
140
+ ----
141
+
142
+ ### Changes
143
+
144
+ Because of dependency issues R10K 3.0.0 required Ruby >= 2.3
145
+ rather than the reported 2.0. This release makes the requirement of
146
+ Ruby >= 2.3 official and documented.
147
+
148
+ - (#853) ([RK-327](https://tickets.puppetlabs.com/browse/RK-327) Uninitialized Constant Cri::Error
149
+ When resolving the Cri dependency >= 2.13 R10K would fail with an
150
+ uninitialized constant error. Thanks to @ostavnaas for the bug report,
151
+ @ddfreyne for the fix, and @baurmatt for the review.
152
+
153
+
154
+ 3.0.0
155
+ ----
156
+
157
+ ### Changes
158
+
159
+ #### Known issues
160
+ - Child processes may die unexpectedly when deploying many environments
161
+ on Ubuntu Bionic. See
162
+ [RK-324](https://tickets.puppetlabs.com/browse/RK-324).
163
+
164
+ #### Backwards breaking changes
165
+ - Drop support for Ruby < 2.0
166
+ - Remove support for PUPPETFILE and PUPPETFILE_DIR environment variables
167
+ when running the `puppetfile` action, please use flags instead.
168
+ - Fail when duplicate module definitions in Puppetfile
169
+
170
+ #### Bug fixes
171
+ - More reliable pruning of refs on fetch
172
+ - Improved error messaging when:
173
+ - Unable to connect to a proxy
174
+ - r10k.yaml file is empty
175
+ - Unable to parse Puppetfile
176
+ - Various perfomance improvements
177
+
178
+ 2.6.8
179
+ ----
180
+
181
+ ### Changes
182
+
183
+ (RK-357) Restrict gettext and fast_gettext versions for compatibility with Ruby 2.4.
184
+ (RK-358) Update puppet_forge to ~> 2.3.0.
185
+
186
+ 2.6.7
187
+ ----
188
+
189
+ ### Changes
190
+
191
+ (CDPE-1813) Add module deploy info to .r10k-deploy.json.
192
+ (RK-351) Update minitar to ~> 0.9.0.
193
+
194
+ 2.6.6
195
+ ----
196
+
197
+ ### Changes
198
+ - Flag for overriding default branch configuration in Puppetfile
199
+ - Plumbing for internationalization
200
+ - Numerous test fixes and legacy docker work
201
+
202
+ 2.6.5
203
+ ----
204
+
205
+ ### Bug Fix
206
+
207
+ (RK-324) Fix Ruby pipe bug affecting Ubuntu
208
+
209
+ 2.6.4
210
+ ----
211
+
212
+ ### Changes
213
+
214
+ Numerous test fixes.
215
+
216
+ 2.6.3
217
+ ----
218
+
219
+ ### Changes
220
+
221
+ Update specs with new error string.
222
+
223
+ **NOTE** - CHANGELOG is only assured to be up to date for a particular branch
224
+ when a release is made on that branch.
225
+
226
+ 2.6.2
227
+ -----
228
+
229
+ ### Changes
230
+
231
+ (RK-311) Yard dependency updated for security fix.
232
+
233
+ 2.6.1
234
+ -----
235
+
236
+ ### Bug Fixes
237
+
238
+ (RK-310) Fix ChecksumMismatch error on Windows for forge caching.
239
+
240
+ 2.6.0
241
+ -----
242
+
243
+ ### New Features
244
+
245
+ (RK-307) Branches can now be ignored by prefixes during deployment.
246
+
247
+ (RK-305) Add --no-force to deploy action to avoid overwriting local module changes.
248
+
249
+ (RK-264) Add --force action to puppetfile install to force overwriting local
250
+ module changes.
251
+
252
+ (RK-291) (RK-304) Add caching of forge modules.
253
+
254
+ ### Changes
255
+
256
+ (RK-306) Remove the dependency on semantic_puppet.
257
+
258
+ (RK-161) Deprecate the usage of PUPPETFILE and PUPPETFILE_DIR environment variables.
259
+
260
+ 2.5.5
261
+ -----
262
+
263
+ 2017/06/02
264
+
265
+ ### Bug Fixes
266
+
267
+ (#696) Move deprecated module check to install/reinstall/upgrade rather than
268
+ synchronize. This fixes a major slowdown on redeployment.
269
+
270
+ ### Changes
271
+
272
+ (RK-290) Add deprecation warning for duplicate module names in Puppetfile. This
273
+ will cause an error in r10k v3.0.0.
274
+
275
+ (RK-285) Update minitar dependency to 0.6.1
276
+
277
+ 2.5.4
278
+ -----
279
+
280
+ 2017/04/05
281
+
282
+ ### Bug Fixes
283
+
284
+ (PF-1317) Only use deprecated attribute when it exists.
285
+
286
+ 2.5.3
287
+ -----
288
+
289
+ 2017/03/31
290
+
291
+ ### Bug Fixes
292
+
293
+ (#645) Fix undefined method error when r10.yaml empty
294
+
295
+ (#659)(RK-269) Puppetfile actions acknowledge :branch and :default_branch
296
+ (Thanks to [Chris Cowley](https://github.com/chriscowley) for the report.)
297
+
298
+ ### Changes
299
+
300
+ (PF-1317) Emit a warning when syncing a deprecated Forge module.
301
+
302
+ 2.5.2
303
+ -----
304
+
305
+ 2017/02/07
306
+
307
+ (#699) Pin minitar dependency to 0.5.4 to avoid a bug with the 0.6.0 release.
308
+ (Thanks to [Logan Garrett](https://github.com/lngarrett) for the report and fix.)
309
+
310
+ 2.5.1
311
+ -----
312
+
313
+ 2016/12/05
314
+
315
+ (RK-78) Use :prune option for #fetch in Rugged::BareRepository
316
+
317
+ Versions of the "rugged" gem prior to 0.24.0 lacked the ability to automatically
318
+ "prune" branches from a local repo that no longer existed in the matching remote
319
+ repo after a fetch. To work around this issue, r10k included code that would
320
+ manually remove/recreate branches during a fetch. Since "rugged" 0.24.0 is now
321
+ widely available, r10k has been updated to use the built-in "prune" option
322
+ during a fetch and the workaround code has been removed.
323
+
324
+ NOTE: If you use the "rugged" gem with r10k, you will need to manually upgrade
325
+ it to a version >= 0.24.0 to take advantage of the new functionality. If you
326
+ are using a "rugged" version less than 0.24.0, r10k will now issue a warning
327
+ every time it fetches from a remote git repository.
328
+
329
+ 2.5.0
330
+ -----
331
+
332
+ 2016/11/15
333
+
334
+ ### Bug Fixes
335
+
336
+ (#669) Updated the behavior of the rugged based git provider to handle
337
+ unexpected behavior around checkout and resets regarding file permissions,
338
+ specifically, when resetting to an already checked out SHA the executable bit
339
+ on files would not update.
340
+
341
+ ### Changes
342
+
343
+ (#664) Added to the proxy error message for changes made to libcurl which gave
344
+ new, surprising errors about unsupported proxy schemes.
345
+
346
+ 2.4.3
347
+ -----
348
+
349
+ 2016/08/23
350
+
351
+ ### Bug Fixes
352
+
353
+ (RK-266) Fixed an issue where the "puppetfile install" action was encountering an
354
+ error when operating on a Puppetfile with "local" content declarations.
355
+
356
+ 2.4.2 (Yanked)
357
+ --------------
358
+
359
+ 2016/08/22
360
+
361
+ ### Bug Fixes
362
+
363
+ (RK-265) The "puppetfile install" action will no longer overwrite local
364
+ modifications to managed Git content. Instead, a message will be logged at the
365
+ "WARN" level indicating that the content was skipped. Note: The "deploy"
366
+ actions will still overwrite local modications. For more background on this
367
+ change, see below:
368
+
369
+ In 2.4.0 a change was made to r10k's behavior when it encounters local
370
+ modifications during "deploy" operations. Previously, r10k would log an error
371
+ and skip updating the modified content. As of 2.4.0, local modifications will
372
+ be overwritten and a warning will be logged. This change was considered a bug
373
+ fix but was originally omitted from the changelog for that release. This change
374
+ also inadvertently modified the behavior of the "puppetfile install" action. A
375
+ command line flag to control this behavior more explicitly will likely be added
376
+ in a future version.
377
+
378
+ 2.4.1
379
+ -----
380
+
381
+ 2016/08/11
382
+
383
+ ### Bug Fixes
384
+
385
+ (#634) Fix "undefined variable" error in "deploy module" action. (Special thanks
386
+ to Andreas Ntaflos (antaflos) for the fix.)
387
+
388
+ (#635) Reword some documentation around environment level purging.
389
+
390
+ 2.4.0
391
+ -----
392
+
393
+ 2016/08/10
394
+
395
+ ### New Features
396
+
397
+ (RK-222) New "install\_path" option for Git/SVN content.
398
+
399
+ This feature allows you to specify where inside an environment each item from the
400
+ Puppetfile should be installed to. See the [Puppetfile documentation](https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#per-item-install-path) for details.
401
+
402
+ (RK-246) New "environment" level purging and configurable purge levels.
403
+
404
+ You can now configure how r10k purges unmanaged content after a deployment. The
405
+ default behavior should be unchanged but there is a new "purge\_levels" configuration
406
+ option that can be used to enable new behavior or de-activate certain existing
407
+ behaviors. See the relevant [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd#purge_levels) for more details.
408
+
409
+ (RK-223) Ability to track control repo branch from content declarations.
410
+
411
+ Puppetfile content sourced from Git can now be configured to attempt to track the branch
412
+ name of the control repo branch being deployed. For example, if r10k is deploying
413
+ the 'production' branch of your control repo, it will try to also deploy the
414
+ 'production' branch of a given Puppetfile content repo. See the [documentation](https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#control-repo-branch-tracking)
415
+ for more details.
416
+
417
+ ### Internationalization
418
+
419
+ All user-facing strings generated by r10k have been externalized to enable future
420
+ iternationalization (i18n) and localization work.
421
+
422
+ ### Changed
423
+
424
+ (RK-258) Symlinks inside of Forge modules will no longer cause r10k to exit non-zero.
425
+ This situation used to raise an error but will now generate a WARN level log message
426
+ instead.
427
+
428
+ (#483) Local modifications to managed content will now be overwritten during "deploy"
429
+ actions. (Note: This change inadvertently also affected the "puppetfile install"
430
+ action in 2.4.0 and 2.4.1. This was fixed in 2.4.2. A command line flag to control
431
+ this behavior more explicitly will likely be added in a future version.)
432
+
433
+ ### Bug Fixes
434
+
435
+ (#616) Ensure that Forge module version strings are valid semantic versions. (Special
436
+ thanks to Patrick Robinson (patrobinson) for the fix.)
437
+
438
+ (#622) Fix typos in workflow docs. (Special thanks to Yury Frolov (mrdracon) for the
439
+ fix.)
440
+
441
+ 2.3.0
442
+ -----
443
+
444
+ 2016/05/17
445
+
446
+ ### New Features
447
+
448
+ (RK-236/RK-237) Added HTTP proxy support for Git operations.
449
+
450
+ Previously, r10k only supported the use of HTTP proxies for connecting to the Puppet
451
+ Forge. With these changes, r10k can now be configured to use an HTTP proxy for both
452
+ Forge and Git operations. Configuration can be specified globally, for Forge or Git
453
+ only, or on a per-Git repository basis. See [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd)
454
+ for more details.
455
+
456
+ ### Bug Fixes
457
+
458
+ (RK-238) When r10k encounters and ignores invalid file types in a module archive, it
459
+ will now log the message at the DEBUG1 level instead of at WARN.
460
+
461
+ (RK-243) In certain cases, when using the "rugged" Git provider, specifying invalid HTTP
462
+ credentials for a repository could result in an infinite loop. Authentication retry
463
+ for HTTP repositories is now capped at 50 attempts which matches the existing behavior
464
+ for SSH.
465
+
466
+ 2.2.2
467
+ -----
468
+
469
+ 2016/04/18
470
+
471
+ (RK-241) "deploy display" action does not properly format wrapped exceptions
472
+
473
+ The "deploy display" action was not capturing and logging exceptions in the same way as
474
+ other related actions. This meant that in many cases, when an error occurred, the
475
+ underlying cause was not being shown. Specifically, the "deploy display" action was
476
+ not benefitting from the improved error messaging for unreadable SSH keys which was
477
+ added in r10k 2.2.0 as part of RK-220.
478
+
479
+ 2.2.1
480
+ -----
481
+
482
+ 2016/04/14
483
+
484
+ (RK-229) Setting Forge proxy options breaks PE Authentication
485
+
486
+ A bug in the interaction between r10k and the puppet\_forge gem was preventing the correct
487
+ Authorization headers for Puppet Enterprise-only modules from being included with requests
488
+ to the Puppet Forge when r10k was also configured to use a proxy. This bug has been resolved
489
+ by adding new functionality to the puppet\_forge gem and updating r10k to use the new version.
490
+
491
+ 2.2.0
492
+ -----
493
+
494
+ 2016/03/08
495
+
496
+ ### Notes
497
+
498
+ (RK-154) Per-repo config for Git sources
499
+
500
+ Git repository options, such as the SSH private key, can now be set indepdently for each repository
501
+ when using the Rugged provider. See [documentation](https://github.com/puppetlabs/r10k/blob/master/doc/git/providers.mkd#ssh-configuration-1)
502
+ for details.
503
+
504
+ (RK-220) Improved error message for unreadable SSH keys
505
+
506
+ r10k will now check to ensure that the configured SSH private key for a given repository is readable
507
+ before attempting to connect. This will result in a clearer error message in situations where the
508
+ key file is not readable.
509
+
510
+ (CODEMGMT-453) Support for running under JRuby 1.7 with shellgit provider
511
+
512
+ r10k should now run successfully under JRuby 1.7.x when using the "shellgit" provider.
513
+
514
+ (MAINT) Documentation fixes
515
+
516
+ Various errors and inconsistencies in the documentation have been fixed thanks to contributions
517
+ from [Paul Tobias](https://github.com/tobiaspal), [Rob Nelson](https://github.com/rnelson0), and
518
+ [David Danzilio](https://github.com/danzilio). Thanks!
519
+
520
+ 2.1.1
521
+ -----
522
+
523
+ 2015/11/12
524
+
525
+ ### Notes
526
+
527
+ (CODEMGMT-440) Defer git alternates setup
528
+
529
+ The fix for RK-175 that updated the Git alternates file for repositories was happening too early, and
530
+ could cause issues when multiple r10k processes were running concurrently. This has been fixed so that
531
+ the alternates file update is deferred till the first time the git repository is actually accessed.
532
+
533
+ (RK-187) Consider thin repos with a .git file (not directory) to be mismatched
534
+
535
+ If a given Git thin repository had a .git file where r10k expected there to be a directory it would
536
+ behave badly; this has been fixed so that if r10k encounters this case it treats the repository as
537
+ mismatched.
538
+
539
+ (RK-181) Correctly set baseurl/proxy with shared PuppetForge URL
540
+
541
+ A combination of some odd connection handling behavior in the puppet_forge gem combined with some
542
+ bad assumptions in r10k prevented users from being able to actually set a custom forge baseurl;
543
+ this has been fixed.
544
+
545
+ 2.1.0
546
+ -----
547
+
548
+ 2015/10/28
549
+
550
+ ### Thanks
551
+
552
+ Thanks to the following contributors for their work on this release:
553
+
554
+ * [Abel Paz](https://github.com/apazga) fixing some broken links in the Git Environments documentation
555
+ * [Alex Rowley](https://github.com/rowleyaj) for surfacing the --puppetfile and --module options for
556
+ `r10k puppetfile install`
557
+ * [Austin Blatt](https://github.com/austb) (our summer intern!) for extracting the vendored Puppetforge
558
+ code and pushing it into the upstream puppet_forge gem.
559
+ * [Branan Riley](https://github.com/branan) for updating the quickstart guide for Puppet 4.
560
+ * [Darrell](https://github.com/darrell) for adding documentation for the :local module type
561
+ * [David Pashley](https://github.com/dpash) for documenting potential issues with Rugged/SSH on Ubuntu
562
+ * [Dennis](https://github.com/pskrz) for clarifying path information in the quickstart guide
563
+ * [E. Dunham](https://github.com/edunham) for adding an entry to the FAQ to explain the name of r10k
564
+ * [Kirill Kondratenko](https://github.com/cybem) for contributing the :local module type (RK-149)
565
+ * [Louis Mayorga](https://github.com/lmayorga1980) for finding and reporting RK-143, and testing fixes
566
+ for that issue.
567
+ * [Mark McKinstry](https://github.com/mmckinst) for fixing some broken links in the FAQ
568
+ * [Patrick Robinson](https://github.com/nemski) for submitting GH-516 to catch and handle
569
+ ArgumentErrors raised when loading Puppetfiles
570
+ * [Thomas Lapinski](https://github.com/thlapin) for fixing a bug where switching from a Git module to
571
+ a Forge module would incorrectly leave the Git module version installed.
572
+ * [Thomas Mueller](https://github.com/vinzent) for updating the r10k homepage link in the gemspec.
573
+
574
+ ### User notes
575
+
576
+ (RK-70) Expose Forge baseurl setting in r10k.yaml
577
+
578
+ The Puppet Forge URL can now be changed from the default forgeapi.puppetlabs.com to a user specified value.
579
+ This allows users to use private/testing Puppet Forge instances. See
580
+ https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd#baseurl
581
+ for documentation on using the baseurl setting.
582
+
583
+ (RK-96) Correctly switch from Forge modules to Git modules
584
+
585
+ If a Git version of a module had been installed via a Puppetfile and the Puppetfile entry was updated to
586
+ use the Forge version of the module, r10k would only check the metadata - and if the metadata of the Git
587
+ version matched then r10k would assume that the Forge module was installed. This has been fixed so that
588
+ when checking the status of a Forge module r10k specifically looks for a `.git` directory and considers
589
+ the module mismatched when the directory is present, which means that it will correctly replace a Git
590
+ version of a module with the Forge version.
591
+
592
+ (RK-142) Add machine readable output for `r10k deploy display`
593
+
594
+ The output format for `r10k deploy display` was a YAML-like, janky hand rolled version; this has been
595
+ replaced with the ability to specify an actual data format for the output. The default output type is
596
+ now YAML.
597
+
598
+ (GH-477) Add `--fetch` option for `r10k deploy display`
599
+
600
+ When `r10k deploy display` is run it might be useful to see which environments don't yet exist; the
601
+ added `--fetch` option allows r10k to update the environment sources to check for missing environments
602
+ when displaying environments.
603
+
604
+ (RK-143) Use argument vector when executing commands on Windows
605
+
606
+ R10k used the `Open3.capture3` call, and used to concatenate the string to execute and join it with
607
+ spaces. However Windows loves including spaces in file names, which creates all sort of weird behavior
608
+ especially when running shell commands over SSH to Windows. This has been fixed to use the argument
609
+ vector form of `capture3` to avoid these issues.
610
+
611
+ (RK-149) Add :local module type
612
+
613
+ The new :local module type allows users to add modules to the Puppetfile that are included in a control
614
+ repository, so that modules can be kept in the Puppetfile moduledir without them being destroyed.
615
+
616
+ (CODEMGMT-345) Write deploy signatures to a file
617
+
618
+ If the code deployed by r10k is copied to another location without the cached repos, it becomes impossible
619
+ to use Git to interact with the repository and see which version of code r10k deployed. R10k now creates a
620
+ `.r10k-deploy.json` file that records the time and SHA of the last code deployment.
621
+
622
+ (RK-80) Support non SSH key based authentication for rugged provider
623
+
624
+ An error in how the Rugged Git provider provided SSH credentials prevented HTTPS urls requiring authentication
625
+ to function. This has been fixed so that only SSH urls are provided ssh private key credentials, and HTTPS
626
+ urls can provided a username and password in the URL for authentication.
627
+
628
+ (RK-90) Don't raise an error when forge modules are duplicated
629
+
630
+ A bug in how r10k Forge modules created caused r10k to crash when two forge modules tried to create the same
631
+ directory. This has been fixed and restores the old behavior of letting the last module specified win.
632
+
633
+ In the long term trying to specify two modules with the same name will produce an error, but in the mean time
634
+ this fix restores existing behavior so that r10k won't roll over and die on error.
635
+
636
+ (RK-120) Enable --config as top level command option
637
+
638
+ R10k was originally built with environment deployment in mind, but the `r10k puppetfile` subcommand made this
639
+ assumption faulty. However the way the config file was loaded only worked with `r10k deploy` subcommands,
640
+ which prevented users from using a custom cachedir or use other settings when running `r10k puppetfile`. This has
641
+ been corrected so that r10k can always read a config file when running any subcommand.
642
+
643
+ (RK-175) Don't crash on unresolvable Rugged ref
644
+
645
+ When r10k was using the rugged provider, checking out an unresolvable ref would throw a TypeError because r10k
646
+ didn't always ensure that the ref was resolvable. This has been fixed so that r10k explicitly ensures that refs
647
+ can be resolved before it checks them out.
648
+
649
+ (RK-174) Always ensure alternates file is up to date
650
+
651
+ When r10k created a Git working repository it permanently linked the repository to a cached Git repository via
652
+ the Git alternates file. However if the cachedir setting changed, existing repositories would still reference
653
+ the old path which could very badly break Git. This has been fixed so that r10k always ensures that the alternates
654
+ file is up to date before any Git operations can happen, so that changing the cachedir will not break Git repositories.
655
+
656
+ (RK-169) Print validation failures for invalid configs
657
+
658
+ R10k used to have very lax handling of config file input, which would cause crashes during r10k runtime. This
659
+ has been fixed so that r10k validates all configuration before it runs and prints out all configuration
660
+ validation errors when validation fails.
661
+
662
+ (RK-21) Indicate error when deploying non-existent environment
663
+
664
+ When r10k was deploying a specific list of environments, it would skip any existing environment that didn't match
665
+ the desired list of environments. However this meant that deploying a non-existent environment would not
666
+ deploy any environments and r10k would silently exit with an exit code of 0. This has been fixed so that
667
+ when r10k deploys a list of environments it makes sure that each environment can be updated, and when requested
668
+ environments are missing it logs an error and exits with a non-zero exit code.
669
+
670
+ (RK-163) Add deploy/write_lock setting
671
+
672
+ Users can now prevent `r10k deploy` commands that change environments and modules from running via a config
673
+ option; this allows users to lock out code deployments at certain times (code freezes and times outside of
674
+ maintenance windows.)
675
+
676
+ (GH-516) Handle ArgumentError when loading Puppetfiles
677
+
678
+ The `r10k puppetfile check` command didn't output a very useful error when a module was given the wrong number
679
+ of arguments; this has been fixed so that r10k catches ArgumentErrors raised while loading a Puppetfile
680
+ and wraps it so that more information is added to the error message.
681
+
682
+ (GH-469) Add `--puppetfile` and `--moduledir` options to `r10k puppetfile install` subcommand
683
+
684
+ The `r10k puppetfile install` subcommand was able to set a custom puppetfile path and moduledir location
685
+ via environment variables to match librarian-puppet, but they accidentally didn't match the librarian-puppet
686
+ semantics - and environment variables aren't very nice to expose for configuring and application. The
687
+ `r10k puppetfile install` subcommand now supports command line flags to set these options.
688
+
689
+ (CODEMGMT-339) Add command line option to set cachedir
690
+
691
+ There are some scenarios where r10k needs to be run with a common config file, but on a specific basis
692
+ may need to set a custom cachedir. To make this work `r10k deploy` now supports a `--cachedir` setting
693
+ for these temporary overrides.
694
+
695
+ 2.0.3
696
+ -----
697
+
698
+ 2015/8/13
699
+
700
+ This is a bugfix release that resolves a critical issue issue in installing PE
701
+ only modules.
702
+
703
+ ### Notes
704
+
705
+ (RK-156) PE-only modules cannot be installed
706
+
707
+ The mechanism used to load PE license information in r10k was preventing r10k
708
+ from not being able to locate the pe-license Ruby library in PE 2015.2.0; this
709
+ has been resolved by actually trying to load the relevant files instead of
710
+ probing for a gem and then conditionally loading it.
711
+
712
+ 2.0.2
713
+ -----
714
+
715
+ 2015/06/18
716
+
717
+ This is a maintenance release that improves error messages around installing
718
+ modules from the Puppet Forge.
719
+
720
+ ### User notes
721
+
722
+ (RK-109) Add context to connection failure errors
723
+
724
+ If a connection to the Puppet Forge failed for any reason, the resulting
725
+ exception would indicate the error type but not the host or proxy host. This
726
+ made it hard to understand why connections were failing. This has been fixed so
727
+ that r10k will include the host and optional proxy host in error messages when
728
+ connections fail.
729
+
730
+ (RK-121) Improve error handling for nonexistent Forge modules
731
+
732
+ The r10k Puppet Forge connection error handling reports when HTTP requests fail,
733
+ but would simply print the HTTP status code on failure. For cases where a
734
+ nonexistent module or module release was queried, r10k now specially handles
735
+ HTTP 404 status codes and indicates that the module/module release is missing
736
+ instead of just throwing a generic HTTP error.
737
+
738
+ 2.0.1
739
+ -----
740
+
741
+ 2015/06/09
742
+
743
+ This release fixes a couple of issues and defects found in 2.0.0.
744
+
745
+ ### Thanks
746
+
747
+ Thanks to Tim Meusel (https://github.com/bastelfreak) and ktreese
748
+ (https://github.com/ktreese) for reporting GH-443 and GH-447.
749
+
750
+ ### User notes
751
+
752
+ (RK-117), (GH-443), (GH-447) Add minitar as runtime dependency
753
+
754
+ Minitar is a hard runtime dependency of r10k as part of the new Forge module
755
+ implementation, but was only added as a development dependency which means that
756
+ r10k could be installed without all of the required runtime dependencies. This
757
+ oversight has been corrected; r10k will now pull in minitar at installation
758
+ time.
759
+
760
+ (RK-118) Readd '/etc/r10k.yaml' to config search path
761
+
762
+ The '/etc/r10k.yaml' config path was deprecated in r10k 1.5.0, but this
763
+ deprecation was only a soft deprecation and was easy to miss. While 2.0.0 is a
764
+ backwards incompatible release it was too aggressive to remove this entirely, so
765
+ '/etc/r10k.yaml' will continue to be respected/read in r10k 2.x. If this file is
766
+ present and used then a deprecation notice will be logged. Apologies for the
767
+ churn on this!
768
+
769
+ 2.0.0
770
+ -----
771
+
772
+ 2015/06/08
773
+
774
+ This is a backwards incompatible feature release, but as major releases go this
775
+ is a pretty small one. Some changes introduced into master included some
776
+ breaking changes and SemVer dictates that we do a major release in this case.
777
+ Actual changes that will affect end users should be limited; the only one that
778
+ should have big impact is the removal of Ruby 1.8.7 support. Any other issues
779
+ encountered should be treated as bugs and will be fixed.
780
+
781
+ ### User notes
782
+
783
+ (GH-1) Native support for installing modules from the Puppet Forge
784
+
785
+ R10k can now directly install modules from the Puppet Forge, rather than
786
+ shelling out to the Puppet module tool. This will allow for later optimizations
787
+ like caching module downloads to speed up installing module across multiple
788
+ environments.
789
+
790
+ (RK-83) Allow '-' as a module name separator
791
+
792
+ (RK-53) Remove '/etc/r10k.yaml' from config file search path.
793
+
794
+ R10k 1.5.0 added '/etc/puppetlabs/r10k/r10k.yaml' to the paths checked while
795
+ looking for a config file, in order to keep in convention with the rest of the
796
+ Puppet Labs config files. In 2.0.0 the old location, '/etc/r10k.yaml', has been
797
+ removed.
798
+
799
+ (RK-57) Notify users of purgedirs key deprecation
800
+
801
+ The purgedirs key was used in r10k 0.0.9 but has not been used in the 1.x
802
+ release series; if this setting is given then r10k will generate a warning
803
+ indicating that it is not used.
804
+
805
+ ### Deprecations/Removals
806
+
807
+ (RK-47) Remove support for Ruby 1.8.7
808
+
809
+ Given that Ruby 1.8.7 has been EOL for nearly two years, it's time for r10k to
810
+ drop support for 1.8.7 as well. The Puppet 4 all in one package ships with Ruby
811
+ 2.1.6, so even if you're on a platform that doesn't have Ruby 1.9 or greater you
812
+ can install r10k into the Puppet collection environment and used the bundled
813
+ Ruby.
814
+
815
+ (RK-54) Remove deprecated subcommands
816
+
817
+ R10k 1.0.0 reorganized a number of subcommands but retained the old subcommand
818
+ names for compatibility with 0.0.x; since it's been over 2 years since 1.0.0 has
819
+ been released these commands have finally been removed.
820
+
821
+ (RK-113) Remove deprecated Task classes and namespaces
822
+
823
+ The R10K::Task namespace turned out to be unwieldy in practice and has been
824
+ replaced with the R10K::Action namespace. Use that for running r10k as an
825
+ application.
826
+
827
+ (RK-114) Remove deprecated git classes
828
+
829
+ The reorganization of the Git code in 1.5.0 rendered a number of classes
830
+ obsolete; they've been removed.
831
+
832
+ 1.5.1
833
+ -----
834
+
835
+ 2015/04/09
836
+
837
+ ### Thanks
838
+
839
+ Thanks to all the users that helped track down RK-86, and Zack Smith in specific
840
+ for tracing the source of the bug.
841
+
842
+ ### User notes
843
+
844
+ (RK-62) Warn when Rugged is compiled without SSH or HTTPS transports
845
+
846
+ If Rugged/libgit2 was compiled without libssh2, trying to access a Git
847
+ repository via SSH throws a fairly cryptic error. It's not terribly easy to
848
+ specially handle the error message that's being logged, but in lieu of that r10k
849
+ now checks the Rugged gem to make sure it's compiled with support for SSH and
850
+ HTTPS when the Rugged Git provider is used.
851
+
852
+ (RK-79) Bump minimum required version of faraday_middlware-multi_json
853
+
854
+ Faraday 0.9.0 changed the API for middleware plugins, which made it incompatible
855
+ with the faraday_middleware-multi_json plugin. That plugin supported the new API
856
+ in version 0.0.6 but the minimum required version in the r10k gemspec was not
857
+ updated, allowing r10k to be installed with incompatible versions of faraday and
858
+ faraday_middleware-multi_json. This has been fixed by requiring the minimum
859
+ compatible version of faraday_middleware-multi_json.
860
+
861
+ (RK-86) Git modules don't properly track branches
862
+
863
+ R10k 1.5.0 added smarter syncing for Git caches to reduce network traffic, but
864
+ it accidentally caused branches to stop tracking changes to the remote branch.
865
+ This has been fixed and the pre-1.5.0 behavior has been restored.
866
+
867
+ 1.5.0
868
+ -----
869
+
870
+ 2015/04/02
871
+
872
+ ### Announcements
873
+
874
+ Ruby 1.8.7 has had a good run, but it's time for r10k to think about moving on.
875
+ As of r10k 1.5.0, support for Ruby 1.8.7 is officially deprecated. Issues
876
+ affecting Ruby 1.8.7 will still be fixed, but will be of lower priority. Support
877
+ for Ruby 1.8.7 will be dropped entirely in r10k 2.0.0.
878
+
879
+ ### Thanks
880
+
881
+ Thanks to the following contributors for their work on this release:
882
+
883
+ * [Brett Swift](https://github.com/brettswift) for adding custom prefix values
884
+ for sources (RK-35)
885
+ * [Eli Young](https://github.com/elyscape) for adding additional debug
886
+ information to `r10k version` (RK-37)
887
+ * [Pete Fritchman](https://github.com/fetep) for removing a warning generated
888
+ under Ruby 2.2 (RK-55)
889
+ * [Theo Chatzimichos](https://github.com/tampakrap) for updating the
890
+ dependency versions for r10k
891
+ * [ETL](https://github.com/etlweather), [Ben S](https://github.com/juniorsysadmin),
892
+ and [Robert Nelson](https://github.com/rnelson0) for their documentation
893
+ contributions
894
+
895
+ ### User notes
896
+
897
+ (GH-57) Git based modules fail to detect presence of git binary
898
+
899
+ As part of RK-17, r10k now checks to make sure that the `git` binary is present
900
+ and executable before trying to run any commands. If Git is missing, r10k will
901
+ fail hard instead of trying to run and failing on the first failed command.
902
+
903
+ (GH-195) (RK-35) Allow sources to specify a custom prefix string
904
+
905
+ For r10k deployments that have separate sources for Puppet code and Hiera data,
906
+ the created environment paths must line up between the code and data repos. With
907
+ basic prefixing where the source name is used as the prefix string, it's not
908
+ possible to use prefixing and commonly named environments. This has been fixed
909
+ so that the source `prefix` option can be given true, false, or a string which
910
+ is a custom value to use for prefixing.
911
+
912
+ (RK-17) Add rugged/libgit2 based Git implementation
913
+
914
+ The libgit2 library and Ruby rugged gem provide a native interface to Git for
915
+ Ruby that is faster and more consistent than shelling out to Git. An additional
916
+ rugged based Git implementation has been added along the original 'shellgit'
917
+ implementation, and the implementations can be swapped out as needed.
918
+
919
+ (RK-24) Add '/etc/puppetlabs/r10k/r10k.yaml' to config search path
920
+
921
+ In order to be more consistent with the rest of the Puppet ecosystem, r10k will
922
+ now check for configuration in a standard location inside of '/etc/puppetlabs'.
923
+ The old location, '/etc/r10k.yaml' is still respected so no configuration change
924
+ is needed at this point, although the old location will be deprecated in the
925
+ future.
926
+
927
+ (RK-25) Warn if both '/etc/r10k.yaml' and '/etc/puppetlabs/r10k/r10k.yaml' exist
928
+
929
+ (RK-31) Remove undocumented search for 'r10k.yaml'
930
+
931
+ Early versions of r10k would try to search for 'r10k.yaml' in parent
932
+ directories, in the same manner that programs like Git and Bundler recursively
933
+ search for configuration. However this functionality isn't terribly useful, is a
934
+ bit surprising, and adds a lot of complexity. This behavior has been removed in
935
+ 1.5.0.
936
+
937
+ (RK-32, RK-33, RK-38) Provide configuration options for Git providers
938
+
939
+ The r10k Git providers can now be selected and configured via configuration in
940
+ r10k.yaml. See the [Git specific documentation](doc/git) for more information on
941
+ these settings.
942
+
943
+ (RK-37) Support higher verbosity levels for `r10k version`
944
+
945
+ If `r10k version` is run with the `--verbose` flag, diagnostic information about
946
+ r10k will be included along with version information.
947
+
948
+ (RK-39, RK-66) Improved logging/messaging
949
+
950
+ R10k now logs more information about what's going on and is more consistent
951
+ about which levels it displays messages.
952
+
953
+ (RK-74) Improved log formatting
954
+
955
+ The log formatting that r10k uses was added in some distant point in the past
956
+ where there were few users, and wasn't really designed with users in mind. The
957
+ formatting has been improved so that at lower log levels the formatting will
958
+ include the log level and nothing else, and at higher levels it will include
959
+ timing information.
960
+
961
+ (RK-75) Optional log coloring
962
+
963
+ At higher log levels r10k can produce a lot of logging information at a rapid
964
+ rate, and in general errors and warnings are not very visually distinct and easy
965
+ to miss. To help solve these problems r10k 1.5.0 now has optional colored
966
+ logging to help provide more information/context at a glance. Coloring can be
967
+ enabled with the `--color` option.
968
+
969
+ (GH-265) (RK-11) Unix commands with > 64KiB of output no longer deadlock
970
+
971
+ Unix pipes have a maximum buffer size of 64KiB, and if the pipe buffer fills
972
+ then subsequent writes will block. Since r10k used to wait for a subprocess to
973
+ finish before reading from the attached pipes, if the process filled the buffers
974
+ then the processes would deadlock.
975
+
976
+ This has been fixed by continually reading from the subprocess pipes to prevent
977
+ the buffers from filling up.
978
+
979
+ Unfortunately implementing this correctly requires reading from the pipes until
980
+ EOF, which breaks the ssh ControlPersist functionality. Supporting both the
981
+ ControlPersist functionality while preventing deadlock introduces too many
982
+ potential race conditions, so unfortunately workarounds for this issue can't be
983
+ accepted.
984
+
985
+ See https://bugzilla.mindrot.org/show_bug.cgi?id=1988 for more information about
986
+ the ssh ControlPersist bug.
987
+
988
+ ### Developer notes
989
+
990
+ (GH-142) Use Forge v3 API
991
+
992
+ R10k was using the old and deprecated v1 Forge API to determine the latest
993
+ version of Forge modules when using the `:latest` module version. This has been
994
+ fixed so that the v3 API is used.
995
+
996
+ (RK-16) Decouple Git platform dependent and independent code
997
+
998
+ The original code that interfaced r10k and Git was very tightly coupled; there
999
+ was no defined interface and it was expected that r10k would always shell out to
1000
+ Git. This has been fixed by extracting the shellout specific code to a library
1001
+ and defining a common interface for Git classes so that different Git
1002
+ implementations can be used. The existing shellout implementation has been
1003
+ renamed to 'shellgit' and should be functionally equivalent to the Git
1004
+ implementation in previous versions of r10k.
1005
+
1006
+ (RK-55, GH-355) Prevent warnings on Ruby 2.2
1007
+
1008
+ Ruby 2.2 generates warnings when comparing values and `#<=>` raises an
1009
+ exception; the code triggering this behavior has been cleaned up to prevent a
1010
+ warning from being logged.
1011
+
1012
+ (RK-65) Switch to using the semantic_puppet gem
1013
+
1014
+ R10k is switching from the old vendored copy of 'SemVer' that was stolen from
1015
+ Puppet to the 'semantic_puppet' gem, which is the library that Puppet now uses
1016
+ for version comparisons and parsing.
1017
+
1018
+ (RK-48) Ignore deleted versions when fetching latest module version
1019
+
1020
+ When looking up the latest version of a module on the Forge, if the latest
1021
+ version had been deleted r10k would try to install that deleted version anyways.
1022
+ This has been fixed so that all deleted module releases will be ignored.
1023
+
1024
+ 1.4.2
1025
+ -----
1026
+
1027
+ 2015/03/13
1028
+
1029
+ ### Announcements
1030
+
1031
+ The r10k ticket tracker is moving to the Puppet Labs issue tracker; new issues
1032
+ should be filed on the [R10K project](https://tickets.puppetlabs.com/browse/RK).
1033
+ The GitHub issue tracker will remain online for the near future but is
1034
+ deprecated in favor of JIRA. Issues from the GitHub tracker will be prefixed
1035
+ with "GH-"; issues from JIRA will be prefixed with "RK-".
1036
+
1037
+ ### User notes
1038
+
1039
+ (RK-4) Raise meaningful errors on missing sources
1040
+
1041
+ If the 'sources' key in r10k.yaml was left unset, was misspelled, or was empty,
1042
+ r10k try to blindly iterate through it as a hash and would subsequently raise an
1043
+ error. This has been remedied so that if the value is missing or empty an error
1044
+ will be raised.
1045
+
1046
+ Note that this doesn't handle the case where r10k.yaml is empty or malformed;
1047
+ that issue is being tracked as RK-34.
1048
+
1049
+ (GH-310, RK-36) `r10k deploy display -p --detail` fails on Ruby 1.8.7
1050
+
1051
+ Ruby 1.8.7 does not implement the comparison operator on Symbols, which was
1052
+ being used by the display command to ensure that hashes were printed in a
1053
+ consistent order. This has been fixed by backporting the Ruby 1.9 Symbol sorting
1054
+ to 1.8.7.
1055
+
1056
+ ### Thanks
1057
+
1058
+ Thanks to [Eli Young](https://github.com/elyscape) for reviewing PR 337 and
1059
+ providing helpful feedback.
1060
+
1061
+ 1.4.1
1062
+ -----
1063
+
1064
+ 2015/01/09
1065
+
1066
+ ### User notes
1067
+
1068
+ (GH-254) Puppetfile subcommands use non-zero exit codes on errors.
1069
+
1070
+ The Puppetfile `install` and `purge` commands would always exit with an exit
1071
+ code of 0, regardless of if any errors occurred or if there was no Puppetfile
1072
+ available. This has been now corrected so that runtime errors cause r10k to exit
1073
+ with a non-zero exit code.
1074
+
1075
+ (GH-260) Normalize deployed environment names on the command line.
1076
+
1077
+ Version 1.4.0 removed the environment name normalization needed to deploy
1078
+ environments that had their directory names normalized; this has been remedied
1079
+ so that environment names on the command line are also normalized to match the
1080
+ corrections that r10k will make to the environment names.
1081
+
1082
+ (GH-269) Improved error messages when trying to use non-existent Git refs.
1083
+
1084
+ If a Git module tried to use a Git ref that did not exist, it would output a
1085
+ particularly unhelpful error message that didn't indicate what actually failed.
1086
+ This has been fixed so that if an invalid ref is used, r10k will actually report
1087
+ that the ref could not be used. What a brave new world we inhabit!
1088
+
1089
+ (GH-271)/(GH-275) Report the name of invalid module names.
1090
+
1091
+ The fix for GH-92 released in 1.4.0 added better handling and parsing of module
1092
+ names, but also added stricter parsing of module names and disallowed invalid
1093
+ characters that Puppet itself could not use. However when r10k encountered such
1094
+ an invalid module name, it would not report the module with the invalid name,
1095
+ making debugging harder than needed. In 1.4.1 r10k when r10k encounters an
1096
+ invalid module name it reports the invalid module name in the error message.
1097
+
1098
+ ### Thanks
1099
+
1100
+ Thanks to the following contributors for their work on this release:
1101
+
1102
+ * [Lex Rivera](https://github.com/rlex) for discovering and reporting the r10k
1103
+ puppetfile exit code bug (GH-254).
1104
+ * [Eli Young](https://github.com/elyscape) for discovering and fixing the
1105
+ environment normalization bug (GH-260).
1106
+ * [Clayton O'Neill](https://github.com/dvorak) For adding better error
1107
+ reporting of invalid module names (GH-275).
1108
+
1109
+ Additional thanks to all those in #puppet and #r10k for endlessly helping new
1110
+ users of r10k, your assistance is invaluable!
1111
+
1112
+ ###
1113
+
1114
+ 1.4.0
1115
+ -----
1116
+
1117
+ 2014/12/2
1118
+
1119
+ ### User notes
1120
+
1121
+ (GH-40) Display expected and actual module versions
1122
+
1123
+ When displaying the state of a deployment, modules would report a version but
1124
+ would not indicate if that was the expected version or desired version. This has
1125
+ been changed so that both the expected and actual module version information is
1126
+ displayed. Because determining the actual version for modules can be slow the
1127
+ `--detail` flag must be passed to display this information.
1128
+
1129
+ (GH-43) Using a relative `moduledir` in the Puppetfile is relative to the Puppetfile
1130
+
1131
+ The `moduledir` setting in the Puppetfile could be used to set a custom
1132
+ directory for Puppetfile modules, but if a relative path was used it was
1133
+ relative to the current working directory. As of 1.4.0 a relative `moduledir`
1134
+ setting will be expanded to the Puppetfile, which should make it much easier to
1135
+ use a directory other than 'modules' for the Puppetfile installed modules.
1136
+
1137
+ (GH-68) Add alias for `r10k deploy display`
1138
+
1139
+ The `r10k deploy display` subcommand had unfriendly syntax, and now has an
1140
+ alias of `r10k deploy list`.
1141
+
1142
+ (GH-92) Support `mod 'owner/module'` for Git and SVN modules
1143
+
1144
+ The original implementation of Git and SVN based modules assumed that the module
1145
+ name was only the name component, and did not include the owner component of the
1146
+ module. Because of this the full module name was added to the path, which meant
1147
+ that a Git module or SVN module called `foo/bar` would be created as
1148
+ `$moduledir/foo/bar`, after which r10k would check for stale modules, see a
1149
+ module called `foo`, and delete it.
1150
+
1151
+ This has now been corrected so that all modules may have an owner and name, and
1152
+ only the name will be used when constructing the module path.
1153
+
1154
+ Issues also closed as part of GH-92:
1155
+
1156
+ * GH-78
1157
+
1158
+ (GH-96) Provide output from Git command failures
1159
+
1160
+ When r10k encounters an error while running a command, it will always log the
1161
+ failed command and the output of the command. This should make it dramatically
1162
+ easier to diagnose issues with the underlying commands used by r10k without
1163
+ having to re-run the failing r10k command with a myriad of command line flags.
1164
+
1165
+ Issues also closed as part of GH-96:
1166
+
1167
+ * GH-46
1168
+ * GH-94
1169
+
1170
+ (GH-121) Support for calling an arbitrary script after deployment
1171
+
1172
+ Users can now specify a `postrun` setting in `r10k.yaml` to run an arbitrary
1173
+ command after an environment deployment finishes. The current implementation is
1174
+ fairly simple and isn't passed additional information about the deployment and
1175
+ is mainly meant to notify other services that the deployment has completed.
1176
+ Future versions of r10k will provide more information to this command so that
1177
+ more complex actions can be taken on success and failure.
1178
+
1179
+ (GH-155) Allow SVN credentials to be added for modules/environments, disallow interactive SVN
1180
+
1181
+ When interacting with SVN modules, r10k could run SVN commands that could try to
1182
+ prompt the user for input but were not provided access to stdin. R10k is meant
1183
+ to be non-interactive so credentials need to be provided in some manner, but
1184
+ cannot be provided directly by the user.
1185
+
1186
+ As of 1.4.0 SVN environments and modules can supply a username and password to
1187
+ be used when interacting with the SVN remote, and SVN commands are run with
1188
+ `--non-interactive` to prevent commands from trying to grab stdin.
1189
+
1190
+ **Note**: SVN credentials are passed as command line options, so the SVN
1191
+ credentials may be visible in the process table when r10k is running. If you
1192
+ choose to supply SVN credentials make sure that the system running r10k is
1193
+ appropriately secured.
1194
+
1195
+ (GH-169) Perform non-blocking reads on stderr in Subprocess
1196
+
1197
+ When using SSH with a Control Master, the first time an SSH connection is
1198
+ launched it will persist and will hang onto stderr from the parent process.
1199
+ R10k was using blocking IO to read from child processes and assumed that the
1200
+ file descriptors would be closed when the launched process exited, and the
1201
+ persistent SSH process would cause r10k to hang.
1202
+
1203
+ The subprocess code has been updated to perform nonblocking reads of stderr;
1204
+ when the child process exits it assumes that even if stderr is held open nothing
1205
+ else should be written to it, drains the buffered pipe content and returns with
1206
+ that.
1207
+
1208
+ This is working around buggy behavior in SSH, but this problem doesn't look like
1209
+ it'll go away so the best course of action is to incorporate this fix into
1210
+ downstream.
1211
+
1212
+ (GH-180) Don't leak FDs when executing subcommands
1213
+
1214
+ R10k was not explicitly closing all file descriptors, and on Ruby 1.8.7 these
1215
+ would not be closed by the garbage collector, causing file descriptors to leak.
1216
+ This has been fixed and all file descriptors should be closed after each
1217
+ subprocess is invoked.
1218
+
1219
+ Major thanks to Jeremy Asher for discovering and fixing this.
1220
+
1221
+ (GH-193) Don't purge environments if environment sources can't be fetched
1222
+
1223
+ The original behavior for deploying environments with r10k was to fetch sources,
1224
+ deploy environments from those sources, and then clean up any orphaned
1225
+ environments. If a source had been fetched before but could not be reached then
1226
+ r10k would use the previously fetched branch information to update environments.
1227
+ In normal cases this would provide a reasonably robust failure mode.
1228
+
1229
+ However, this meant that if no sources had been be fetched or the source remote
1230
+ information was typoed, r10k would have no source information, could enumerate
1231
+ no environments, and then enter HULK SMASH mode where it would delete all
1232
+ unmanaged environments - AKA everything. This is an uncommon failure mode but
1233
+ could bite environments that were setting up r10k for the first time.
1234
+
1235
+ To resolve this issue, r10k will try to fetch all sources and if any source
1236
+ fails to be fetched then r10k will abort the entire deployment. This means that
1237
+ r10k will fail very early before any changes have been made which is a safe time
1238
+ to fail. If the errors were transitory then r10k can be run again, and if the
1239
+ failures are permanent then it's hard to safely update anything and extremely
1240
+ dangerous to try to delete any environments.
1241
+
1242
+ (GH-202) Different environments cannot manage the same path
1243
+
1244
+ R10k allowed for multiple sources to create environments but did not have
1245
+ semantics for environments from different sources managing the same path. If
1246
+ this happened, the resulting behavior would be undefined and could do any number
1247
+ of strange things. The approach to this was by convention and prefixing was
1248
+ recommended to avoid this, but it's still not a great approach.
1249
+
1250
+ This was resolved by looking for environment collisions before deploying; if
1251
+ collisions exist then r10k will abort the deployment.
1252
+
1253
+ Note: The commit that fixed this referenced GH-123 instead of GH-202.
1254
+
1255
+ (GH-214) Rescue SyntaxError and LoadError when evaluating Puppetfiles
1256
+
1257
+ Since Puppetfiles are just a Ruby DSL it's possible to have multiple Puppetfiles
1258
+ that are aggregated by using `require` or `load`. However these methods raise
1259
+ exceptions that don't descend from `StandardError`, so the normal error handling
1260
+ would not catch them, so a malformed Puppetfile could catastrophically crash
1261
+ r10k.
1262
+
1263
+ Because the Puppetfile is not an actual source file in the conventional sense we
1264
+ can recover from these errors and continue, so r10k will now recover from these
1265
+ errors. If a SyntaxError or LoadError is raised while evaluating a Puppetfile,
1266
+ r10k will rescue them and wrap them in an R10K::Error and then raise that, which
1267
+ can be caught and handled as a normal, non-critical exception.
1268
+
1269
+ (GH-221) Only deploy modules once for each environment deploy
1270
+
1271
+ If an environment was deployed for the first time and `--puppetfile` was
1272
+ specified, the initial creation would create the environment and then deploy
1273
+ modules, and then the modules would be deployed again because `--puppetfile` was
1274
+ separate code. The deploy logic has been refactored to consider `--puppetfile`
1275
+ being passed or the environment being created to be equivalent and will only
1276
+ deploy modules once.
1277
+
1278
+ ### Developer notes
1279
+
1280
+ `R10K::Environment::Base#sync` is no longer recursive; callers are expected to
1281
+ handle recursive updates if needed.
1282
+
1283
+ The `R10K::Action` namespace has been added to provide an API to r10k
1284
+ functionality. These should be used by any code that wants to interact with r10k
1285
+ and should provide an alternative to shelling out to r10k or using `R10K::CLI`
1286
+ directly. The individual action objects should be called through
1287
+ `R10K::Action::Runner` so that application setup and teardown is handled.
1288
+
1289
+ ### Thanks
1290
+
1291
+ Thanks to the following contributors for their work on this release:
1292
+
1293
+ * [Robert Nelson](https://github.com/rnelson0) for his work on documenting
1294
+ workflows and best practices with r10k and adding convenience aliases for
1295
+ `r10k deploy display`
1296
+ * [Wolf Noble](https://github.com/rmnwolf) for homogenizing markdown file
1297
+ extensions
1298
+ * [Thomas Bartelmess](https://github.com/tbartelmess) for updating the
1299
+ required version of cri
1300
+ * [Theo Chatzimichos](https://github.com/tampakrap) for correcting the license
1301
+ format to conform to SPDX
1302
+ * [Richard Raseley](https://github.com/richardraseley) for writing a
1303
+ quickstart guide for r10k
1304
+ * [Matthew Haughton](https://github.com/3flex) for fixing documentation typos
1305
+ * [Markus Frosch](https://github.com/lazyfrosch) for fixing a regression in
1306
+ how duplicate environments are checked for, before the regression was ever
1307
+ released. Good catch!
1308
+ * [Jeremy Asher](https://github.com/jeremyasher) for fixing file descriptor
1309
+ leaks and hanging on open file descriptors in the Subprocess module. Great
1310
+ sleuthing on this!
1311
+ * [Guzman Braso](https://github.com/guzmanbraso) for adding Debian support
1312
+ and fixing some bugs in the quickstart documentation.
1313
+ * [David Schmitt](https://github.com/DavidS) for fixing markdown syntax errors
1314
+ so that link URLs would render properly in GitHub
1315
+ * [Christophe Bliard](https://github.com/cbliard) for fixing the Puppetfile
1316
+ moduledir setting to treat relative paths as relative to the Puppetfile
1317
+ * [Christoph Föhrdes](https://github.com/cfoehrdes) For fixing a copy/paste
1318
+ error in the Puppetfile documentation
1319
+
1320
+ In addition to those who contributed to the code base, thanks to all those that
1321
+ reported and commented on issues; user input makes it much easier to make r10k a
1322
+ better project!
1323
+
1324
+ 1.3.5
1325
+ -----
1326
+
1327
+ 2014/11/13
1328
+
1329
+ ### User notes
1330
+
1331
+ (GH-212) Force use of json_pure on Ruby 1.8.7
1332
+
1333
+ Ruby 1.8.7 does not ship with a JSON library, so r10k has depended on json_pure
1334
+ to ensure that there's always a JSON library available. However there is a quirk
1335
+ in multi_json in how it probes for JSON implementations and may load the wrong
1336
+ gem, which percolates up and breaks the JSON parsing code used when querying for
1337
+ forge module versions. To resolve this, json_pure is always used on ruby 1.8.7.
1338
+
1339
+ 1.3.4
1340
+ -----
1341
+
1342
+ 2014/09/14
1343
+
1344
+ This bugfix release incorporates all fixes added in 1.2.4.
1345
+
1346
+ 1.3.3
1347
+ -----
1348
+
1349
+ 2014/09/11
1350
+
1351
+ ### User notes
1352
+
1353
+ (GH-178) Failing to fetch a source git repo can wipe out environments
1354
+
1355
+ When updating Git sources at the beginning of a deployment, if the fetch was
1356
+ interrupted r10k could cache an empty list of environments. This could cause
1357
+ r10k to remove all environments for that source. This was due to a method
1358
+ directly using a value that was supposed to be lazily evaluated and memoized. It
1359
+ has been fixed so that even if r10k cannot fetch a source it will still be able
1360
+ to deploy modules for environments, clean up removed environments, and correctly
1361
+ remove unmanaged environments.
1362
+
1363
+ (GH-186) Rescue SyntaxError when checking Puppetfile syntax
1364
+
1365
+ When a Puppetfile with invalid syntax is parsed it raises a SyntaxError,
1366
+ and the `r10k puppetfile check` code was not specifically handling that.
1367
+ Thus when checking an invalid file r10k was actually crashing and not
1368
+ gracefully handling the error. This was fixed to cleanly rescue the SyntaxError,
1369
+ optionally print stacktraces, and print an all ok message on success.
1370
+
1371
+ 1.3.2
1372
+ -----
1373
+
1374
+ 2014/07/27
1375
+
1376
+ This bugfix release incorporates all fixes added in 1.2.3.
1377
+
1378
+ 1.3.1
1379
+ -----
1380
+
1381
+ 2014/07/16
1382
+
1383
+ ### User notes
1384
+
1385
+ (GH-161) Deployments fail where a branch has \W in the git branch name
1386
+
1387
+ In 1.3.0 environment naming was partially reworked to allow better handling of
1388
+ per-environment deployment, but unfortunately this caused a regression where
1389
+ environments would be differently named in 1.3.0. This fix changes the
1390
+ environment deployment on a per-name basis to use the normalized name instead
1391
+ of the raw Git branch name.
1392
+
1393
+ This bugfix release also incorporates all fixes added in 1.2.2.
1394
+
1395
+ ### Thanks
1396
+
1397
+ Thanks to Chris Spence for his work on this release.
1398
+
1399
+ 1.3.0
1400
+ -----
1401
+
1402
+ 2014/06/07
1403
+
1404
+ ### User notes
1405
+
1406
+ #### (GH-104) SVN support for environments.
1407
+
1408
+ R10k can now dynamically generate enviroments based on SVN repositories. SVN
1409
+ repositories must SVN repositories must conform to the conventional SVN
1410
+ repository structure with the directories trunk/, branches/, and optionally
1411
+ tags/ in the root of the repository. The trunk/ directory is specifically
1412
+ mapped to the production environment, branches are created as environments with
1413
+ the name of the given branch.
1414
+
1415
+ Please note that since SVN support for environments should be considered
1416
+ preliminary and may still have some kinks to be worked out, so use it with
1417
+ caution in production.
1418
+
1419
+ #### (GH-112) Modules can be deployed in a single environment.
1420
+
1421
+ When deploying modules with `r10k deploy module <modules>`, users can specify
1422
+ the `-e <environment>` flag to update modules in a single environment.
1423
+
1424
+ #### (GH-117) Controllable behavior for invalid Git branches.
1425
+
1426
+ Git sources can now tune how r10k behaves when it encounters a git branch with
1427
+ a non-word character. Valid values are 'correct_and_warn' which emits a warning
1428
+ and sanitizes the environment name, 'correct' which silently corrects the
1429
+ environment, and 'error' which emits an error and ignores the environment.
1430
+
1431
+ ### Developer notes
1432
+
1433
+ #### IMPORTANT: as of 1.3.0, r10k is relaxing how it implements semantic versioning.
1434
+
1435
+ There are a lot of internal APIs in r10k that need to be improved or
1436
+ overhauled, and making changes in a backwards compatible manner has been
1437
+ impeding development on a number of important features. There's no indication
1438
+ that there are any consumers of the r10k internal APIs, and if that's the case
1439
+ then r10k doesn't help anyone by maintaining SemVer for its internal APIs.
1440
+
1441
+ As of 1.3.0, r10k is dropping guarantees about API compatibility for most of
1442
+ the core functionality. The `R10K::Task*` classes were designed to be the
1443
+ primary interface for external use and those will remain backwards compatible
1444
+ for 1.x. However any code around configuration parsing, deployments, sources,
1445
+ environments, and modules may have API changes in minor versions.
1446
+
1447
+ That being said, if you are using any of these APIs and you experience breakage,
1448
+ you're not out of luck. If an API change actually does affect you please report
1449
+ it as a bug and those specific APIs can probably be fixed up. Hopefully this
1450
+ will ease development of r10k while not making the lives of external developers
1451
+ too painful.
1452
+
1453
+ #### (GH-116) Allow alternate implementations of sources and environments
1454
+
1455
+ This allows the groundwork for allowing users to implement plugins for sources
1456
+ and environments. A real API specification for sources and environments has
1457
+ been started, and sources and environments can be defined at runtime. In the
1458
+ long run r10k will add a plugin system for loading additional code from
1459
+ Rubygems and other sources, so r10k will be extensible without requiring
1460
+ modifications to the source.
1461
+
1462
+ 1.2.4
1463
+ -----
1464
+
1465
+ 2014/09/14
1466
+
1467
+ ### User Notes
1468
+
1469
+ (GH-188) Call puppet module tool install with --force for downgrades
1470
+
1471
+ 1.2.3
1472
+ -----
1473
+
1474
+ 2014/07/27
1475
+
1476
+ ### User Notes
1477
+
1478
+ (GH-173) Fixed a bug with Ruby 1.8.7 with Pathname objects.
1479
+
1480
+ 1.2.2
1481
+ -----
1482
+
1483
+ 2014/07/16
1484
+
1485
+ ### User Notes
1486
+
1487
+ (GH-165) `r10k puppetfile` only consumes handled command line options.
1488
+
1489
+ Previously, passing `-v` or other commands when running `r10k puppetfile *`
1490
+ could result in this error:
1491
+
1492
+ r10k puppetfile install --help --trace
1493
+ Error while running: #<RuntimeError: Unrecognized options: help>
1494
+
1495
+ This was due to overly greedy code passing in all options from the command line
1496
+ to the TaskRunner. This has been fixed so only known options are passed along,
1497
+ and options that aren't relevant (such as :verbose) will be ignored.
1498
+
1499
+ (GH-158) Log levels are now documented in the command line --help pages.
1500
+
1501
+ (GH-137) Git remotes are now correctly updated.
1502
+
1503
+ A regression in the Git remote handling meant that git remotes would never be
1504
+ properly updated when switching Git environments and modules from one remote
1505
+ to another, and the git alternates file was never updated properly. This has
1506
+ been fixed so that when the Git remote is updated, all references to the
1507
+ remotes and alternates will be updated.
1508
+
1509
+ (GH-163) All Git tags are deleted when switching Git remotes
1510
+
1511
+ Git tags cannot necessarily be transferred from one Git repository to another,
1512
+ so when a Git repo has its remotes changed all tags are deleted to prevent stale
1513
+ tags from overwriting tags from the new repo.
1514
+
1515
+ 1.2.1
1516
+ -----
1517
+
1518
+ 2014/04/21
1519
+
1520
+ ### User Notes
1521
+
1522
+ (GH-93) r10k deploy subcommands now respect the --help flag.
1523
+
1524
+ (GH-100) The addition of a faster command execution library was POSIX centric,
1525
+ but there were a number of users that were running r10k on Windows, which brike
1526
+ their environments. Support for Windows has been re-added and Windows is now a
1527
+ supported platform for using the r10k puppetfile commands. Please note that
1528
+ r10k now requires Ruby 1.9.3 on Windows to function.
1529
+
1530
+ ### Thanks
1531
+
1532
+ Thanks to Sam Kottler and Daniel Dreier for their their work on this release.
1533
+
1534
+ 1.2.0
1535
+ -----
1536
+
1537
+ 2014/03/07
1538
+
1539
+ ### User Notes
1540
+
1541
+ Preliminary support for Puppetfile modules from SVN sources. SVN repositories
1542
+ can track the latest available revision or may be pinned to a specific revision.
1543
+
1544
+ Forge modules can now track the latest available version. This can be enabled by
1545
+ setting the module version to `:latest`.
1546
+
1547
+ Git based Puppetfile modules can now be specified as branches, tags, and
1548
+ commits. When tags and commits are specified r10k can perform optimizations
1549
+ when updating the given repositories to reduce network accesses.
1550
+
1551
+ Command execution has been greatly improved. The old library for executing
1552
+ commands (systemu) had very high overhead and was 50 - 100 times slower than
1553
+ %x[] or fork/exec. It's been replaced with a custom process execution
1554
+ implementation.
1555
+
1556
+ Modules can swap out sources. When an existing module is changed from Forge to
1557
+ Git, for instance, the existing module will be removed before the new module is
1558
+ installed. (GH-30)
1559
+
1560
+ 1.2.0rc2
1561
+ --------
1562
+
1563
+ 2014/02/27
1564
+
1565
+ ### Notes
1566
+
1567
+ Git repositories were not tracking their upstream remotes, repos should now
1568
+ properly update upstream changes.
1569
+
1570
+ Git reference clones now fetch their cache remotes immediately after the
1571
+ initial clone.
1572
+
1573
+ 1.2.0rc1
1574
+ --------
1575
+
1576
+ 2014/02/08
1577
+
1578
+ Release Candidate 1 for 1.2.0
1579
+
1580
+ 1.1.4
1581
+ -----
1582
+
1583
+ 2014-02-24
1584
+
1585
+ This is a backwards compatible bugfix release.
1586
+
1587
+ ### Notes
1588
+
1589
+ * (GH-90) Multiple environments with the same name but with different sources
1590
+ were previously colliding and some environments were being ignored. This has
1591
+ been fixed and all environments should be deployed when updates are run.
1592
+
1593
+ ### Thanks
1594
+
1595
+ Thanks to the following contributors for their their extraordinary patience and
1596
+ help in for chasing down GH-90:
1597
+
1598
+ * Andreas Ntaflos (antaflos)
1599
+ * Igor Galić (igalic)
1600
+
1601
+ 1.1.3
1602
+ -----
1603
+
1604
+ 2014-01-26
1605
+
1606
+ This is a backwards compatible maintenance release.
1607
+
1608
+ ### Notes
1609
+
1610
+ * (GH-82) Added all git managed files, including README.markdown, CHANGELOG,
1611
+ and LICENSE to the gemspec for better compatibility with non-gem packages.
1612
+
1613
+ 1.1.2
1614
+ -----
1615
+
1616
+ 2014-01-06
1617
+
1618
+ This is a backwards compatible maintenance release.
1619
+
1620
+ ### Developer notes
1621
+
1622
+ * If Puppet and r10k are required in the same namespace, it's possible for
1623
+ the vendored copy of SemVer to conflict with the Puppet version. This was
1624
+ fixed by renaming the copy vendored in r10k and putting it under a namespace.
1625
+
1626
+ 1.1.1
1627
+ -----
1628
+
1629
+ 2013-12-11
1630
+
1631
+ This is a backwards compatible bugfix release.
1632
+
1633
+ ### User notes
1634
+
1635
+ * (GH-48) Environment prefixing always defaults to off. Users were already
1636
+ using r10k with multiple sources but in different directories, and
1637
+ prefixing breaks this behavior. Since this was a backwards incompatible
1638
+ change this has to be rolled back.
1639
+ * (GH-64) Multiple sources in a single directory no longer purge each other.
1640
+
1641
+ ### Thanks
1642
+
1643
+ Thanks to the following contributors for their help in 1.1.1:
1644
+
1645
+ * Stig Sandbeck Mathisen
1646
+ * Gabriel M Schuyler
1647
+
1648
+ 1.1.0
1649
+ -----
1650
+
1651
+ 2013-09-30
1652
+
1653
+ This is a backwards compatible bugfix and feature release.
1654
+
1655
+ ### User notes
1656
+
1657
+ (GH-35) Puppetfiles can now specify a path to the moduledir, instead of assuming
1658
+ '/modules'. It can be set with the Puppetfile `moduledir` directive. Note that
1659
+ this is not compatible with librarian-puppet.
1660
+
1661
+ (GH-53) Multiple environment sources can now be specified in a single
1662
+ directory. When multiple sources are specified, each environment will be
1663
+ prefixed with the source name. This can be enabled and disabled with the
1664
+ source `prefix` option.
1665
+
1666
+ (GH-45) Documentation has been greatly expanded.
1667
+
1668
+ (GH-56) New subcommand: `r10k puppetfile check` allows you to validate the
1669
+ syntax of a Puppetfile.
1670
+
1671
+ (GH-66) Initial clones use `git checkout` when switching to a new branch
1672
+ instead of just `git reset`; without this change it would look like the wrong
1673
+ branch was checked out.
1674
+
1675
+ (GH-59) r10k can now pull from Pulp repositories for Forge based modules.
1676
+
1677
+ (GH-70) Handle unset HOME - in case that HOME is unset, assume that the current
1678
+ user is root. This mainly occurs when r10k is being run as the `prerun` command
1679
+ under Puppet.
1680
+
1681
+ ### Developer notes
1682
+
1683
+ The method mocking framework has been switched from mocha to rspec-mocks. Mocha
1684
+ is notoriously bad about breaking changes between versions and rspec-mocks is
1685
+ very robust, so Mocha has been ripped out and dropped as a dependency.
1686
+
1687
+ Rspec expectations now use the `expect(thing).to` syntax instead `thing.should`
1688
+
1689
+ A quasi settings framework has been extracted to make application settings less
1690
+ bad. In the long term a general application framework will be extracted from
1691
+ r10k to handle generic 'application' problems like this, but for now the settings
1692
+ framework is the way to handle singleton data.
1693
+
1694
+ R10K:Git::Cache object memoization has been extracted into a standalone class
1695
+ instead of being grafted onto the class. All hail the single responsibility
1696
+ principle!
1697
+
1698
+ R10K::Module code has been refactored. There's now a real base class instead of
1699
+ a hacky mixin with some metadata magic on top.
1700
+
1701
+ ### Thanks
1702
+
1703
+ Thanks to the following contributors for their help in 1.1.0:
1704
+
1705
+ * Alex Linden Levy
1706
+ * Abhay Chrungoo
1707
+ * Adam Vessey
1708
+ * Chuck Schweizer
1709
+ * Elias Probst
1710
+ * Greg Baker
1711
+ * Jochen Schalanda
1712
+ * Theo Chatzimichos
1713
+
1714
+ 1.0.0
1715
+ -----
1716
+
1717
+ 2013-05-30
1718
+
1719
+ This is a backwards incompatible bugfix and feature release.
1720
+
1721
+ ### Configuration
1722
+
1723
+ The configuration file format of 0.0.9 should be compatible with 1.0.0, and any
1724
+ issues with that should be considered a bug.
1725
+
1726
+ A longstanding issue was confusion between symbols and strings in r10k.yaml
1727
+ (GH-18). To resolve this, symbols and strings will be treated equally and
1728
+ should produce the same behavior. In the long run, symbols will probably be
1729
+ deprecated for the sake of conformity.
1730
+
1731
+ ### Command line invocation
1732
+
1733
+ A number of commands have been renamed. They still but will emit a deprecation
1734
+ warning and will redirect to the new command implementation. The only
1735
+ exceptions is the are the `r10k environment cache` and `r10k environment stale`
1736
+ commands, but they were pretty much useless anyways.
1737
+
1738
+ Log level verbosity can now be specified by level name instead of level number.
1739
+ If --verbose is passed without a level, it will set the log level to `info`.
1740
+
1741
+ ### Puppetfile support
1742
+
1743
+ r10k can be used to deploy modules from a standalone Puppetfile. See
1744
+ `r10k puppetfile` for more information.
1745
+
1746
+ Modules without a version in the format of 'foo/bar' will be assumed. (GH-21)
1747
+
1748
+ ### API
1749
+
1750
+ r10k handles versioning according to SemVer; since this is a major release this
1751
+ is a backwards incompatible API change. It's unlikely that this has had any
1752
+ extensions written on top of it, but if you have, then heads up. However, all
1753
+ versions of 1.x should be backwards compatible.
1754
+
1755
+ ### Bugfixes
1756
+
1757
+ A number of bugs were due to underlying architecture flaws. Part of 1.0.0 has
1758
+ been a significant architectural overhaul, so on top of all of the above
1759
+ changes there should be a lot of other bugs that have been fixed.