Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package logic for Amazon Linux 2 #1884

Merged
merged 1 commit into from
May 23, 2024

Conversation

mhashizume
Copy link
Contributor

This commit adds logic for Amazon Linux 2 to Beaker's install_ and uninstall_package methods. (Note: AL2 is referred to in Vanagon and ABS as Amazon Linux 7, in reference to the assumed compatibility with Red Hat Enterprise Linux 7.)

@joshcooper
Copy link
Contributor

@bastelfreak could you review and merge?

@joshcooper
Copy link
Contributor

joshcooper commented May 23, 2024

I verified this works as expected:

$ export BEAKER_VERSION=https://github.com/mhashizume/beaker#maint/master/al-2
$ bundle install
$ env SHA=503cb74f9d28c4dbbc49343beab3e184bd8da10f HOSTS=amazon7-64a bundle exec rake ci:test:setup
...
  ip-10-227-0-206.amz-dev.puppet.net (ip-10-227-0-206.amz-dev.puppet.net) 21:02:30$ yum -y  install puppet-agent

@imaqsood could you add a test so we don't regress, similar to

it "uses dnf on amazon-2023" do
@opts = { 'platform' => "amazon-2023-is-me" }
pkg = 'amazon_package'
expect(Beaker::Command).to receive(:new).with("dnf -y install #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('')
expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 }))
expect(instance.install_package(pkg)).to eq "hello"
end

This commit adds logic for Amazon Linux 2 to Beaker's install_ and
uninstall_package methods. (Note: AL2 is referred to in Vanagon and ABS
as Amazon Linux 7, in reference to the assumed compatibility with Red
Hat Enterprise Linux 7.)
@mhashizume mhashizume force-pushed the maint/master/al-2 branch from 1ba6d73 to 8e60f19 Compare May 23, 2024 16:44
@bastelfreak bastelfreak merged commit 0b4f5ef into voxpupuli:master May 23, 2024
7 checks passed
@mhashizume mhashizume deleted the maint/master/al-2 branch May 23, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants