mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-29 01:39:32 +00:00
Replace deprecated ruby function
Signed-off-by: Manuel Buil <mbuil@suse.com>
This commit is contained in:
2
tests/e2e/btrfs/Vagrantfile
vendored
2
tests/e2e/btrfs/Vagrantfile
vendored
@@ -20,7 +20,7 @@ def provision(vm, role, role_num, node_num)
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}", netmask: "255.255.255.0"
|
||||
|
||||
vagrant_defaults = '../vagrantdefaults.rb'
|
||||
load vagrant_defaults if File.exists?(vagrant_defaults)
|
||||
load vagrant_defaults if File.exist?(vagrant_defaults)
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
install_type = getInstallType(vm, RELEASE_VERSION, GITHUB_BRANCH)
|
||||
|
||||
4
tests/e2e/dualstack/Vagrantfile
vendored
4
tests/e2e/dualstack/Vagrantfile
vendored
@@ -26,8 +26,8 @@ def provision(vm, role, role_num, node_num)
|
||||
:libvirt__ipv6_address => "#{NETWORK6_PREFIX}::1",
|
||||
:libvirt__ipv6_prefix => "64"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
4
tests/e2e/embeddedmirror/Vagrantfile
vendored
4
tests/e2e/embeddedmirror/Vagrantfile
vendored
@@ -19,8 +19,8 @@ def provision(vm, role, role_num, node_num)
|
||||
node_ip = "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
4
tests/e2e/externalip/Vagrantfile
vendored
4
tests/e2e/externalip/Vagrantfile
vendored
@@ -20,8 +20,8 @@ def provision(vm, role, role_num, node_num)
|
||||
vm.network "private_network", :ip => node_ip4, :netmask => "255.255.255.0"
|
||||
vm.network "private_network", :ip => node_ip4_public, :netmask => "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
4
tests/e2e/privateregistry/Vagrantfile
vendored
4
tests/e2e/privateregistry/Vagrantfile
vendored
@@ -19,8 +19,8 @@ def provision(vm, role, role_num, node_num)
|
||||
node_ip = "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
4
tests/e2e/rootless/Vagrantfile
vendored
4
tests/e2e/rootless/Vagrantfile
vendored
@@ -17,8 +17,8 @@ def provision(vm, role, role_num, node_num)
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}", netmask: "255.255.255.0"
|
||||
|
||||
vagrant_defaults = '../vagrantdefaults.rb'
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
load vagrant_defaults if File.exists?(vagrant_defaults)
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
load vagrant_defaults if File.exist?(vagrant_defaults)
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
addCoverageDir(vm, role, GOCOVER)
|
||||
|
||||
2
tests/e2e/rotateca/Vagrantfile
vendored
2
tests/e2e/rotateca/Vagrantfile
vendored
@@ -19,7 +19,7 @@ def provision(vm, role, role_num, node_num)
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}", netmask: "255.255.255.0"
|
||||
|
||||
vagrant_defaults = '../vagrantdefaults.rb'
|
||||
load vagrant_defaults if File.exists?(vagrant_defaults)
|
||||
load vagrant_defaults if File.exist?(vagrant_defaults)
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
addCoverageDir(vm, role, GOCOVER)
|
||||
|
||||
4
tests/e2e/s3/Vagrantfile
vendored
4
tests/e2e/s3/Vagrantfile
vendored
@@ -19,8 +19,8 @@ def provision(vm, role, role_num, node_num)
|
||||
node_ip = "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
2
tests/e2e/secretsencryption/Vagrantfile
vendored
2
tests/e2e/secretsencryption/Vagrantfile
vendored
@@ -19,7 +19,7 @@ def provision(vm, role, role_num, node_num)
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}", netmask: "255.255.255.0"
|
||||
|
||||
vagrant_defaults = '../vagrantdefaults.rb'
|
||||
load vagrant_defaults if File.exists?(vagrant_defaults)
|
||||
load vagrant_defaults if File.exist?(vagrant_defaults)
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
addCoverageDir(vm, role, GOCOVER)
|
||||
|
||||
2
tests/e2e/secretsencryption_old/Vagrantfile
vendored
2
tests/e2e/secretsencryption_old/Vagrantfile
vendored
@@ -19,7 +19,7 @@ def provision(vm, role, role_num, node_num)
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}", netmask: "255.255.255.0"
|
||||
|
||||
vagrant_defaults = '../vagrantdefaults.rb'
|
||||
load vagrant_defaults if File.exists?(vagrant_defaults)
|
||||
load vagrant_defaults if File.exist?(vagrant_defaults)
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
addCoverageDir(vm, role, GOCOVER)
|
||||
|
||||
4
tests/e2e/snapshotrestore/Vagrantfile
vendored
4
tests/e2e/snapshotrestore/Vagrantfile
vendored
@@ -19,8 +19,8 @@ def provision(vm, role, role_num, node_num)
|
||||
node_ip = "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
2
tests/e2e/splitserver/Vagrantfile
vendored
2
tests/e2e/splitserver/Vagrantfile
vendored
@@ -17,7 +17,7 @@ def provision(vm, role, role_num, node_num)
|
||||
# An expanded netmask is required to allow VM<-->VM communication, virtualbox defaults to /32
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}", netmask: "255.255.255.0"
|
||||
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
2
tests/e2e/startup/Vagrantfile
vendored
2
tests/e2e/startup/Vagrantfile
vendored
@@ -19,7 +19,7 @@ def provision(vm, role, role_num, node_num)
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}", netmask: "255.255.255.0"
|
||||
|
||||
vagrant_defaults = '../vagrantdefaults.rb'
|
||||
load vagrant_defaults if File.exists?(vagrant_defaults)
|
||||
load vagrant_defaults if File.exist?(vagrant_defaults)
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
dockerInstall(vm)
|
||||
|
||||
4
tests/e2e/tailscale/Vagrantfile
vendored
4
tests/e2e/tailscale/Vagrantfile
vendored
@@ -19,8 +19,8 @@ def provision(vm, roles, role_num, node_num)
|
||||
node_ip4 = "#{NETWORK4_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip4, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
4
tests/e2e/token/Vagrantfile
vendored
4
tests/e2e/token/Vagrantfile
vendored
@@ -18,8 +18,8 @@ def provision(vm, roles, role_num, node_num)
|
||||
node_ip = "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
4
tests/e2e/upgradecluster/Vagrantfile
vendored
4
tests/e2e/upgradecluster/Vagrantfile
vendored
@@ -22,8 +22,8 @@ def provision(vm, role, role_num, node_num)
|
||||
node_ip = "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
@@ -25,7 +25,7 @@ def getInstallType(vm, release_version, branch, release_channel='')
|
||||
return "INSTALL_K3S_CHANNEL=#{release_channel}"
|
||||
else
|
||||
jqInstall(vm)
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
# Grabs the last 5 commit SHA's from the given branch, then purges any commits that do not have a passing CI build
|
||||
# MicroOS requires it not be in a /tmp/ or other root system folder
|
||||
vm.provision "Get latest commit", type: "shell", path: scripts_location +"/latest_commit.sh", args: [branch, "/tmp/k3s_commits"]
|
||||
|
||||
4
tests/e2e/validatecluster/Vagrantfile
vendored
4
tests/e2e/validatecluster/Vagrantfile
vendored
@@ -24,8 +24,8 @@ def provision(vm, role, role_num, node_num)
|
||||
node_ip = "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
4
tests/e2e/wasm/Vagrantfile
vendored
4
tests/e2e/wasm/Vagrantfile
vendored
@@ -33,8 +33,8 @@ def provision(vm, role, role_num, node_num)
|
||||
node_ip = "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.network "private_network", ip: node_ip, netmask: "255.255.255.0"
|
||||
|
||||
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exists?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
scripts_location = Dir.exist?("./scripts") ? "./scripts" : "../scripts"
|
||||
vagrant_defaults = File.exist?("./vagrantdefaults.rb") ? "./vagrantdefaults.rb" : "../vagrantdefaults.rb"
|
||||
load vagrant_defaults
|
||||
|
||||
defaultOSConfigure(vm)
|
||||
|
||||
Reference in New Issue
Block a user