From f3859d3291d4147a76ba72b210ee798828a711b7 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 09:14:42 +0200 Subject: [PATCH 1/9] pull fixtures from git and not forge --- .fixtures.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 0ec677a..058a8c2 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,10 +1,8 @@ --- # Fixtures file for puppet_spec_helper in the task: rake spec fixtures: - symlinks: - erlang: "#{source_dir}" - forge_modules: - apt: "puppetlabs/apt" - epel: "puppet/epel" - stdlib: "puppetlabs/stdlib" - yumrepo_core: "puppetlabs/yumrepo_core" + repositories: + apt: https://github.com/puppetlabs/puppetlabs-apt + epel: https://github.com/voxpupuli/puppet-epel + stdlib: https://github.com/puppetlabs/puppetlabs-stdlib + yumrepo_core: https://github.com/puppetlabs/puppetlabs-yumrepo_core From bd32224a13700baa04891afce78859a5b44604d2 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 09:26:36 +0200 Subject: [PATCH 2/9] Drop EoL puppet 5 support; add Puppet 7 --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index d1fba9a..7c970ec 100644 --- a/metadata.json +++ b/metadata.json @@ -48,7 +48,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 5.5.8 < 7.0.0" + "version_requirement": ">= 6.1.0 < 8.0.0" } ], "tags": [ From 54ad03a6d9b1be98185e83711ea3769fbad6c380 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 09:27:35 +0200 Subject: [PATCH 3/9] puppetlabs/stdlib: Allow 7.x --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 7c970ec..69d3eec 100644 --- a/metadata.json +++ b/metadata.json @@ -14,7 +14,7 @@ }, { "name": "puppetlabs/stdlib", - "version_requirement": ">= 4.13.0 < 7.0.0" + "version_requirement": ">= 4.13.0 < 8.0.0" }, { "name": "puppetlabs/yumrepo_core", From ec00ade79681ae858ed7df2d95c5706dd1684cde Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 09:28:49 +0200 Subject: [PATCH 4/9] puppetlabs/apt: allow 8.x --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 69d3eec..4c33de7 100644 --- a/metadata.json +++ b/metadata.json @@ -10,7 +10,7 @@ "dependencies": [ { "name": "puppetlabs/apt", - "version_requirement": ">= 2.0.0 < 8.0.0" + "version_requirement": ">= 2.0.0 < 9.0.0" }, { "name": "puppetlabs/stdlib", From 7d43aad6f3d8c4ba6d2914cdb4b1f14f854cf8ed Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 09:29:44 +0200 Subject: [PATCH 5/9] Drop EoL Debian 8 support --- metadata.json | 1 - 1 file changed, 1 deletion(-) diff --git a/metadata.json b/metadata.json index 4c33de7..b93e710 100644 --- a/metadata.json +++ b/metadata.json @@ -40,7 +40,6 @@ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "8", "9" ] } From 1034b1d2d7fc7403d2ac6724374f68ec3a0ebf60 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 09:30:31 +0200 Subject: [PATCH 6/9] Drop EoL Ubuntu 16.04 support --- metadata.json | 1 - 1 file changed, 1 deletion(-) diff --git a/metadata.json b/metadata.json index b93e710..5625995 100644 --- a/metadata.json +++ b/metadata.json @@ -32,7 +32,6 @@ { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "16.04", "18.04", "20.04" ] From b777354ab0fb8f62670234a6fc06eda64f2499d6 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 09:55:22 +0200 Subject: [PATCH 7/9] Drop dead bintray support jrog deleted all the bintray repositories, they cannot be used anymore. --- README.md | 18 +- REFERENCE.md | 289 +++++++++----------------- data/family/Debian.yaml | 2 +- manifests/init.pp | 14 -- manifests/repo/apt.pp | 5 +- manifests/repo/apt/bintray.pp | 30 --- manifests/repo/yum.pp | 6 +- manifests/repo/yum/bintray.pp | 15 -- spec/acceptance/init_spec.rb | 9 +- spec/classes/repo/apt/bintray_spec.rb | 29 --- spec/classes/repo/apt_spec.rb | 10 - spec/classes/repo/yum/bintray_spec.rb | 27 --- spec/classes/repo/yum_spec.rb | 6 - types/reposource.pp | 2 +- 14 files changed, 107 insertions(+), 355 deletions(-) delete mode 100644 manifests/repo/apt/bintray.pp delete mode 100644 manifests/repo/yum/bintray.pp delete mode 100644 spec/classes/repo/apt/bintray_spec.rb delete mode 100644 spec/classes/repo/yum/bintray_spec.rb diff --git a/README.md b/README.md index ca5546e..207da8e 100644 --- a/README.md +++ b/README.md @@ -55,19 +55,5 @@ See [REFERENCE](REFERENCE.md). ## Limitations -### Bintray repo_source on CentOS/RHEL - -By default, CentOS/RHEL use the `packagecloud` repo source. - -If one choose to use the `bintray` repo source, then the following "gotcha" should be noted. - -The `bintray` erlang repository for CentOS/RHEL systems requires a `repo_version` parameter -that is the major version of erlang that the repository should be configured for. - -Example: -```puppet -class { 'erlang': - repo_source => 'bintray', - repo_version => '23', -} -``` +Bintray was supported as an upstream repository in the past. Since jfrog shut it +down and deleted the repositories, Bintray support got removed from this module. diff --git a/REFERENCE.md b/REFERENCE.md index 24e2fc6..c5a77f2 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1,28 +1,27 @@ # Reference + ## Table of Contents -**Classes** +### Classes * [`erlang`](#erlang): Manages the Erlang repository and package installation. * [`erlang::repo`](#erlangrepo): Class that manages the erlang repo * [`erlang::repo::apt`](#erlangrepoapt): erlang apt repo -* [`erlang::repo::apt::bintray`](#erlangrepoaptbintray): erlang bintray apt repo * [`erlang::repo::apt::erlang_solutions`](#erlangrepoapterlang_solutions): erlang erlang_solutions apt repo * [`erlang::repo::yum`](#erlangrepoyum): erlang yum repo -* [`erlang::repo::yum::bintray`](#erlangrepoyumbintray): Erlang bintray yum repo * [`erlang::repo::yum::epel`](#erlangrepoyumepel): Erlang packagecloud yum repo * [`erlang::repo::yum::erlang_solutions`](#erlangrepoyumerlang_solutions): Erlang packagecloud yum repo * [`erlang::repo::yum::packagecloud`](#erlangrepoyumpackagecloud): Erlang packagecloud yum repo -**Data types** +### Data types * [`Erlang::RepoSource`](#erlangreposource): Options for what Erlang package repository to be configured on the system. This type defines the union of all possible options for both Apt a ## Classes -### erlang +### `erlang` This class supports installing an Erlang repo on Debian/Ubuntu and CentOS/RHEL systems. For Debian/Ubuntu an Apt package repository is configured. @@ -61,15 +60,6 @@ class { 'erlang': } ``` -##### Configuring Bintray repo source on CentOS/RHEL with repo_version - -```puppet -class { 'erlang': - repo_source => 'bintray', - repo_verison => '23', -} -``` - ##### Removing the erlang package and its repository ```puppet @@ -81,366 +71,279 @@ class { 'erlang': #### Parameters -The following parameters are available in the `erlang` class. +The following parameters are available in the `erlang` class: -##### `package_name` +* [`package_name`](#package_name) +* [`package_ensure`](#package_ensure) +* [`package_apt_pin`](#package_apt_pin) +* [`manage_repo`](#manage_repo) +* [`repo_ensure`](#repo_ensure) +* [`repo_source`](#repo_source) + +##### `package_name` Data type: `String` Name of the erlang package to install -Default value: 'erlang' +Default value: `'erlang'` -##### `package_ensure` +##### `package_ensure` Data type: `String` Determines the ensure state of the package. Set to installed by default, but could be changed to latest. -Default value: 'installed' +Default value: `'installed'` -##### `package_apt_pin` +##### `package_apt_pin` Data type: `Optional[Variant[Numeric, String]]` Whether to pin the package to a particular source. -Default value: `undef` +Default value: ``undef`` -##### `manage_repo` +##### `manage_repo` Data type: `Boolean` Whether or not this class should manage the erlang repository. -Default value: `true` +Default value: ``true`` -##### `repo_ensure` +##### `repo_ensure` Data type: `String` Determines the ensure state of the repo. -Default value: 'present' +Default value: `'present'` -##### `repo_source` +##### `repo_source` Data type: `Erlang::RepoSource` Determines what repository source should be configured for installing Erlang. For Debian/Ubuntu the choices for `repo_source` are: - - `'bintray'` (default) - `'erlang_solutions'` For CentOS/RHEL the choices for `repo_source` are: - - `'bintray'` - `'epel'` - `'erlang_solutions'` - `'packagecloud'` (default) -Default value: 'packagecloud' - -##### `repo_version` - -Data type: `Optional[String]` - -The 'bintray' repository source for Yum requires you to specify what major version -of Erlang you would like enabled. This should be a string such as: '23' -Note: This is only used for the `bintray` Yum repository. +Default value: `'packagecloud'` -Default value: `undef` - -### erlang::repo +### `erlang::repo` Class that manages the erlang repo -### erlang::repo::apt +### `erlang::repo::apt` erlang apt repo #### Parameters -The following parameters are available in the `erlang::repo::apt` class. - -##### `ensure` - -Data type: `String` - - - -Default value: $erlang::repo_ensure - -##### `source` - -Data type: `Erlang::RepoSource` - - +The following parameters are available in the `erlang::repo::apt` class: -Default value: $erlang::repo_source +* [`ensure`](#ensure) +* [`source`](#source) -### erlang::repo::apt::bintray - -erlang bintray apt repo - -#### Parameters - -The following parameters are available in the `erlang::repo::apt::bintray` class. - -##### `ensure` - -Data type: `String` - - - -Default value: $erlang::repo::apt::ensure - -##### `location` - -Data type: `String` - - - -Default value: 'https://dl.bintray.com/rabbitmq-erlang/debian' - -##### `release` - -Data type: `String` - - - -Default value: downcase($facts['os']['distro']['codename']) - -##### `repos` +##### `ensure` Data type: `String` -Default value: 'erlang' +Default value: `$erlang::repo_ensure` -##### `key` +##### `source` -Data type: `String` - - - -Default value: '0A9AF2115F4687BD29803A206B73A36E6026DFCA' - -##### `key_source` - -Data type: `String` - - - -Default value: 'https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc' - -##### `pin` - -Data type: `Optional[Variant[Numeric, String]]` +Data type: `Erlang::RepoSource` -Default value: $erlang::package_apt_pin +Default value: `$erlang::repo_source` -### erlang::repo::apt::erlang_solutions +### `erlang::repo::apt::erlang_solutions` erlang erlang_solutions apt repo #### Parameters -The following parameters are available in the `erlang::repo::apt::erlang_solutions` class. +The following parameters are available in the `erlang::repo::apt::erlang_solutions` class: + +* [`ensure`](#ensure) +* [`location`](#location) +* [`release`](#release) +* [`repos`](#repos) +* [`key`](#key) +* [`key_source`](#key_source) +* [`pin`](#pin) -##### `ensure` +##### `ensure` Data type: `String` -Default value: $erlang::repo::apt::ensure +Default value: `$erlang::repo::apt::ensure` -##### `location` +##### `location` Data type: `String` -Default value: 'https://packages.erlang-solutions.com/debian' +Default value: `'https://packages.erlang-solutions.com/debian'` -##### `release` +##### `release` Data type: `String` -Default value: downcase($facts['os']['distro']['codename']) +Default value: `downcase($facts['os']['distro']['codename'])` -##### `repos` +##### `repos` Data type: `String` -Default value: 'contrib' +Default value: `'contrib'` -##### `key` +##### `key` Data type: `String` -Default value: '434975BD900CCBE4F7EE1B1ED208507CA14F4FCA' +Default value: `'434975BD900CCBE4F7EE1B1ED208507CA14F4FCA'` -##### `key_source` +##### `key_source` Data type: `String` -Default value: 'https://packages.erlang-solutions.com/debian/erlang_solutions.asc' +Default value: `'https://packages.erlang-solutions.com/debian/erlang_solutions.asc'` -##### `pin` +##### `pin` Data type: `Optional[Variant[Numeric, String]]` -Default value: $erlang::package_apt_pin +Default value: `$erlang::package_apt_pin` -### erlang::repo::yum +### `erlang::repo::yum` erlang yum repo #### Parameters -The following parameters are available in the `erlang::repo::yum` class. - -##### `ensure` - -Data type: `String` - - - -Default value: $erlang::repo_ensure - -##### `source` - -Data type: `Erlang::RepoSource` - - - -Default value: $erlang::repo_source - -##### `version` - -Data type: `Optional[String]` - - - -Default value: $erlang::repo_version - -### erlang::repo::yum::bintray - -Erlang bintray yum repo - -#### Parameters - -The following parameters are available in the `erlang::repo::yum::bintray` class. - -##### `ensure` - -Data type: `String` +The following parameters are available in the `erlang::repo::yum` class: +* [`ensure`](#ensure) +* [`source`](#source) - -Default value: $erlang::repo::yum::ensure - -##### `version` +##### `ensure` Data type: `String` -Default value: $erlang::repo::yum::version +Default value: `$erlang::repo_ensure` -##### `baseurl` +##### `source` -Data type: `String` +Data type: `Erlang::RepoSource` -Default value: "https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/${version}/el/\$releasever" +Default value: `$erlang::repo_source` -### erlang::repo::yum::epel +### `erlang::repo::yum::epel` Erlang packagecloud yum repo -### erlang::repo::yum::erlang_solutions +### `erlang::repo::yum::erlang_solutions` Erlang packagecloud yum repo #### Parameters -The following parameters are available in the `erlang::repo::yum::erlang_solutions` class. +The following parameters are available in the `erlang::repo::yum::erlang_solutions` class: + +* [`ensure`](#ensure) +* [`baseurl`](#baseurl) +* [`gpgkey`](#gpgkey) -##### `ensure` +##### `ensure` Data type: `String` -Default value: $erlang::repo::yum::ensure +Default value: `$erlang::repo::yum::ensure` -##### `baseurl` +##### `baseurl` Data type: `String` -Default value: "https://packages.erlang-solutions.com/rpm/centos/\$releasever/\$basearch" +Default value: `"https://packages.erlang-solutions.com/rpm/centos/\$releasever/\$basearch"` -##### `gpgkey` +##### `gpgkey` Data type: `String` -Default value: 'https://packages.erlang-solutions.com/rpm/erlang_solutions.asc' +Default value: `'https://packages.erlang-solutions.com/rpm/erlang_solutions.asc'` -### erlang::repo::yum::packagecloud +### `erlang::repo::yum::packagecloud` Erlang packagecloud yum repo #### Parameters -The following parameters are available in the `erlang::repo::yum::packagecloud` class. +The following parameters are available in the `erlang::repo::yum::packagecloud` class: + +* [`ensure`](#ensure) +* [`baseurl`](#baseurl) +* [`gpgkey`](#gpgkey) -##### `ensure` +##### `ensure` Data type: `String` -Default value: $erlang::repo::yum::ensure +Default value: `$erlang::repo::yum::ensure` -##### `baseurl` +##### `baseurl` Data type: `String` -Default value: "https://packagecloud.io/rabbitmq/erlang/el/${$facts['os']['release']['major']}/\$basearch" +Default value: `"https://packagecloud.io/rabbitmq/erlang/el/${$facts['os']['release']['major']}/\$basearch"` -##### `gpgkey` +##### `gpgkey` Data type: `String` -Default value: 'https://packagecloud.io/rabbitmq/erlang/gpgkey' +Default value: `'https://packagecloud.io/rabbitmq/erlang/gpgkey'` ## Data types -### Erlang::RepoSource +### `Erlang::RepoSource` Options for what Erlang package repository to be configured on the system. This type defines the union of all possible options for both Apt and Yum repos. @@ -455,5 +358,9 @@ For CentOS/RHEL the choices for `repo_source` are: - `'erlang_solutions'` - `'packagecloud'` (default) -Alias of `Enum['bintray', 'epel', 'erlang_solutions', 'packagecloud']` +Alias of + +```puppet +Enum['epel', 'erlang_solutions', 'packagecloud'] +``` diff --git a/data/family/Debian.yaml b/data/family/Debian.yaml index 110c059..b569baf 100644 --- a/data/family/Debian.yaml +++ b/data/family/Debian.yaml @@ -1,2 +1,2 @@ --- -erlang::repo_source: 'bintray' +erlang::repo_source: 'erlang_solutions' diff --git a/manifests/init.pp b/manifests/init.pp index f972d5f..fa74e6b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -31,20 +31,13 @@ # @param [Erlang::RepoSource] repo_source # Determines what repository source should be configured for installing Erlang. # For Debian/Ubuntu the choices for `repo_source` are: -# - `'bintray'` (default) # - `'erlang_solutions'` # # For CentOS/RHEL the choices for `repo_source` are: -# - `'bintray'` # - `'epel'` # - `'erlang_solutions'` # - `'packagecloud'` (default) # -# @param [Optional[String]] repo_version -# The 'bintray' repository source for Yum requires you to specify what major version -# of Erlang you would like enabled. This should be a string such as: '23' -# Note: This is only used for the `bintray` Yum repository. -# # @example Basic usage for installing Erlang quick and easy # include erlang # @@ -58,12 +51,6 @@ # repo_source => 'epel', # } # -# @example Configuring Bintray repo source on CentOS/RHEL with repo_version -# class { 'erlang': -# repo_source => 'bintray', -# repo_verison => '23', -# } -# # @example Removing the erlang package and its repository # class { 'erlang': # package_ensure => 'absent', @@ -77,7 +64,6 @@ Boolean $manage_repo = true, String $repo_ensure = 'present', Erlang::RepoSource $repo_source = 'packagecloud', - Optional[String] $repo_version = undef, ) { if $manage_repo { contain erlang::repo diff --git a/manifests/repo/apt.pp b/manifests/repo/apt.pp index 96ef17b..f7d8271 100644 --- a/manifests/repo/apt.pp +++ b/manifests/repo/apt.pp @@ -4,14 +4,11 @@ Erlang::RepoSource $source = $erlang::repo_source, ) inherits erlang { case $source { - 'bintray': { - contain erlang::repo::apt::bintray - } 'erlang_solutions': { contain erlang::repo::apt::erlang_solutions } default: { - fail("Only 'bintray' and 'erlang_solutions' repo_sources are supported for Apt repos, the following is not supported: ${source}") + fail("Only 'erlang_solutions' repo_sources is supported for Apt repos, the following is not supported: ${source}") } } } diff --git a/manifests/repo/apt/bintray.pp b/manifests/repo/apt/bintray.pp deleted file mode 100644 index f562cd4..0000000 --- a/manifests/repo/apt/bintray.pp +++ /dev/null @@ -1,30 +0,0 @@ -# erlang bintray apt repo -class erlang::repo::apt::bintray ( - String $ensure = $erlang::repo::apt::ensure, - String $location = 'https://dl.bintray.com/rabbitmq-erlang/debian', - # trusty, xenial, bionic, etc - String $release = downcase($facts['os']['distro']['codename']), - String $repos = 'erlang', - String $key = '0A9AF2115F4687BD29803A206B73A36E6026DFCA', - String $key_source = 'https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc', - Optional[Variant[Numeric, String]] $pin = $erlang::package_apt_pin, -) inherits erlang { - apt::source { 'erlang-bintray': - ensure => $ensure, - location => $location, - release => $release, - repos => $repos, - key => { - 'id' => $key, - 'source' => $key_source, - }, - } - - if $pin { - apt::pin { 'erlang': - packages => '*', - priority => $pin, - origin => inline_template('<%= require \'uri\'; URI(@location).host %>'), - } - } -} diff --git a/manifests/repo/yum.pp b/manifests/repo/yum.pp index 2502f40..ae6f9e5 100644 --- a/manifests/repo/yum.pp +++ b/manifests/repo/yum.pp @@ -2,12 +2,8 @@ class erlang::repo::yum ( String $ensure = $erlang::repo_ensure, Erlang::RepoSource $source = $erlang::repo_source, - Optional[String] $version = $erlang::repo_version, ) inherits erlang { case $source { - 'bintray': { - contain erlang::repo::yum::bintray - } 'epel': { contain erlang::repo::yum::epel } @@ -20,7 +16,7 @@ contain erlang::repo::yum::packagecloud } default: { - fail("Only 'bintray', 'packagecloud', 'epel' repo_source are supported for Yum repos, the following is not supported: ${source}") + fail("Only 'packagecloud', 'epel' repo_source are supported for Yum repos, the following is not supported: ${source}") } } } diff --git a/manifests/repo/yum/bintray.pp b/manifests/repo/yum/bintray.pp deleted file mode 100644 index 4571433..0000000 --- a/manifests/repo/yum/bintray.pp +++ /dev/null @@ -1,15 +0,0 @@ -# Erlang bintray yum repo -class erlang::repo::yum::bintray ( - String $ensure = $erlang::repo::yum::ensure, - String $version = $erlang::repo::yum::version, - String $baseurl = "https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/${version}/el/\$releasever", -) inherits erlang { - yumrepo { 'erlang-bintray': - ensure => $ensure, - name => 'erlang-bintray', - baseurl => $baseurl, - enabled => '1', - gpgcheck => '0', - repo_gpgcheck => '0', - } -} diff --git a/spec/acceptance/init_spec.rb b/spec/acceptance/init_spec.rb index a35bed5..5213e02 100644 --- a/spec/acceptance/init_spec.rb +++ b/spec/acceptance/init_spec.rb @@ -4,10 +4,10 @@ case fact('os.family') when 'RedHat' default_repo_source = 'packagecloud' - repo_source_list = %w[bintray erlang_solutions packagecloud] + repo_source_list = %w[erlang_solutions packagecloud] when 'Debian' - default_repo_source = 'bintray' - repo_source_list = %w[bintray erlang_solutions] + default_repo_source = 'erlang_solutions' + repo_source_list = %w[erlang_solutions] end case fact('os.family') @@ -56,7 +56,6 @@ class { 'erlang': <<-EOS class { 'erlang': repo_source => '#{repo_source}', - repo_version => '23', } EOS end @@ -86,7 +85,6 @@ class { 'erlang': package_ensure => 'absent', repo_source => '#{repo_source}', repo_ensure => 'absent', - repo_version => '23', } EOS end @@ -97,7 +95,6 @@ class { 'erlang': package_ensure => 'absent', repo_source => '#{repo_source}', repo_ensure => 'absent', - repo_version => '23', } EOS end diff --git a/spec/classes/repo/apt/bintray_spec.rb b/spec/classes/repo/apt/bintray_spec.rb deleted file mode 100644 index d459da1..0000000 --- a/spec/classes/repo/apt/bintray_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'spec_helper' - -describe 'erlang::repo::apt::bintray' do - on_supported_os.each do |os, facts| - case facts[:os]['family'] - when 'Debian' - context "on #{os}" do - let(:facts) { facts } - let(:release) { facts[:os]['distro']['codename'] } - - it { is_expected.to compile.with_all_deps } - - context 'with default parameters' do - it do - is_expected.to contain_apt__source('erlang-bintray'). - with('ensure' => 'present', - 'location' => 'https://dl.bintray.com/rabbitmq-erlang/debian', - 'release' => release, - 'repos' => 'erlang', - 'key' => { - 'id' => '0A9AF2115F4687BD29803A206B73A36E6026DFCA', - 'source' => 'https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc' - }) - end - end - end - end - end -end diff --git a/spec/classes/repo/apt_spec.rb b/spec/classes/repo/apt_spec.rb index 16cb972..139f310 100644 --- a/spec/classes/repo/apt_spec.rb +++ b/spec/classes/repo/apt_spec.rb @@ -9,16 +9,6 @@ it { is_expected.to compile.with_all_deps } - context 'with default parameters' do - it { is_expected.to contain_class('erlang::repo::apt::bintray') } - end - - context 'with source set to bintray' do - let(:params) { { source: 'bintray' } } - - it { is_expected.to contain_class('erlang::repo::apt::bintray') } - end - context 'with source set to erlang_solutions' do let(:params) { { source: 'erlang_solutions' } } diff --git a/spec/classes/repo/yum/bintray_spec.rb b/spec/classes/repo/yum/bintray_spec.rb deleted file mode 100644 index 8d9e104..0000000 --- a/spec/classes/repo/yum/bintray_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'spec_helper' - -describe 'erlang::repo::yum::bintray' do - on_supported_os.each do |os, facts| - context "on #{os}" do - case facts[:os]['family'] - when 'RedHat' - let(:facts) { facts } - let(:params) { { version: '23' } } - - it { is_expected.to compile.with_all_deps } - - context 'with default parameters' do - it do - is_expected.to contain_yumrepo('erlang-bintray'). - with('ensure' => 'present', - 'name' => 'erlang-bintray', - 'baseurl' => "https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/23/el/\$releasever", - 'enabled' => '1', - 'gpgcheck' => '0', - 'repo_gpgcheck' => '0') - end - end - end - end - end -end diff --git a/spec/classes/repo/yum_spec.rb b/spec/classes/repo/yum_spec.rb index 89eed74..072d9bd 100644 --- a/spec/classes/repo/yum_spec.rb +++ b/spec/classes/repo/yum_spec.rb @@ -13,12 +13,6 @@ it { is_expected.to contain_class('erlang::repo::yum::packagecloud') } end - context 'with source set to bintray' do - let(:params) { { source: 'bintray', version: '23' } } - - it { is_expected.to contain_class('erlang::repo::yum::bintray') } - end - context 'with source set to epel' do let(:params) { { source: 'epel' } } diff --git a/types/reposource.pp b/types/reposource.pp index 4c0219b..f23895b 100644 --- a/types/reposource.pp +++ b/types/reposource.pp @@ -10,4 +10,4 @@ # - `'epel'` # - `'erlang_solutions'` # - `'packagecloud'` (default) -type Erlang::RepoSource = Enum['bintray', 'epel', 'erlang_solutions', 'packagecloud'] +type Erlang::RepoSource = Enum['epel', 'erlang_solutions', 'packagecloud'] From 997a3c1cb3124d82b285fce89b306cf3a013dda0 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 10:06:51 +0200 Subject: [PATCH 8/9] Update README.md Co-authored-by: Ewoud Kohl van Wijngaarden --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 207da8e..16f1d87 100644 --- a/README.md +++ b/README.md @@ -56,4 +56,4 @@ See [REFERENCE](REFERENCE.md). ## Limitations Bintray was supported as an upstream repository in the past. Since jfrog shut it -down and deleted the repositories, Bintray support got removed from this module. +down and deleted the repositories, Bintray support was removed from this module. From 58073126f8cbf18032f8e49e62053cc3f992ada5 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Jun 2021 10:06:56 +0200 Subject: [PATCH 9/9] Update README.md Co-authored-by: Ewoud Kohl van Wijngaarden --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 16f1d87..cb1e76d 100644 --- a/README.md +++ b/README.md @@ -55,5 +55,5 @@ See [REFERENCE](REFERENCE.md). ## Limitations -Bintray was supported as an upstream repository in the past. Since jfrog shut it +Bintray was supported as an upstream repository in the past. Since JFrog shut it down and deleted the repositories, Bintray support was removed from this module.