cicd: wip
This commit is contained in:
parent
5adab1091f
commit
c082a5438a
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
- Get the snapshot you want to test `make getsnapshot`
|
- Get the snapshot you want to test `make getsnapshot`
|
||||||
- To test against VMs:
|
- To test against VMs:
|
||||||
-- `export OLIVETIN_TEST_RUNNER=container`
|
-- `export OLIVETIN_TEST_RUNNER=vm`
|
||||||
-- `vagrant up f38` (or whatever distro you like defined in `Vagrantfile`)
|
-- `vagrant up fedora38` (or whatever distro you like defined in `Vagrantfile`)
|
||||||
-- `. envVagrant.sh f38` to set the $IP and $PORT
|
-- `. envVagrant.sh fedora38` to set the $IP and $PORT
|
||||||
- `mocha`
|
- `mocha`
|
||||||
|
|
|
||||||
|
|
@ -3,39 +3,34 @@
|
||||||
|
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "generic/centos8"
|
|
||||||
config.vm.provision "shell", inline: "mkdir /etc/OliveTin && chmod o+w /etc/OliveTin/", privileged: true
|
config.vm.provision "shell", inline: "mkdir /etc/OliveTin && chmod o+w /etc/OliveTin/", privileged: true
|
||||||
config.vm.provision "file", source: "configs/general/config.yaml/.", destination: "/etc/OliveTin/config.yaml"
|
config.vm.provision "file", source: "configs/.", destination: "/opt/OliveTin-configs/"
|
||||||
|
|
||||||
config.vm.provider :libvirt do |libvirt|
|
config.vm.provider :libvirt do |libvirt|
|
||||||
libvirt.management_network_device = 'virbr0'
|
libvirt.management_network_device = 'virbr0'
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :f38 do |f36|
|
config.vm.define :stream9 do |i|
|
||||||
f36.vm.box = "generic/fedora38"
|
i.vm.box = "centos/stream9"
|
||||||
f36.vm.provision "file", source: "/opt/OliveTin-snapshot/OliveTin_linux_amd64.rpm", destination: "$HOME/"
|
i.vm.provision "file", source: "/opt/OliveTin-snapshot/OliveTin_linux_amd64.rpm", destination: "$HOME/"
|
||||||
f36.vm.provision "shell", inline: "rpm -U OliveTin* && systemctl enable --now OliveTin && systemctl disable --now firewalld"
|
i.vm.provision "shell", inline: "rpm -U OliveTin* && systemctl enable --now OliveTin && systemctl disable --now firewalld"
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :f36 do |f36|
|
config.vm.define :fedora38 do |i|
|
||||||
f36.vm.box = "generic/fedora36"
|
i.vm.box = "generic/fedora38"
|
||||||
f36.vm.provision "file", source: "/opt/OliveTin-snapshot/OliveTin_linux_amd64.rpm", destination: "$HOME/"
|
i.vm.provision "file", source: "/opt/OliveTin-snapshot/OliveTin_linux_amd64.rpm", destination: "$HOME/"
|
||||||
f36.vm.provision "shell", inline: "rpm -U OliveTin* && systemctl enable --now OliveTin && systemctl disable --now firewalld"
|
i.vm.provision "shell", inline: "rpm -U OliveTin* && systemctl enable --now OliveTin && systemctl disable --now firewalld"
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :debian do |debian|
|
config.vm.define :debian12 do |i|
|
||||||
debian.vm.box = "generic/debian10"
|
i.vm.box = "debian/bookworm64"
|
||||||
debian.vm.provision "file", source: "/opt/OliveTin-snapshot/OliveTin_linux_amd64.deb", destination: "$HOME/"
|
i.vm.provision "file", source: "/opt/OliveTin-snapshot/OliveTin_linux_amd64.deb", destination: "$HOME/"
|
||||||
debian.vm.provision "shell", inline: "dpkg --force-confold -i OliveTin* && systemctl enable --now OliveTin"
|
i.vm.provision "shell", inline: "dpkg --force-confold -i OliveTin* && systemctl enable --now OliveTin"
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :ubuntu do |ubuntu|
|
config.vm.define :ubuntu2310 do |i|
|
||||||
ubuntu.vm.box = "generic/ubuntu2110"
|
i.vm.box = "ubuntu/mantic64"
|
||||||
ubuntu.vm.provision "file", source: "/opt/OliveTin-snapshot/OliveTin_linux_amd64.deb", destination: "$HOME/"
|
i.vm.provision "file", source: "/opt/OliveTin-snapshot/OliveTin_linux_amd64.deb", destination: "$HOME/"
|
||||||
ubuntu.vm.provision "shell", inline: "dpkg --force-confold -i OliveTin* && systemctl enable --now OliveTin && systemctl disable --now firewalld"
|
i.vm.provision "shell", inline: "dpkg --force-confold -i OliveTin* && systemctl enable --now OliveTin && systemctl disable --now firewalld"
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO
|
|
||||||
#
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
rm -rf /opt/OliveTin-snapshot/*
|
|
||||||
gh run download -D /opt/OliveTin-snapshot/
|
|
||||||
|
|
@ -96,7 +96,7 @@ class OliveTinTestRunnerVm extends OliveTinTestRunnerEnv {
|
||||||
|
|
||||||
async start (cfg) {
|
async start (cfg) {
|
||||||
console.log("vagrant changing config")
|
console.log("vagrant changing config")
|
||||||
spawn('vagrant', ['ssh', '-c', '"ln -sf /etc/OliveTin/ /opt/otConfigs/' + cfg + '/"'])
|
spawn('vagrant', ['ssh', '-c', '"ln -sf /etc/OliveTin/ /opt/OliveTin-configs/' + cfg + '/config.yaml"'])
|
||||||
spawn('vagrant', ['ssh', '-c', '"systemctl restart OliveTin"'])
|
spawn('vagrant', ['ssh', '-c', '"systemctl restart OliveTin"'])
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue