r10k 3.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +1 -0
- data/.github/pull_request_template.md +1 -0
- data/.github/workflows/docker.yml +56 -0
- data/.github/workflows/release.yml +36 -0
- data/.gitignore +9 -0
- data/.travis.yml +45 -0
- data/CHANGELOG.mkd +1759 -0
- data/CODEOWNERS +2 -0
- data/CONTRIBUTING.mkd +105 -0
- data/Gemfile +15 -0
- data/LICENSE +14 -0
- data/README.mkd +118 -0
- data/Rakefile +3 -0
- data/azure-pipelines.yml +86 -0
- data/bin/r10k +17 -0
- data/doc/common-patterns.mkd +44 -0
- data/doc/dynamic-environments.mkd +31 -0
- data/doc/dynamic-environments/configuration.mkd +669 -0
- data/doc/dynamic-environments/git-environments.mkd +75 -0
- data/doc/dynamic-environments/introduction.mkd +69 -0
- data/doc/dynamic-environments/master-configuration.mkd +40 -0
- data/doc/dynamic-environments/quickstart.mkd +201 -0
- data/doc/dynamic-environments/svn-environments.mkd +45 -0
- data/doc/dynamic-environments/usage.mkd +132 -0
- data/doc/dynamic-environments/workflow-guide.mkd +247 -0
- data/doc/faq.mkd +164 -0
- data/doc/git/cloning-and-mirroring.mkd +60 -0
- data/doc/git/providers.mkd +111 -0
- data/doc/puppetfile.mkd +309 -0
- data/doc/updating-your-puppetfile.mkd +38 -0
- data/docker/.gitignore +1 -0
- data/docker/.rspec +4 -0
- data/docker/Gemfile +11 -0
- data/docker/Makefile +89 -0
- data/docker/README.md +28 -0
- data/docker/r10k/Dockerfile +67 -0
- data/docker/r10k/adduser.sh +13 -0
- data/docker/r10k/docker-entrypoint.d/10-analytics.sh +30 -0
- data/docker/r10k/docker-entrypoint.sh +11 -0
- data/docker/r10k/release.Dockerfile +54 -0
- data/docker/spec/dockerfile_spec.rb +43 -0
- data/docker/spec/fixtures/Puppetfile +2 -0
- data/integration/Gemfile +19 -0
- data/integration/README.mkd +29 -0
- data/integration/Rakefile +77 -0
- data/integration/component/pre-suite/05_install_dev_r10k.rb +12 -0
- data/integration/files/README.mkd +4 -0
- data/integration/files/hiera.yaml +8 -0
- data/integration/files/modules/helloworld/manifests/init.pp +3 -0
- data/integration/files/modules/hieratest/manifests/init.pp +3 -0
- data/integration/files/modules/unicode/files/pretend_unicode +1 -0
- data/integration/files/modules/unicode/manifests/init.pp +6 -0
- data/integration/files/pre-suite/git_config.pp.erb +19 -0
- data/integration/files/pre-suite/prod_env.config +3 -0
- data/integration/files/r10k_conf.yaml.erb +9 -0
- data/integration/lib/README.mkd +4 -0
- data/integration/lib/git_utils.rb +205 -0
- data/integration/lib/master_manipulator.rb +205 -0
- data/integration/lib/r10k_utils.rb +222 -0
- data/integration/manifests/README.mkd +4 -0
- data/integration/pre-suite/00_pe_install.rb +6 -0
- data/integration/pre-suite/10_git_config.rb +48 -0
- data/integration/pre-suite/20_pe_r10k.rb +55 -0
- data/integration/pre-suite/README.mkd +5 -0
- data/integration/tests/Puppetfile/HTTP_PROXY_affects_forge_source.rb +72 -0
- data/integration/tests/Puppetfile/HTTP_PROXY_affects_git_source.rb +70 -0
- data/integration/tests/README.mkd +4 -0
- data/integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb +83 -0
- data/integration/tests/basic_functionality/negative/neg_deploy_with_invalid_r10k_yaml.rb +51 -0
- data/integration/tests/basic_functionality/negative/neg_deploy_with_missing_r10k_yaml.rb +28 -0
- data/integration/tests/basic_functionality/negative/neg_invalid_git_provider.rb +45 -0
- data/integration/tests/basic_functionality/negative/negative_bad_proxy.rb +34 -0
- data/integration/tests/basic_functionality/proxy_specified_in_configuration.rb +103 -0
- data/integration/tests/basic_functionality/proxy_with_pe_only_module.rb +128 -0
- data/integration/tests/basic_functionality/proxy_with_puppetfile.rb +61 -0
- data/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb +109 -0
- data/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb +108 -0
- data/integration/tests/command_line/deploy_env_without_mod_update.rb +76 -0
- data/integration/tests/command_line/negative/neg_deploy_env_with_module_update.rb +77 -0
- data/integration/tests/command_line/negative/neg_invalid_cmd_line_arg.rb +23 -0
- data/integration/tests/git_source/HTTP_proxy_and_git_source.rb +70 -0
- data/integration/tests/git_source/git_source_git.rb +128 -0
- data/integration/tests/git_source/git_source_ssh.rb +87 -0
- data/integration/tests/git_source/git_source_submodule.rb +70 -0
- data/integration/tests/git_source/negative/neg_git_broken_remote.rb +38 -0
- data/integration/tests/git_source/negative/neg_git_unauthorized_https.rb +46 -0
- data/integration/tests/git_source/negative/neg_git_unauthorized_ssh.rb +73 -0
- data/integration/tests/git_source/negative/neg_git_unicode_branch.rb +35 -0
- data/integration/tests/i18n/deploy_module_with_unicode_in_file_name.rb +64 -0
- data/integration/tests/purging/content_not_purged_at_root.rb +89 -0
- data/integration/tests/purging/default_purging.rb +125 -0
- data/integration/tests/purging/does_not_purge_files_on_white_list.rb +93 -0
- data/integration/tests/purging/invalid_whitelist_types.rb +63 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_1000_branches.rb +66 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module.rb +111 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module_static.rb +117 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_hiera.rb +100 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_multi_source.rb +133 -0
- data/integration/tests/user_scenario/basic_workflow/multi_source_custom_forge_git_module.rb +161 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_basedir.rb +46 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_forge_module.rb +48 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module.rb +45 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module_ref.rb +43 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_remote.rb +45 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_branch_name_collision.rb +64 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +75 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_duplicate_module_names.rb +44 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_inaccessible_forge.rb +58 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb +34 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_invalid_puppet_file.rb +36 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb +49 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_read_only.rb +58 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_specify_deleted_forge_module.rb +51 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +75 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_git_module.rb +104 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_module.rb +81 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_custom_module.rb +49 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +75 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_module_already_installed.rb +82 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_module_last_release_deleted.rb +68 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_non-existent_base_dir.rb +94 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb +93 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_switch_forge_git_module.rb +117 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_unicode_paths.rb +60 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_upgrade_forge_mod_revert_change.rb +166 -0
- data/integration/tests/user_scenario/complex_workflow/multi_env_add_change_remove.rb +163 -0
- data/integration/tests/user_scenario/complex_workflow/multi_env_remove_re-add.rb +111 -0
- data/integration/tests/user_scenario/complex_workflow/multi_env_unamanaged.rb +78 -0
- data/integration/tests/user_scenario/complex_workflow/single_env_git_module_update.rb +100 -0
- data/lib/r10k.rb +11 -0
- data/lib/r10k/action/base.rb +31 -0
- data/lib/r10k/action/cri_runner.rb +72 -0
- data/lib/r10k/action/deploy.rb +9 -0
- data/lib/r10k/action/deploy/deploy_helpers.rb +34 -0
- data/lib/r10k/action/deploy/display.rb +89 -0
- data/lib/r10k/action/deploy/environment.rb +196 -0
- data/lib/r10k/action/deploy/module.rb +84 -0
- data/lib/r10k/action/puppetfile.rb +10 -0
- data/lib/r10k/action/puppetfile/check.rb +31 -0
- data/lib/r10k/action/puppetfile/cri_runner.rb +26 -0
- data/lib/r10k/action/puppetfile/install.rb +45 -0
- data/lib/r10k/action/puppetfile/purge.rb +28 -0
- data/lib/r10k/action/runner.rb +96 -0
- data/lib/r10k/action/visitor.rb +31 -0
- data/lib/r10k/cli.rb +51 -0
- data/lib/r10k/cli/deploy.rb +114 -0
- data/lib/r10k/cli/ext/logging.rb +15 -0
- data/lib/r10k/cli/help.rb +7 -0
- data/lib/r10k/cli/puppetfile.rb +74 -0
- data/lib/r10k/cli/version.rb +31 -0
- data/lib/r10k/deployment.rb +132 -0
- data/lib/r10k/deployment/config.rb +56 -0
- data/lib/r10k/environment.rb +37 -0
- data/lib/r10k/environment/bare.rb +16 -0
- data/lib/r10k/environment/base.rb +150 -0
- data/lib/r10k/environment/git.rb +81 -0
- data/lib/r10k/environment/name.rb +86 -0
- data/lib/r10k/environment/svn.rb +91 -0
- data/lib/r10k/environment/with_modules.rb +139 -0
- data/lib/r10k/errors.rb +61 -0
- data/lib/r10k/errors/formatting.rb +28 -0
- data/lib/r10k/feature.rb +56 -0
- data/lib/r10k/feature/collection.rb +23 -0
- data/lib/r10k/features.rb +20 -0
- data/lib/r10k/forge/module_release.rb +228 -0
- data/lib/r10k/git.rb +196 -0
- data/lib/r10k/git/alternates.rb +63 -0
- data/lib/r10k/git/cache.rb +108 -0
- data/lib/r10k/git/errors.rb +34 -0
- data/lib/r10k/git/rugged.rb +17 -0
- data/lib/r10k/git/rugged/bare_repository.rb +85 -0
- data/lib/r10k/git/rugged/base_repository.rb +93 -0
- data/lib/r10k/git/rugged/cache.rb +11 -0
- data/lib/r10k/git/rugged/credentials.rb +91 -0
- data/lib/r10k/git/rugged/thin_repository.rb +89 -0
- data/lib/r10k/git/rugged/working_repository.rb +145 -0
- data/lib/r10k/git/shellgit.rb +9 -0
- data/lib/r10k/git/shellgit/bare_repository.rb +43 -0
- data/lib/r10k/git/shellgit/base_repository.rb +137 -0
- data/lib/r10k/git/shellgit/cache.rb +11 -0
- data/lib/r10k/git/shellgit/thin_repository.rb +69 -0
- data/lib/r10k/git/shellgit/working_repository.rb +111 -0
- data/lib/r10k/git/stateful_repository.rb +95 -0
- data/lib/r10k/initializers.rb +67 -0
- data/lib/r10k/instance_cache.rb +32 -0
- data/lib/r10k/keyed_factory.rb +39 -0
- data/lib/r10k/logging.rb +109 -0
- data/lib/r10k/logging/terminaloutputter.rb +36 -0
- data/lib/r10k/module.rb +38 -0
- data/lib/r10k/module/base.rb +113 -0
- data/lib/r10k/module/forge.rb +177 -0
- data/lib/r10k/module/git.rb +109 -0
- data/lib/r10k/module/local.rb +36 -0
- data/lib/r10k/module/metadata_file.rb +31 -0
- data/lib/r10k/module/svn.rb +112 -0
- data/lib/r10k/puppetfile.rb +286 -0
- data/lib/r10k/settings.rb +194 -0
- data/lib/r10k/settings/collection.rb +123 -0
- data/lib/r10k/settings/container.rb +97 -0
- data/lib/r10k/settings/definition.rb +124 -0
- data/lib/r10k/settings/enum_definition.rb +30 -0
- data/lib/r10k/settings/helpers.rb +38 -0
- data/lib/r10k/settings/list.rb +107 -0
- data/lib/r10k/settings/loader.rb +99 -0
- data/lib/r10k/settings/mixin.rb +54 -0
- data/lib/r10k/settings/uri_definition.rb +19 -0
- data/lib/r10k/source.rb +42 -0
- data/lib/r10k/source/base.rb +74 -0
- data/lib/r10k/source/exec.rb +51 -0
- data/lib/r10k/source/git.rb +142 -0
- data/lib/r10k/source/hash.rb +182 -0
- data/lib/r10k/source/svn.rb +136 -0
- data/lib/r10k/source/yaml.rb +20 -0
- data/lib/r10k/source/yamldir.rb +32 -0
- data/lib/r10k/svn.rb +6 -0
- data/lib/r10k/svn/remote.rb +68 -0
- data/lib/r10k/svn/working_dir.rb +125 -0
- data/lib/r10k/util/attempt.rb +84 -0
- data/lib/r10k/util/basedir.rb +65 -0
- data/lib/r10k/util/commands.rb +31 -0
- data/lib/r10k/util/exec_env.rb +36 -0
- data/lib/r10k/util/license.rb +24 -0
- data/lib/r10k/util/platform.rb +42 -0
- data/lib/r10k/util/purgeable.rb +88 -0
- data/lib/r10k/util/setopts.rb +55 -0
- data/lib/r10k/util/subprocess.rb +84 -0
- data/lib/r10k/util/subprocess/result.rb +56 -0
- data/lib/r10k/util/subprocess/runner.rb +26 -0
- data/lib/r10k/util/subprocess/runner/jruby.rb +23 -0
- data/lib/r10k/util/subprocess/runner/posix.rb +103 -0
- data/lib/r10k/util/subprocess/runner/pump.rb +59 -0
- data/lib/r10k/util/subprocess/runner/windows.rb +23 -0
- data/lib/r10k/util/subprocess/subprocess_error.rb +24 -0
- data/lib/r10k/util/symbolize_keys.rb +35 -0
- data/lib/r10k/version.rb +6 -0
- data/locales/config.yaml +21 -0
- data/locales/r10k.pot +545 -0
- data/r10k.gemspec +50 -0
- data/r10k.yaml.example +112 -0
- data/spec/fixtures/empty/.empty +0 -0
- data/spec/fixtures/integration/git/puppet-boolean-bare.tar +0 -0
- data/spec/fixtures/module/forge/bad_module/metadata.json +1 -0
- data/spec/fixtures/module/forge/eight_hundred/Modulefile +8 -0
- data/spec/fixtures/module/forge/eight_hundred/metadata.json +19 -0
- data/spec/fixtures/unit/action/r10k.yaml +5 -0
- data/spec/fixtures/unit/action/r10k_cachedir.yaml +2 -0
- data/spec/fixtures/unit/action/r10k_generate_types.yaml +3 -0
- data/spec/fixtures/unit/action/r10k_puppet_path.yaml +3 -0
- data/spec/fixtures/unit/puppetfile/argument-error/Puppetfile +1 -0
- data/spec/fixtures/unit/puppetfile/default-branch-override/Puppetfile +5 -0
- data/spec/fixtures/unit/puppetfile/duplicate-module-error/Puppetfile +10 -0
- data/spec/fixtures/unit/puppetfile/invalid-syntax/Puppetfile +1 -0
- data/spec/fixtures/unit/puppetfile/load-error/Puppetfile +1 -0
- data/spec/fixtures/unit/puppetfile/name-error/Puppetfile +1 -0
- data/spec/fixtures/unit/puppetfile/valid-forge-with-version/Puppetfile +1 -0
- data/spec/fixtures/unit/puppetfile/valid-forge-without-version/Puppetfile +1 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/expected_1 +0 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/subdir_expected_1 +0 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/subdir_unmanaged_1 +0 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/unmanaged_1 +0 -0
- data/spec/fixtures/unit/util/purgeable/managed_two/expected_2 +0 -0
- data/spec/fixtures/unit/util/purgeable/managed_two/unmanaged_2 +0 -0
- data/spec/fixtures/unit/util/subprocess/runner/no-execute.sh +3 -0
- data/spec/integration/git/rugged/bare_repository_spec.rb +13 -0
- data/spec/integration/git/rugged/thin_repository_spec.rb +14 -0
- data/spec/integration/git/rugged/working_repository_spec.rb +48 -0
- data/spec/integration/git/shellgit/bare_repository_spec.rb +13 -0
- data/spec/integration/git/shellgit/thin_repository_spec.rb +14 -0
- data/spec/integration/git/shellgit/working_repository_spec.rb +13 -0
- data/spec/integration/git/stateful_repository_spec.rb +159 -0
- data/spec/matchers/exit_with.rb +28 -0
- data/spec/matchers/match_realpath.rb +18 -0
- data/spec/r10k-mocks.rb +3 -0
- data/spec/r10k-mocks/mock_config.rb +33 -0
- data/spec/r10k-mocks/mock_env.rb +15 -0
- data/spec/r10k-mocks/mock_source.rb +13 -0
- data/spec/shared-contexts/git-fixtures.rb +55 -0
- data/spec/shared-examples/deploy-actions.rb +69 -0
- data/spec/shared-examples/git-repository.rb +38 -0
- data/spec/shared-examples/git/bare_repository.rb +132 -0
- data/spec/shared-examples/git/thin_repository.rb +26 -0
- data/spec/shared-examples/git/working_repository.rb +207 -0
- data/spec/shared-examples/puppetfile-action.rb +39 -0
- data/spec/shared-examples/settings/ancestry.rb +44 -0
- data/spec/shared-examples/subprocess-runner.rb +83 -0
- data/spec/spec_helper.rb +40 -0
- data/spec/unit/action/cri_runner_spec.rb +72 -0
- data/spec/unit/action/deploy/deploy_helpers_spec.rb +38 -0
- data/spec/unit/action/deploy/display_spec.rb +31 -0
- data/spec/unit/action/deploy/environment_spec.rb +395 -0
- data/spec/unit/action/deploy/module_spec.rb +139 -0
- data/spec/unit/action/puppetfile/check_spec.rb +41 -0
- data/spec/unit/action/puppetfile/cri_runner_spec.rb +47 -0
- data/spec/unit/action/puppetfile/install_spec.rb +84 -0
- data/spec/unit/action/puppetfile/purge_spec.rb +42 -0
- data/spec/unit/action/runner_spec.rb +213 -0
- data/spec/unit/action/visitor_spec.rb +39 -0
- data/spec/unit/cli_spec.rb +9 -0
- data/spec/unit/deployment/config_spec.rb +33 -0
- data/spec/unit/deployment_spec.rb +162 -0
- data/spec/unit/environment/base_spec.rb +109 -0
- data/spec/unit/environment/git_spec.rb +97 -0
- data/spec/unit/environment/name_spec.rb +135 -0
- data/spec/unit/environment/svn_spec.rb +133 -0
- data/spec/unit/errors/formatting_spec.rb +84 -0
- data/spec/unit/feature_spec.rb +50 -0
- data/spec/unit/forge/module_release_spec.rb +213 -0
- data/spec/unit/git/alternates_spec.rb +116 -0
- data/spec/unit/git/cache_spec.rb +55 -0
- data/spec/unit/git/rugged/cache_spec.rb +29 -0
- data/spec/unit/git/rugged/credentials_spec.rb +109 -0
- data/spec/unit/git/shellgit/cache_spec.rb +27 -0
- data/spec/unit/git/stateful_repository_spec.rb +40 -0
- data/spec/unit/git_spec.rb +102 -0
- data/spec/unit/initializers_spec.rb +68 -0
- data/spec/unit/instance_cache_spec.rb +78 -0
- data/spec/unit/keyed_factory_spec.rb +51 -0
- data/spec/unit/logging/terminaloutputter_spec.rb +53 -0
- data/spec/unit/logging_spec.rb +68 -0
- data/spec/unit/module/base_spec.rb +72 -0
- data/spec/unit/module/forge_spec.rb +207 -0
- data/spec/unit/module/git_spec.rb +274 -0
- data/spec/unit/module/metadata_file_spec.rb +68 -0
- data/spec/unit/module/svn_spec.rb +178 -0
- data/spec/unit/module_spec.rb +29 -0
- data/spec/unit/puppetfile_spec.rb +300 -0
- data/spec/unit/settings/collection_spec.rb +123 -0
- data/spec/unit/settings/container_spec.rb +92 -0
- data/spec/unit/settings/definition_spec.rb +79 -0
- data/spec/unit/settings/enum_definition_spec.rb +20 -0
- data/spec/unit/settings/inheritance_spec.rb +38 -0
- data/spec/unit/settings/list_spec.rb +88 -0
- data/spec/unit/settings/loader_spec.rb +110 -0
- data/spec/unit/settings/uri_definition_spec.rb +23 -0
- data/spec/unit/settings_spec.rb +246 -0
- data/spec/unit/source/base_spec.rb +31 -0
- data/spec/unit/source/exec_spec.rb +81 -0
- data/spec/unit/source/git_spec.rb +185 -0
- data/spec/unit/source/hash_spec.rb +54 -0
- data/spec/unit/source/svn_spec.rb +196 -0
- data/spec/unit/source/yaml_spec.rb +42 -0
- data/spec/unit/source_spec.rb +10 -0
- data/spec/unit/svn/remote_spec.rb +21 -0
- data/spec/unit/svn/working_dir_spec.rb +56 -0
- data/spec/unit/util/attempt_spec.rb +82 -0
- data/spec/unit/util/commands_spec.rb +61 -0
- data/spec/unit/util/exec_env_spec.rb +56 -0
- data/spec/unit/util/purgeable_spec.rb +230 -0
- data/spec/unit/util/setopts_spec.rb +59 -0
- data/spec/unit/util/subprocess/result_spec.rb +36 -0
- data/spec/unit/util/subprocess/runner/posix_spec.rb +7 -0
- data/spec/unit/util/subprocess/runner/pump_spec.rb +79 -0
- data/spec/unit/util/subprocess/runner/windows_spec.rb +7 -0
- data/spec/unit/util/subprocess/subprocess_error_spec.rb +26 -0
- data/spec/unit/util/subprocess_spec.rb +65 -0
- data/spec/unit/util/symbolize_keys_spec.rb +67 -0
- metadata +582 -0
data/docker/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
TEST-rspec.xml
|
data/docker/.rspec
ADDED
data/docker/Gemfile
ADDED
data/docker/Makefile
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
PUPPERWARE_ANALYTICS_STREAM ?= dev
|
2
|
+
NAMESPACE ?= puppet
|
3
|
+
git_describe = $(shell git describe --tags)
|
4
|
+
vcs_ref := $(shell git rev-parse HEAD)
|
5
|
+
build_date := $(shell date -u +%FT%T)
|
6
|
+
hadolint_available := $(shell hadolint --help > /dev/null 2>&1; echo $$?)
|
7
|
+
hadolint_command := hadolint
|
8
|
+
hadolint_container := hadolint/hadolint:latest
|
9
|
+
export BUNDLE_PATH = $(PWD)/.bundle/gems
|
10
|
+
export BUNDLE_BIN = $(PWD)/.bundle/bin
|
11
|
+
export GEMFILE = $(PWD)/Gemfile
|
12
|
+
export DOCKER_BUILDKIT = 1
|
13
|
+
|
14
|
+
ifeq ($(IS_RELEASE),true)
|
15
|
+
VERSION ?= $(shell echo $(git_describe) | sed 's/-.*//')
|
16
|
+
PUBLISHED_VERSION ?= $(shell curl --silent 'https://rubygems.org/api/v1/gems/r10k.json' | jq '."version"' | tr -d '"')
|
17
|
+
CONTAINER_EXISTS = $(shell DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect $(NAMESPACE)/r10k:$(VERSION) > /dev/null 2>&1; echo $$?)
|
18
|
+
ifeq ($(CONTAINER_EXISTS),0)
|
19
|
+
SKIP_BUILD ?= true
|
20
|
+
else ifneq ($(VERSION),$(PUBLISHED_VERSION))
|
21
|
+
SKIP_BUILD ?= true
|
22
|
+
endif
|
23
|
+
|
24
|
+
LATEST_VERSION ?= latest
|
25
|
+
dockerfile := release.Dockerfile
|
26
|
+
dockerfile_context := r10k
|
27
|
+
else
|
28
|
+
VERSION ?= edge
|
29
|
+
IS_LATEST := false
|
30
|
+
dockerfile := Dockerfile
|
31
|
+
dockerfile_context := $(PWD)/..
|
32
|
+
endif
|
33
|
+
|
34
|
+
prep:
|
35
|
+
@git fetch --unshallow 2> /dev/null ||:
|
36
|
+
@git fetch origin 'refs/tags/*:refs/tags/*'
|
37
|
+
ifeq ($(SKIP_BUILD),true)
|
38
|
+
@echo "SKIP_BUILD is true, exiting with 1"
|
39
|
+
@exit 1
|
40
|
+
endif
|
41
|
+
|
42
|
+
lint:
|
43
|
+
ifeq ($(hadolint_available),0)
|
44
|
+
@$(hadolint_command) r10k/$(dockerfile)
|
45
|
+
else
|
46
|
+
@docker pull $(hadolint_container)
|
47
|
+
@docker run --rm -v $(PWD)/r10k/$(dockerfile):/Dockerfile -i $(hadolint_container) $(hadolint_command) Dockerfile
|
48
|
+
endif
|
49
|
+
|
50
|
+
build: prep
|
51
|
+
docker build \
|
52
|
+
${DOCKER_BUILD_FLAGS} \
|
53
|
+
--pull \
|
54
|
+
--build-arg vcs_ref=$(vcs_ref) \
|
55
|
+
--build-arg build_date=$(build_date) \
|
56
|
+
--build-arg version=$(VERSION) \
|
57
|
+
--build-arg pupperware_analytics_stream=$(PUPPERWARE_ANALYTICS_STREAM) \
|
58
|
+
--file r10k/$(dockerfile) \
|
59
|
+
--tag $(NAMESPACE)/r10k:$(VERSION) $(dockerfile_context)
|
60
|
+
ifeq ($(IS_LATEST),true)
|
61
|
+
@docker tag $(NAMESPACE)/r10k:$(VERSION) puppet/r10k:$(LATEST_VERSION)
|
62
|
+
endif
|
63
|
+
|
64
|
+
test: prep
|
65
|
+
@bundle install --path $$BUNDLE_PATH --gemfile $$GEMFILE --with test
|
66
|
+
@bundle update
|
67
|
+
@PUPPET_TEST_DOCKER_IMAGE=$(NAMESPACE)/r10k:$(VERSION) \
|
68
|
+
bundle exec --gemfile $$GEMFILE \
|
69
|
+
rspec spec
|
70
|
+
|
71
|
+
push-image: prep
|
72
|
+
@docker push $(NAMESPACE)/r10k:$(VERSION)
|
73
|
+
ifeq ($(IS_LATEST),true)
|
74
|
+
@docker push $(NAMESPACE)/r10k:$(LATEST_VERSION)
|
75
|
+
endif
|
76
|
+
|
77
|
+
push-readme:
|
78
|
+
@docker pull sheogorath/readme-to-dockerhub
|
79
|
+
@docker run --rm \
|
80
|
+
-v $(PWD)/README.md:/data/README.md \
|
81
|
+
-e DOCKERHUB_USERNAME="$(DOCKERHUB_USERNAME)" \
|
82
|
+
-e DOCKERHUB_PASSWORD="$(DOCKERHUB_PASSWORD)" \
|
83
|
+
-e DOCKERHUB_REPO_PREFIX=puppet \
|
84
|
+
-e DOCKERHUB_REPO_NAME=r10k \
|
85
|
+
sheogorath/readme-to-dockerhub
|
86
|
+
|
87
|
+
publish: push-image push-readme
|
88
|
+
|
89
|
+
.PHONY: lint build test prep publish push-image push-readme
|
data/docker/README.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# [puppetlabs/r10k](https://github.com/puppetlabs/r10k)
|
2
|
+
|
3
|
+
r10k on a Docker image. Based on Alpine 3.8.
|
4
|
+
|
5
|
+
## Configuration
|
6
|
+
|
7
|
+
The following environment variables are supported:
|
8
|
+
|
9
|
+
- `PUPPERWARE_ANALYTICS_ENABLED`
|
10
|
+
|
11
|
+
Set to 'true' to enable Google Analytics metrics. Defaults to 'false'.
|
12
|
+
|
13
|
+
## Analytics Data Collection
|
14
|
+
|
15
|
+
The r10k container collects usage data. This is disabled by default. You can enable it by passing `--env PUPPERWARE_ANALYTICS_ENABLED=true`
|
16
|
+
to your `docker run` command.
|
17
|
+
|
18
|
+
### What data is collected?
|
19
|
+
* Version of the r10k container.
|
20
|
+
* Anonymized IP address is used by Google Analytics for Geolocation data, but the IP address is not collected.
|
21
|
+
|
22
|
+
### Why does the r10k container collect data?
|
23
|
+
|
24
|
+
We collect data to help us understand how the containers are used and make decisions about upcoming changes.
|
25
|
+
|
26
|
+
### How can I opt out of r10k container data collection?
|
27
|
+
|
28
|
+
This is disabled by default.
|
@@ -0,0 +1,67 @@
|
|
1
|
+
FROM alpine:3.9 as build
|
2
|
+
|
3
|
+
# hadolint ignore=DL3018
|
4
|
+
RUN apk add --no-cache ruby git && \
|
5
|
+
mkdir /workspace
|
6
|
+
WORKDIR /workspace
|
7
|
+
COPY . /workspace
|
8
|
+
RUN gem build r10k.gemspec && \
|
9
|
+
mv r10k*.gem r10k.gem
|
10
|
+
|
11
|
+
FROM alpine:3.9
|
12
|
+
|
13
|
+
ARG vcs_ref
|
14
|
+
ARG build_date
|
15
|
+
ARG version="3.1.0"
|
16
|
+
# Used by entrypoint to submit metrics to Google Analytics.
|
17
|
+
# Published images should use "production" for this build_arg.
|
18
|
+
ARG pupperware_analytics_stream="dev"
|
19
|
+
# required to schedule runs of "r10k" in K8s
|
20
|
+
ARG supercronic_version="0.1.9"
|
21
|
+
ARG supercronic_sha1sum="5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85"
|
22
|
+
ARG supercronic="supercronic-linux-amd64"
|
23
|
+
ARG supercronic_url="https://github.com/aptible/supercronic/releases/download/v$supercronic_version/$supercronic"
|
24
|
+
|
25
|
+
LABEL org.label-schema.maintainer="Puppet Release Team <release@puppet.com>" \
|
26
|
+
org.label-schema.vendor="Puppet" \
|
27
|
+
org.label-schema.url="https://github.com/puppetlabs/r10k" \
|
28
|
+
org.label-schema.name="r10k" \
|
29
|
+
org.label-schema.license="Apache-2.0" \
|
30
|
+
org.label-schema.vcs-url="https://github.com/puppetlabs/r10k" \
|
31
|
+
org.label-schema.schema-version="1.0" \
|
32
|
+
org.label-schema.dockerfile="/Dockerfile"
|
33
|
+
|
34
|
+
COPY docker/r10k/adduser.sh docker/r10k/docker-entrypoint.sh /
|
35
|
+
COPY docker/r10k/docker-entrypoint.d /docker-entrypoint.d
|
36
|
+
|
37
|
+
ENTRYPOINT ["/docker-entrypoint.sh"]
|
38
|
+
CMD ["help"]
|
39
|
+
|
40
|
+
# dynamic LABELs and ENV vars placed lower for the sake of Docker layer caching
|
41
|
+
ENV PUPPERWARE_ANALYTICS_STREAM="$pupperware_analytics_stream"
|
42
|
+
|
43
|
+
LABEL org.label-schema.version="$version" \
|
44
|
+
org.label-schema.vcs-ref="$vcs_ref" \
|
45
|
+
org.label-schema.build-date="$build_date"
|
46
|
+
|
47
|
+
COPY --from=build /workspace/r10k.gem /
|
48
|
+
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
49
|
+
# ignore apk and gem pinning
|
50
|
+
# hadolint ignore=DL3018,DL3028
|
51
|
+
RUN chmod a+x /adduser.sh /docker-entrypoint.sh && \
|
52
|
+
# Add a puppet user to run r10k as for consistency with puppetserver
|
53
|
+
/adduser.sh && \
|
54
|
+
chown -R puppet: /docker-entrypoint.d /docker-entrypoint.sh && \
|
55
|
+
apk add --no-cache ruby openssh-client git ruby-rugged curl ruby-json ruby-etc && \
|
56
|
+
gem install --no-doc /r10k.gem && \
|
57
|
+
rm -f /r10k.gem && \
|
58
|
+
curl --fail --silent --show-error --location --remote-name "$supercronic_url" && \
|
59
|
+
echo "${supercronic_sha1sum} ${supercronic}" | sha1sum -c - && \
|
60
|
+
chmod +x "$supercronic" && \
|
61
|
+
mv "$supercronic" "/usr/local/bin/${supercronic}" && \
|
62
|
+
ln -s "/usr/local/bin/${supercronic}" /usr/local/bin/supercronic
|
63
|
+
|
64
|
+
USER puppet
|
65
|
+
WORKDIR /home/puppet
|
66
|
+
|
67
|
+
COPY docker/r10k/Dockerfile /
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
getent_string="$(getent group | grep -e ':999$')"
|
4
|
+
exit_code=$?
|
5
|
+
|
6
|
+
if [ "$exit_code" = '0' ]; then
|
7
|
+
group="$(echo $getent_string | cut -d ':' -f1)"
|
8
|
+
else
|
9
|
+
addgroup -g 999 puppet
|
10
|
+
group='puppet'
|
11
|
+
fi
|
12
|
+
|
13
|
+
adduser -G $group -D -u 999 puppet
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
if [ "${PUPPERWARE_ANALYTICS_ENABLED}" != "true" ]; then
|
4
|
+
# Don't print out any messages here since this is a CLI container
|
5
|
+
exit 0
|
6
|
+
fi
|
7
|
+
|
8
|
+
# See: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
|
9
|
+
# Tracking ID
|
10
|
+
tid=UA-132486246-5
|
11
|
+
# Application Name
|
12
|
+
an=r10k
|
13
|
+
# Application Version
|
14
|
+
av=$(r10k version | cut -d ' ' -f 2)
|
15
|
+
# Anonymous Client ID
|
16
|
+
_file=/var/tmp/pwclientid
|
17
|
+
cid=$(cat $_file 2>/dev/null || (cat /proc/sys/kernel/random/uuid | tee $_file))
|
18
|
+
# Event Category
|
19
|
+
ec=${PUPPERWARE_ANALYTICS_STREAM:-dev}
|
20
|
+
# Event Action
|
21
|
+
ea=start
|
22
|
+
# Anonymize ip
|
23
|
+
aip=1
|
24
|
+
|
25
|
+
_params="v=1&t=event&tid=${tid}&an=${an}&av=${av}&cid=${cid}&ec=${ec}&ea=${ea}&aip=${aip}"
|
26
|
+
_url="http://www.google-analytics.com/collect?${_params}"
|
27
|
+
|
28
|
+
# Don't print out any messages here since this is a CLI container
|
29
|
+
curl --fail --silent --show-error --output /dev/null \
|
30
|
+
-X POST -H "Content-Length: 0" $_url
|
@@ -0,0 +1,54 @@
|
|
1
|
+
FROM alpine:3.9
|
2
|
+
|
3
|
+
ARG vcs_ref
|
4
|
+
ARG build_date
|
5
|
+
ARG version="3.1.0"
|
6
|
+
# Used by entrypoint to submit metrics to Google Analytics.
|
7
|
+
# Published images should use "production" for this build_arg.
|
8
|
+
ARG pupperware_analytics_stream="dev"
|
9
|
+
# required to schedule runs of "r10k" in K8s
|
10
|
+
ARG supercronic_version="0.1.9"
|
11
|
+
ARG supercronic_sha1sum="5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85"
|
12
|
+
ARG supercronic="supercronic-linux-amd64"
|
13
|
+
ARG supercronic_url="https://github.com/aptible/supercronic/releases/download/v$supercronic_version/$supercronic"
|
14
|
+
|
15
|
+
LABEL org.label-schema.maintainer="Puppet Release Team <release@puppet.com>" \
|
16
|
+
org.label-schema.vendor="Puppet" \
|
17
|
+
org.label-schema.url="https://github.com/puppetlabs/r10k" \
|
18
|
+
org.label-schema.name="r10k" \
|
19
|
+
org.label-schema.license="Apache-2.0" \
|
20
|
+
org.label-schema.vcs-url="https://github.com/puppetlabs/r10k" \
|
21
|
+
org.label-schema.schema-version="1.0" \
|
22
|
+
org.label-schema.dockerfile="/release.Dockerfile"
|
23
|
+
|
24
|
+
COPY adduser.sh docker-entrypoint.sh /
|
25
|
+
COPY docker-entrypoint.d /docker-entrypoint.d
|
26
|
+
|
27
|
+
ENTRYPOINT ["/docker-entrypoint.sh"]
|
28
|
+
CMD ["help"]
|
29
|
+
|
30
|
+
# dyanmic LABELs and ENV vars placed lower for the sake of Docker layer caching
|
31
|
+
ENV PUPPERWARE_ANALYTICS_STREAM="$pupperware_analytics_stream"
|
32
|
+
|
33
|
+
LABEL org.label-schema.version="$version" \
|
34
|
+
org.label-schema.vcs-ref="$vcs_ref" \
|
35
|
+
org.label-schema.build-date="$build_date"
|
36
|
+
|
37
|
+
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
38
|
+
# ignore apk and gem pinning
|
39
|
+
# hadolint ignore=DL3018,DL3028
|
40
|
+
RUN chmod a+x /adduser.sh /docker-entrypoint.sh && \
|
41
|
+
/adduser.sh && \
|
42
|
+
chown -R puppet: /docker-entrypoint.d /docker-entrypoint.sh && \
|
43
|
+
apk add --no-cache ruby openssh-client git ruby-rugged curl ruby-dev make gcc musl-dev && \
|
44
|
+
gem install --no-doc r10k:"$version" json etc && \
|
45
|
+
curl --fail --silent --show-error --location --remote-name "$supercronic_url" && \
|
46
|
+
echo "${supercronic_sha1sum} ${supercronic}" | sha1sum -c - && \
|
47
|
+
chmod +x "$supercronic" && \
|
48
|
+
mv "$supercronic" "/usr/local/bin/${supercronic}" && \
|
49
|
+
ln -s "/usr/local/bin/${supercronic}" /usr/local/bin/supercronic
|
50
|
+
|
51
|
+
USER puppet
|
52
|
+
WORKDIR /home/puppet
|
53
|
+
|
54
|
+
COPY release.Dockerfile /
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'rspec/core'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'open3'
|
4
|
+
|
5
|
+
SPEC_DIRECTORY = File.dirname(__FILE__)
|
6
|
+
|
7
|
+
describe 'r10k container' do
|
8
|
+
include Pupperware::SpecHelpers
|
9
|
+
def run_r10k(command)
|
10
|
+
run_command("docker run --detach \
|
11
|
+
--volume #{File.join(SPEC_DIRECTORY, 'fixtures')}:/home/puppet/test \
|
12
|
+
#{@image} #{command} \
|
13
|
+
--verbose \
|
14
|
+
--trace \
|
15
|
+
--puppetfile test/Puppetfile")
|
16
|
+
end
|
17
|
+
|
18
|
+
before(:all) do
|
19
|
+
@image = require_test_image
|
20
|
+
end
|
21
|
+
|
22
|
+
after(:all) do
|
23
|
+
FileUtils.rm_rf(File.join(SPEC_DIRECTORY, 'fixtures', 'modules'))
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should validate the Puppetfile' do
|
27
|
+
result = run_r10k('puppetfile check')
|
28
|
+
container = result[:stdout].chomp
|
29
|
+
wait_on_container_exit(container)
|
30
|
+
expect(get_container_exit_code(container)).to eq(0)
|
31
|
+
emit_log(container)
|
32
|
+
teardown_container(container)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should install the Puppetfile' do
|
36
|
+
result = run_r10k('puppetfile install')
|
37
|
+
container = result[:stdout].chomp
|
38
|
+
wait_on_container_exit(container)
|
39
|
+
expect(get_container_exit_code(container)).to eq(0)
|
40
|
+
emit_log(container)
|
41
|
+
teardown_container(container)
|
42
|
+
end
|
43
|
+
end
|
data/integration/Gemfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
source ENV['GEM_SOURCE'] || 'https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems/'
|
2
|
+
|
3
|
+
def location_for(place, fake_version = nil)
|
4
|
+
if place =~ /^(git:[^#]*)#(.*)/
|
5
|
+
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
|
6
|
+
elsif place =~ /^file:\/\/(.*)/
|
7
|
+
['>= 0', { :path => File.expand_path($1), :require => false }]
|
8
|
+
else
|
9
|
+
[place, { :require => false }]
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 4.5')
|
14
|
+
gem 'beaker-pe', '~> 2.0'
|
15
|
+
gem 'beaker-answers'
|
16
|
+
gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || '~> 1.1')
|
17
|
+
gem 'beaker-abs', *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.4')
|
18
|
+
gem 'rototiller', '= 0.1.0'
|
19
|
+
gem 'beaker-qa-i18n'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Integration Tests
|
2
|
+
===========================
|
3
|
+
|
4
|
+
This folder contains integration tests for the r10k project. These tests were originally written by the QA team
|
5
|
+
at Puppet Labs and is actively maintained by the QA team. Feel free to contribute tests to this folder as long
|
6
|
+
as they are written with [Beaker](https://github.com/puppetlabs/beaker) and follow the guidelines
|
7
|
+
below.
|
8
|
+
|
9
|
+
## Integration?
|
10
|
+
|
11
|
+
The r10k project already contains RSpec tests and you might be wondering why there is a need to have a set of
|
12
|
+
tests separate from those tests. At Puppet Labs we define an "integration" test as:
|
13
|
+
|
14
|
+
> Validating the system state and/or side effects while completing a complete life cycle of user stories using a
|
15
|
+
> system. This type of test crosses the boundary of a discrete tool in the process of testing a defined user
|
16
|
+
> objective that utilizes a system composed of integrated components.
|
17
|
+
|
18
|
+
What this means for this project is that we will install and configure all infrastructure needed in a real-world
|
19
|
+
r10k environment.
|
20
|
+
|
21
|
+
## Running Tests
|
22
|
+
|
23
|
+
Included in this folder under the "test_run_scripts" sub-folder are simple Bash scripts that will run suites of
|
24
|
+
Beaker tests. This scripts utilize environment variables for specifying test infrastructure. For security
|
25
|
+
reasons we do not provide examples from the Puppet Labs testing environment.
|
26
|
+
|
27
|
+
## Documentation
|
28
|
+
|
29
|
+
Each sub-folder contains a "README.mdk" that describes the content found in the sub-folder.
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require 'rototiller'
|
2
|
+
|
3
|
+
namespace :ci do
|
4
|
+
namespace :test do
|
5
|
+
|
6
|
+
desc 'Tests at the component level for the pe-r10k project'
|
7
|
+
task :component => [:check_pe_r10k_env_vars] do
|
8
|
+
Rake::Task[:beaker].invoke
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
desc 'Run tests against a packaged PE build'
|
14
|
+
task :acceptance do
|
15
|
+
@acceptance_pre_suite = 'pre-suite'
|
16
|
+
Rake::Task[:beaker].invoke
|
17
|
+
end
|
18
|
+
|
19
|
+
desc 'The acceptance tests for r10k, run in the beaker framework'
|
20
|
+
rototiller_task :beaker => [:beaker_hostgenerator] do |t|
|
21
|
+
|
22
|
+
common_setup = <<-EOS
|
23
|
+
pre-suite/00_pe_install.rb,
|
24
|
+
component/pre-suite/05_install_dev_r10k.rb,
|
25
|
+
pre-suite/10_git_config.rb,
|
26
|
+
pre-suite/20_pe_r10k.rb,
|
27
|
+
EOS
|
28
|
+
common_setup.gsub!("\n", '')
|
29
|
+
|
30
|
+
flags = [
|
31
|
+
{:name => '--hosts', :default => 'configs/generated', :override_env => 'BEAKER_HOST'},
|
32
|
+
{:name => '--keyfile', :default => "#{ENV['HOME']}/.ssh/id_rsa-acceptance", :override_env => 'BEAKER_KEYFILE'},
|
33
|
+
{:name => '--load-path', :default => 'lib'},
|
34
|
+
{:name => '--pre-suite', :default => @acceptance_pre_suite || common_setup, :override_env => 'BEAKER_PRE_SUITE'},
|
35
|
+
{:name => '--tests', :default => 'tests', :override_env => 'BEAKER_TESTS'},
|
36
|
+
{:name => '--preserve-hosts', :default => 'onfail', :override_env => 'BEAKER_PRESERVE_HOSTS'},
|
37
|
+
]
|
38
|
+
t.add_flag(*flags)
|
39
|
+
|
40
|
+
t.add_env do |env|
|
41
|
+
env.name = 'PE_FAMILY'
|
42
|
+
env.message = 'The puppet enterprise major branch to install from'
|
43
|
+
end
|
44
|
+
|
45
|
+
t.add_env do |env|
|
46
|
+
env.name = 'pe_dist_dir'
|
47
|
+
env.message = 'The location to download PE from, for example "https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/20XX.X/ci-ready"'
|
48
|
+
ENV['pe_dist_dir'] ||= "https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/#{ENV['PE_FAMILY']}/ci-ready"
|
49
|
+
end
|
50
|
+
|
51
|
+
t.add_env do |env|
|
52
|
+
env.name = 'GIT_PROVIDER'
|
53
|
+
env.message = 'The git provider that r10k should use on a SUT'
|
54
|
+
end
|
55
|
+
|
56
|
+
t.add_command({:name => 'beaker --debug', :override_env => 'BEAKER_EXECUTABLE'})
|
57
|
+
end
|
58
|
+
|
59
|
+
desc 'Generate a host configuration used by Beaker'
|
60
|
+
rototiller_task :beaker_hostgenerator do |t|
|
61
|
+
if ENV['BEAKER_HOST'].nil?
|
62
|
+
t.add_command do |c|
|
63
|
+
c.name = 'beaker-hostgenerator'
|
64
|
+
c.argument = '> configs/generated'
|
65
|
+
end
|
66
|
+
|
67
|
+
# This is a hack :(
|
68
|
+
t.add_flag(:name => '', :default => 'centos6-64mdca-64.fa', :override_env => 'TEST_TARGET')
|
69
|
+
|
70
|
+
t.add_flag(:name => '--global-config', :default => '{forge_host=forge-aio01-petest.puppetlabs.com}', :override_env => 'BHG_GLOBAL_CONFIG')
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
rototiller_task :check_pe_r10k_env_vars do |t|
|
75
|
+
t.add_env(:name => 'SHA', :message => 'The sha for pe-r10k')
|
76
|
+
end
|
77
|
+
|