beaker-hostgenerator 0.10.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGY4NTdmNzQyMWE5NWNmMDZjOTg4MTc1ZDgxZDI3ODY2MzFhZTIyMA==
4
+ OTBkOTc3OGMxOWU5YWI2YmIzZWM2MzVkZWJkZDhkYTFlODgwYWJlNg==
5
5
  data.tar.gz: !binary |-
6
- ZDZiNzQxNDgyMjFhNWViNzhmYzU1ZmIxY2FhNzExYWI4YmQwOTE1ZQ==
6
+ MDRjNjgxODdhYzBhYzg5MTZjNTk3YjljOGNhNTEwYzNmODhhMTFmOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjJjZDA1NzMxZjU0ZWZiN2I3MWM1N2U2NzMwMzlhOTk3YmY4NzllMGJjMjFi
10
- ODNiYTMyYjllN2JhNjI3NmRmOTJhMGNlMjk4MGUzN2I2YWE1Y2Q1OWNmY2Mw
11
- ZGY2MTBlZTkyNDYwMTBjYmVkOTdjZGUwYmZmN2YwZmUyNzg5ZDA=
9
+ N2FiMDkzMTg5YTE1YzllMGViYmUyN2M3N2ZjMmMwNjNjZWJhZGU1YTQzYzFh
10
+ OTFiMGI4MmZhYjQxYzQ1YjljMGFkMjIzNGZlMmFiY2E3MDUwMzNlZDhmZmUx
11
+ ZDBkYjdlMDMxY2U3ZWI5Y2JlYzI3ZjZiOWJlZTZhNzc0NWIwZDc=
12
12
  data.tar.gz: !binary |-
