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 MariaDB to CI #10724

Merged
merged 5 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
add mariadb
Signed-off-by: robertsilen <robert.silen@iki.fi>
  • Loading branch information
robertsilen authored and dereknola committed Sep 18, 2024
commit 274ee15baec250599de8ce7f5178ba13bb574dd6
10 changes: 10 additions & 0 deletions tests/e2e/upgradecluster/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ def getDBType(role, role_num, vm)
elsif role.include?("server") && role_num != 0
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
end

if EXTERNAL_DB == "mariadb"
if role.include?("server") && role_num == 0
dockerInstall(vm)
vm.provision "Start mysql", inline: "docker run -d -p 3306:3306 --name #{EXTERNAL_DB} -e MYSQL_ROOT_PASSWORD=e2e mysql:5.7"
vm.provision "shell", inline: "echo \"Wait for mysql to startup\"; sleep 10"
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
elsif role.include?("server") && role_num != 0
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
end

elsif EXTERNAL_DB == "postgres"
if role.include?("server") && role_num == 0
Expand Down
10 changes: 10 additions & 0 deletions tests/e2e/validatecluster/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ def getDBType(role, role_num, vm)
elsif role.include?("server") && role_num != 0
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
end

if EXTERNAL_DB == "mariadb"
if role.include?("server") && role_num == 0
dockerInstall(vm)
vm.provision "Start mysql", inline: "docker run -d -p 3306:3306 --name #{EXTERNAL_DB} -e MYSQL_ROOT_PASSWORD=e2e mysql:5.7"
vm.provision "shell", inline: "echo \"Wait for mysql to startup\"; sleep 10"
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
elsif role.include?("server") && role_num != 0
return "datastore-endpoint: 'mysql://root:e2e@tcp(#{NETWORK_PREFIX}.100:3306)/k3s'"
end

elsif EXTERNAL_DB == "postgres"
if role.include?("server") && role_num == 0
Expand Down