Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2021-10-27 22:15:18 +0300
committernachoparker <nacho@ownyourbits.com>2021-10-28 00:18:57 +0300
commit41368fedfca1e7c4a3da21e45796a35971df11e8 (patch)
tree19e3ad4e316deb2c64051bc97c386b665adf4208
parentccf957fcde1fbdf3e5e172f50644ea41283fa86d (diff)
ncp-vm: add automatic testing and change default root passwordv1.42.4
Signed-off-by: nachoparker <nacho@ownyourbits.com>
-rw-r--r--build/Vagrantfile5
-rwxr-xr-xbuild/batch.sh7
-rwxr-xr-xbuild/build-VM.sh2
-rw-r--r--build/buildlib.sh15
-rw-r--r--build/docker/docker-compose-ncpdev.yml2
-rw-r--r--build/docker/docker-compose.yml2
6 files changed, 27 insertions, 6 deletions
diff --git a/build/Vagrantfile b/build/Vagrantfile
index c924cf9e..3573bbc7 100644
--- a/build/Vagrantfile
+++ b/build/Vagrantfile
@@ -17,6 +17,10 @@ Vagrant.configure("2") do |config|
config.vm.box = "debian/#{release}64"
config.vm.box_check_update = true
config.vm.hostname = "ncp-vm"
+ config.vm.define "ncp-vm"
+ config.vm.provider :libvirt do |libvirt|
+ libvirt.default_prefix = ""
+ end
config.vm.synced_folder '.', '/vagrant', disabled: true
@@ -39,6 +43,7 @@ Vagrant.configure("2") do |config|
run_app_unsafe post-inst.sh
cd /
rm -r /tmp/nextcloudpi
+ echo "root:ownyourbits" | chpasswd
systemctl disable sshd
poweroff
SHELL
diff --git a/build/batch.sh b/build/batch.sh
index 3a4994ed..5aefed7f 100755
--- a/build/batch.sh
+++ b/build/batch.sh
@@ -35,10 +35,14 @@ build/build-LXD.sh
# Docker x86
build/build-docker.sh x86
+# VM
+build/build-VM.sh
+
# Tests
[[ "${SKIP_TESTS}" != 1 ]] && {
test_lxc
test_docker
+ test_vm
}
# Docker other
@@ -60,9 +64,6 @@ build/build-SD-armbian.sh odroidc4 OdroidC4
build/build-SD-armbian.sh odroidc2 OdroidC2
#build/build-SD-armbian.sh orangepizeroplus2-h5 OrangePiZeroPlus2
-# VM
-build/build-VM.sh
-
# Uploads
[[ "$FTPPASS" == "" ]] && exit
upload_docker
diff --git a/build/build-VM.sh b/build/build-VM.sh
index 52e1b5e8..c00f5539 100755
--- a/build/build-VM.sh
+++ b/build/build-VM.sh
@@ -18,7 +18,7 @@ SIZE=3G # Raspbian image size
#CLEAN=0 # Pass this envvar to skip cleaning download cache
IMG="NextCloudPi_VM_$( date "+%m-%d-%y" ).img"
IMG=tmp/"$IMG"
-VM="/var/lib/libvirt/images/nextcloudpi_default.img"
+VM="/var/lib/libvirt/images/ncp-vm.img"
TAR=output/"$( basename "$IMG" .img ).tar.bz2"
diff --git a/build/buildlib.sh b/build/buildlib.sh
index 6e9f5e61..fb6be298 100644
--- a/build/buildlib.sh
+++ b/build/buildlib.sh
@@ -461,6 +461,21 @@ function test_lxc()
lxc stop ncp
}
+function test_vm()
+{
+ local ip
+ virsh --connect qemu:///system shutdown ncp-vm &>/dev/null || true
+ virsh --connect qemu:///system start ncp-vm
+ while [[ "${ip}" == "" ]]; do
+ ip="$(virsh --connect qemu:///system domifaddr ncp-vm | grep ipv4 | awk '{ print $4 }' | sed 's|/24||' )"
+ sleep 0.5
+ done
+ tests/activation_tests.py "${ip}"
+ tests/nextcloud_tests.py "${ip}"
+ #tests/system_tests.py
+ virsh --connect qemu:///system shutdown ncp-vm
+}
+
# License
#
# This script is free software; you can redistribute it and/or modify it
diff --git a/build/docker/docker-compose-ncpdev.yml b/build/docker/docker-compose-ncpdev.yml
index 80b06544..4c941b2c 100644
--- a/build/docker/docker-compose-ncpdev.yml
+++ b/build/docker/docker-compose-ncpdev.yml
@@ -1,7 +1,7 @@
version: '3'
services:
nextcloudpi-dev:
- image: ownyourbits/nextcloudpi-x86
+ image: ownyourbits/nextcloudpi
command: "${IP}"
ports:
- "80:80"
diff --git a/build/docker/docker-compose.yml b/build/docker/docker-compose.yml
index fefdb3b1..8e1f5e19 100644
--- a/build/docker/docker-compose.yml
+++ b/build/docker/docker-compose.yml
@@ -1,7 +1,7 @@
version: '3'
services:
nextcloudpi:
- image: ownyourbits/nextcloudpi-x86
+ image: ownyourbits/nextcloudpi
command: "${IP}"
ports:
- "80:80"