beaker-abs 1.0.0 → 1.2.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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d93cecbcd15eecf0a2e91a03ee22c650c0a3e99e0dabf4eeb42ec237b5b7e4c3
4
- data.tar.gz: 57cffc12ea0a3b228ea3c32077cee07756ad8dfe44dbdd4c61d21bbb7893802e
3
+ metadata.gz: f8435e87c6355cd2a8ae1f61b6bbdf65fddfc9f6c58e112e4aee1f9524e37a1f
4
+ data.tar.gz: de010987d68324aae08368c0a048016e924bfd3daa9121dfa6aea6ca4fcff0f1
5
5
  SHA512:
6
- metadata.gz: 9625cf00e154313234fc17b791df2279c39d8ee42fa4da402523354d9d361694d26318c861296dcd17bbab2e574045559faea608466d20af360895677ea9d2c5
7
- data.tar.gz: 418cf2305cd0aaa582b2acd0447349b01f0d828a5ddd740731464193878276733ef2d756b53c805eb47e323877427d0aa458f9ee16509c3aaffb74b8a3c8fe4f
6
+ metadata.gz: 793b31558dd6c9a2a1056c3804ceeff526edf0f1c0e1921aa99b3164aea6fb4de339732f95c4816859f77545f1c2cd82b58595139f6345bf3449d2e467366a71
7
+ data.tar.gz: 23112d30fa46e9c2ccd34d131b3e00b391d96d26f9e90381467e916e8fa4ad89c3175aa16e937f5c1905f992462b86770287952e5e2e5d7de3d5214db798795b
@@ -0,0 +1,12 @@
1
+ name: Automated release prep
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ auto_release_prep:
8
+ uses: puppetlabs/release-engineering-repo-standards/.github/workflows/auto_release_prep.yml@v1
9
+ secrets: inherit
10
+ with:
11
+ project-type: ruby
12
+ version-file-path: lib/beaker-abs/version.rb
@@ -0,0 +1,8 @@
1
+ name: Dependabot auto-merge
2
+
3
+ on: pull_request
4
+
5
+ jobs:
6
+ dependabot_merge:
7
+ uses: puppetlabs/release-engineering-repo-standards/.github/workflows/dependabot_merge.yml@v1
8
+ secrets: inherit
@@ -0,0 +1,8 @@
1
+ name: Ensure label
2
+
3
+ on: pull_request
4
+
5
+ jobs:
6
+ ensure_label:
7
+ uses: puppetlabs/release-engineering-repo-standards/.github/workflows/ensure_label.yml@v1
8
+ secrets: inherit
@@ -10,7 +10,7 @@ jobs:
10
10
 
11
11
  steps:
12
12
  - name: Checkout code
13
- uses: actions/checkout@v3
13
+ uses: actions/checkout@v4
14
14
  with:
15
15
  ref: ${{ github.ref }}
16
16
  clean: true
@@ -24,7 +24,7 @@ jobs:
24
24
  echo "Found version $version from lib/beaker-abs/version.rb"
25
25
 
26
26
  - name: Get Current Version
27
- uses: actions/github-script@v6
27
+ uses: actions/github-script@v7
28
28
  id: cv
29
29
  with:
30
30
  script: |
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - name: checkout repo content
14
- uses: actions/checkout@v3
14
+ uses: actions/checkout@v4
15
15
  with:
16
16
  fetch-depth: 1
17
17
  - name: setup ruby
@@ -22,7 +22,7 @@ jobs:
22
22
  - name: check lock
23
23
  run: '[ -f "Gemfile.lock" ] && echo "package lock file exists, skipping" || bundle lock'
24
24
  # install java
25
- - uses: actions/setup-java@v3
25
+ - uses: actions/setup-java@v4
26
26
  with:
27
27
  distribution: 'temurin' # See 'Supported distributions' for available options
28
28
  java-version: '17'
@@ -16,7 +16,7 @@ jobs:
16
16
  - '3.1'
17
17
  - '3.2'
18
18
  steps:
19
- - uses: actions/checkout@v3
19
+ - uses: actions/checkout@v4
20
20
  - name: Set up Ruby
21
21
  uses: ruby/setup-ruby@v1
22
22
  with:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.0](https://github.com/puppetlabs/beaker-abs/tree/1.2.0) (2026-08-03)
4
+
5
+ [Full Changelog](https://github.com/puppetlabs/beaker-abs/compare/1.1.0...1.2.0)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - \(PA-8450\) Fix beaker destroy when ABS\_RESOURCE\_HOSTS is unset [\#49](https://github.com/puppetlabs/beaker-abs/pull/49) ([joshcooper](https://github.com/joshcooper))
10
+
11
+ **Merged pull requests:**
12
+
13
+ - \(PA-9008\) Allow beaker 7 [\#51](https://github.com/puppetlabs/beaker-abs/pull/51) ([shubhamshinde360](https://github.com/shubhamshinde360))
14
+
15
+ ## [1.1.0](https://github.com/puppetlabs/beaker-abs/tree/1.1.0) (2024-05-28)
16
+
17
+ [Full Changelog](https://github.com/puppetlabs/beaker-abs/compare/1.0.0...1.1.0)
18
+
19
+ **Fixed bugs:**
20
+
21
+ - Fix minitest after 5.19.0 [\#36](https://github.com/puppetlabs/beaker-abs/pull/36) ([yachub](https://github.com/yachub))
22
+
23
+ **Merged pull requests:**
24
+
25
+ - Add support for Beaker 6 [\#41](https://github.com/puppetlabs/beaker-abs/pull/41) ([mhashizume](https://github.com/mhashizume))
26
+ - Bump actions/setup-java from 3 to 4 [\#38](https://github.com/puppetlabs/beaker-abs/pull/38) ([dependabot[bot]](https://github.com/apps/dependabot))
27
+ - Bump actions/github-script from 6 to 7 [\#37](https://github.com/puppetlabs/beaker-abs/pull/37) ([dependabot[bot]](https://github.com/apps/dependabot))
28
+ - Bump actions/checkout from 3 to 4 [\#35](https://github.com/puppetlabs/beaker-abs/pull/35) ([dependabot[bot]](https://github.com/apps/dependabot))
29
+
3
30
  ## [1.0.0](https://github.com/puppetlabs/beaker-abs/tree/1.0.0) (2023-03-28)
4
31
 
5
32
  [Full Changelog](https://github.com/puppetlabs/beaker-abs/compare/0.11.0...1.0.0)
@@ -90,7 +117,7 @@
90
117
 
91
118
  **Merged pull requests:**
92
119
 
93
- - \(QENG-6081\) Remove beaker dependency [\#10](https://github.com/puppetlabs/beaker-abs/pull/10) ([smcelmurry](https://github.com/smcelmurry))
120
+ - \(QENG-6081\) Remove beaker dependency [\#10](https://github.com/puppetlabs/beaker-abs/pull/10) ([junebug-spencer](https://github.com/junebug-spencer))
94
121
 
95
122
  ## [0.3.0](https://github.com/puppetlabs/beaker-abs/tree/0.3.0) (2017-08-14)
96
123
 
data/Gemfile CHANGED
@@ -14,5 +14,5 @@ def location_for(place, fake_version = nil)
14
14
  end
15
15
 
16
16
  group :testing do
17
- gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 5.0')
17
+ gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 5.0', '< 8')
18
18
  end
data/beaker-abs.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "beaker", "~> 5.0"
21
+ spec.add_dependency "beaker", ">= 5.0", "< 8"
22
22
  spec.add_dependency "vmfloaty", ">= 1.0", "< 2"
23
23
  # accept more keys, for smallstep integration
24
24
  spec.add_dependency 'ed25519', ">= 1.2", "< 2.0"
@@ -39,9 +39,7 @@ module Beaker
39
39
  @abs_service_name = ENV['ABS_SERVICE_NAME'] || @options[:abs_service_name] || "abs"
40
40
  @abs_service_priority = ENV['ABS_SERVICE_PRIORITY'] || @options[:abs_service_priority] || "1"
41
41
 
42
- raise ArgumentError.new("ABS_RESOURCE_HOSTS must be specified when using the Beaker::Abs hypervisor when provisioning") if resource_hosts.nil? && !options[:provision]
43
- resource_hosts = provision_vms(hosts).to_json if resource_hosts.nil?
44
- @resource_hosts = JSON.parse(resource_hosts)
42
+ @resource_hosts = resource_hosts ? JSON.parse(resource_hosts) : []
45
43
  end
46
44
 
47
45
  def connection_preference(host)
@@ -65,6 +63,11 @@ module Beaker
65
63
  end
66
64
 
67
65
  def provision
66
+ if @resource_hosts.empty? && !@hosts.empty?
67
+ raise ArgumentError, "ABS_RESOURCE_HOSTS must be specified when using the Beaker::Abs hypervisor" unless @options[:provision]
68
+ @resource_hosts = JSON.parse(provision_vms(@hosts).to_json)
69
+ end
70
+
68
71
  type2hosts = {}
69
72
 
70
73
  # Each resource_host is of the form:
@@ -104,7 +107,22 @@ module Beaker
104
107
  end
105
108
 
106
109
  def cleanup
107
- # nothing to do
110
+ return if ENV['ABS_RESOURCE_HOSTS'] || @options[:abs_resource_hosts]
111
+
112
+ hostnames = @hosts.map(&:hostname)
113
+ return if hostnames.empty?
114
+
115
+ verbose = false
116
+ config = Conf.read_config
117
+ cli = Clifloaty.new(@abs_service_name, @abs_service_priority)
118
+ abs_service = Service.new(cli, config)
119
+ abs_service.delete(verbose, hostnames).each_pair do |hostname, result|
120
+ if result['ok']
121
+ @logger.info("Destroyed #{hostname}")
122
+ else
123
+ @logger.warn("Failed to destroy #{hostname}")
124
+ end
125
+ end
108
126
  end
109
127
 
110
128
  def provision_vms(hosts)
@@ -1,5 +1,5 @@
1
1
  module BeakerAbs
2
2
  module Version
3
- STRING = '1.0.0'
3
+ STRING = '1.2.0'
4
4
  end
5
5
  end
data/release-prep CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  # bundle install
4
- docker run -it --rm \
4
+ docker run -t --rm \
5
5
  -v $(pwd):/app \
6
6
  ruby:3.2-slim-bullseye \
7
7
  /bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends build-essential git make && cd /app && gem install bundler && bundle install --jobs 3; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
8
8
 
9
9
  # Update Changelog
10
- docker run -it --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
10
+ docker run -t --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
11
11
  githubchangeloggenerator/github-changelog-generator:1.16.2 \
12
12
  github_changelog_generator --future-release $(grep STRING lib/beaker-abs/version.rb |rev |cut -d "'" -f2 |rev)
metadata CHANGED
@@ -1,30 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-abs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Cooper
8
8
  - Rick Bradley
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2023-03-28 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: beaker
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - "~>"
17
+ - - ">="
19
18
  - !ruby/object:Gem::Version
20
19
  version: '5.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '8'
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
24
26
  requirements:
25
- - - "~>"
27
+ - - ">="
26
28
  - !ruby/object:Gem::Version
27
29
  version: '5.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '8'
28
33
  - !ruby/object:Gem::Dependency
29
34
  name: vmfloaty
30
35
  requirement: !ruby/object:Gem::Requirement
@@ -137,6 +142,9 @@ extensions: []
137
142
  extra_rdoc_files: []
138
143
  files:
139
144
  - ".github/dependabot.yml"
145
+ - ".github/workflows/auto_release_prep.yml"
146
+ - ".github/workflows/dependabot_merge.yml"
147
+ - ".github/workflows/ensure_label.yml"
140
148
  - ".github/workflows/release.yml"
141
149
  - ".github/workflows/security.yml"
142
150
  - ".github/workflows/testing.yml"
@@ -158,7 +166,6 @@ homepage: https://github.com/puppetlabs/beaker-abs
158
166
  licenses:
159
167
  - Apache-2.0
160
168
  metadata: {}
161
- post_install_message:
162
169
  rdoc_options: []
163
170
  require_paths:
164
171
  - lib
@@ -173,8 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
180
  - !ruby/object:Gem::Version
174
181
  version: '0'
175
182
  requirements: []
176
- rubygems_version: 3.3.26
177
- signing_key:
183
+ rubygems_version: 4.0.16
178
184
  specification_version: 4
179
185
  summary: Let's test Puppet, using hosts provisioned by Always Be Scheduling service.
180
186
  test_files: []