13
- ZDk5NDE2MTYzZTAxNTE4ODFhYWU4NzI4OGQ3MGVkNWFjMWYxZWVkZmU4ZTBm
14
- NWNmOWY1M2NlYmY1ODQ3YTQ3ZmQxZWRkOTcxM2YxODMyZjFiNjkwM2VhNWRi
15
- NTE1ODhmNDViYjFiNWZjNWU3NmFiOTM3NGJmOGI0YjYwMDQ1MzI=
13
+ MDBjMDg0Y2Y5Y2IxZjFlNjAyN2Q3ODkwYTUxN2UwNTRiZjAxMmNhYmYyMTk4
14
+ ODI4ZWE4NjE2MjI3MjI2MGJlYzFlNWZhMjJmNjQzYWJmM2E4YTRlZGQ2NmE3
15
+ ODQyNTNhNzMwOTY2NmI4NjA4YjMwYWY1ZDcwZmFmZGQzMWUyZWI=
@@ -4,6 +4,56 @@ All notable changes to this project will be documented in this file.
4
4
  This project makes a strong effort to adhere to [Semantic
5
5
  Versioning](http://semver.org).
6
6
 
7
+ ## [1.0.0] - 2017-8-14
8
+ - Rewrite pe_dir() to provide RC builds and to determine build source just from
9
+ the pe_version format.
10
+
11
+ Previously, source was either archives/releases if version and family
12
+ were the exact same string, otherwise ci-ready.
13
+
14
+ Recently we have added archives/internal which houses rc tagged builds
15
+ long term (ci-ready has a two-week life span). These internal archive
16
+ releases let us test rc builds for internal consumption, but introduced
17
+ a third source.
18
+
19
+ Fourth source, actually, I'd forgotten that we already had dev version
20
+ strings with PEZ in them that need to be sourced from
21
+ feature/ci-ready...
22
+
23
+ The patch bases everything off the version because the four cases are
24
+ mutually exclusive, and the previous determination of a release source
25
+ based on version == family doesn't make sense for anything but a release
26
+ version. (If you supplied dev builds for both, for example, you
27
+ would get a host config trying to lookup a dev build in archive/releases
28
+ where it would not be found...)
29
+
30
+ This patch keeps the behavior of returning nil if either version or
31
+ family is nil so as to preserve a fallback behavior that would have
32
+ Beaker instead pick up pe_dir from environment variables: BEAKER_PE_DIR
33
+ or pe_dist_dir.
34
+
35
+ - Drop use of pe_family/pe_upgrade_family
36
+
37
+ The pe_family and pe_upgrade_family environment variables were only
38
+ being used as a means of signaling that we want pe_dir to be
39
+ archives/releases. (If pe_version and pe_family were equal, we'd return
40
+ archives/releases for pe_dir). This behavior was changed in the
41
+ previous commit to instead base the tarball source on the version string
42
+ format.
43
+
44
+ The only other behavior that passing family had was that if either
45
+ verison or family were nil, pe_dir would be nil. So theoretically, if
46
+ you only set pe_version to some valid version, you would get a beaker
47
+ config with no pe_dir set, and Beaker could then set pe_dir based on
48
+ BEAKER_PE_DIR or pe_dist_dir environment variables.
49
+
50
+ This commit removes family so that we can clean up pipelines which would
51
+ otherwise be setting pe_family just for the purpose of avoiding this
52
+ behavior.
53
+
54
+ It is potentially a breaking change if someone was relying on the
55
+ absence of pe_family to allow Beaker to set pe_dir as mentioned above.
56
+
7
57
  ## [0.10.3] - 2017-7-26
8
58
  - Change ubuntu1604-POWER platform from 'ubuntu-16.04-power8' to
9
59
  'ubuntu-16.04-ppc64el'
@@ -14,33 +14,31 @@ module BeakerHostGenerator
14
14
  module Data
15
15
  module_function
16
16
 
17
+ PE_TARBALL_SERVER="http://enterprise.delivery.puppetlabs.net"
18
+
17
19
  def pe_version
18
20
  ENV['pe_version']
19
21
  end
20
22
 
21
- def pe_family
22
- ENV['pe_family']
23
- end
24
-
25
23
  def pe_upgrade_version
26
24
  ENV['pe_upgrade_version']
27
25
  end
28
26
 
29
- def pe_upgrade_family
30
- ENV['pe_upgrade_family']
31
- end
27
+ def pe_dir(version)
28
+ return if version.nil?
32
29
 
33
- def pe_dir(version, family)
34
- # If our version is the same as our family, we're installing a
35
- # released version. Use the archive path. Otherwise, we want to use
36
- # the development build path.
37
- if version && family
38
- if version == family
39
- "http://enterprise.delivery.puppetlabs.net/archives/releases/#{family}/"
40
- else
41
- "http://enterprise.delivery.puppetlabs.net/#{family}/ci-ready"
42
- end
30
+ base_regex = '(\A\d+\.\d+)\.\d+'
31
+ source = case version
32
+ when /#{base_regex}\Z/
33
+ then "#{PE_TARBALL_SERVER}/archives/releases/#{version}/"
34
+ when /#{base_regex}-rc\d+\Z/
35
+ then "#{PE_TARBALL_SERVER}/archives/internal/%s/"
36
+ when /#{base_regex}-.*PEZ_.*/
37
+ then "#{PE_TARBALL_SERVER}/%s/feature/ci-ready"
38
+ when /#{base_regex}-.*/
39
+ then "#{PE_TARBALL_SERVER}/%s/ci-ready"
43
40
  end
41
+ return sprintf(source, $1)
44
42
  end
45
43
 
46
44
  PE_USE_WIN32 = ENV['pe_use_win32']
@@ -55,9 +53,9 @@ module BeakerHostGenerator
55
53
 
56
54
  def base_host_config(options)
57
55
  {
58
- 'pe_dir' => options[:pe_dir] || pe_dir(pe_version, pe_family),
56
+ 'pe_dir' => options[:pe_dir] || pe_dir(pe_version),
59
57
  'pe_ver' => options[:pe_ver] || pe_version,
60
- 'pe_upgrade_dir' => options[:pe_upgrade_dir] || pe_dir(pe_upgrade_version, pe_upgrade_family),
58
+ 'pe_upgrade_dir' => options[:pe_upgrade_dir] || pe_dir(pe_upgrade_version),
61
59
  'pe_upgrade_ver' => options[:pe_upgrade_ver] || pe_upgrade_version,
62
60
  }
63
61
  end
@@ -7,8 +7,8 @@ module BeakerHostGenerator
7
7
  module Utils
8
8
  module_function
9
9
 
10
- def pe_dir(version, family)
11
- BeakerHostGenerator::Data.pe_dir(version, family)
10
+ def pe_dir(version, family = nil)
11
+ BeakerHostGenerator::Data.pe_dir(version)
12
12
  end
13
13
 
14
14
  def fixup_node(cfg)
@@ -1,5 +1,5 @@
1
1
  module BeakerHostGenerator
2
2
  module Version
3
- STRING = '0.10.3'
3
+ STRING = '1.0.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-hostgenerator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Branan Purvine-Riley
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-26 00:00:00.000000000 Z
13
+ date: 2017-08-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest