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

fix virtualbox not found in CI #288

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/vagrant.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From f67d4f75eb2d97601df3cfe491ed4594422f190b Mon Sep 17 00:00:00 2001
From: Paul Cacheux <[email protected]>
Date: Mon, 20 May 2024 14:50:01 +0200
Subject: [PATCH] virtualbox version detection: handle WARNING lines

---
plugins/providers/virtualbox/driver/meta.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/plugins/providers/virtualbox/driver/meta.rb b/plugins/providers/virtualbox/driver/meta.rb
index 63af500c65a..413574e4125 100644
--- a/plugins/providers/virtualbox/driver/meta.rb
+++ b/plugins/providers/virtualbox/driver/meta.rb
@@ -197,7 +197,11 @@ def read_version
end
end

- parts = output.split("_")
+ version_line = output.each_line.find do |line|
+ !line.start_with?("WARNING:")
+ end
+
+ parts = version_line.split("_")
return nil if parts.empty?
parts[0].split("r")[0]
end
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ jobs:

sudo apt-get update && sudo apt-get install gcc-12 virtualbox-7.0 vagrant

- name: Patch vagrant
run: |
sudo patch -p1 -d /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/ < .github/vagrant.patch

- name: Download the nikos artifact
uses: actions/download-artifact@v4
with:
Expand Down
Loading