aboutsummaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2020-11-02 21:10:49 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2020-11-02 21:10:49 +0000
commitea07005137182d6fea2d5cc6967ddaa4a5bdbd5d (patch)
treec0c6b4c6683748651b26dec552a2f6b2e41c7705 /release
parent268f7e2539423be15d107fb102033958871fcd66 (diff)
downloadsrc-ea07005137182d6fea2d5cc6967ddaa4a5bdbd5d.tar.gz
src-ea07005137182d6fea2d5cc6967ddaa4a5bdbd5d.zip
release: Add an image for CI
A lot of projects CI can't do FreeBSD tests currently. The main reason is that the project CI infrastructure is runned on Linux and that our images aren't modifiable from a Linux hosts. Add a basic image specific for this case (called BASIC-CI for a lack of a better name). The image have no package pre-installed. It only have a few modification to have dhcp client runned on the default interface and sshd started with option to be able to log on without a password as root. Sponsored by: The FreeBSD Foundation Reviewed by: re (gjb@) Differential Revision: https://reviews.freebsd.org/D25598
Notes
Notes: svn path=/head/; revision=367284
Diffstat (limited to 'release')
-rw-r--r--release/Makefile.vm6
-rw-r--r--release/tools/basic-ci.conf35
2 files changed, 40 insertions, 1 deletions
diff --git a/release/Makefile.vm b/release/Makefile.vm
index 8a46a640438b..d201e11e19b2 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -16,13 +16,17 @@ VMDK_DESC= VMWare, VirtualBox disk image
QCOW2_DESC= Qemu, KVM disk image
RAW_DESC= Unformatted raw disk image
-CLOUDWARE?= EC2 \
+CLOUDWARE?= BASIC-CI \
+ EC2 \
GCE \
VAGRANT-VIRTUALBOX \
VAGRANT-VMWARE
AZURE_FORMAT= vhdf
AZURE_DESC= Microsoft Azure platform image
AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT}
+BASIC-CI_FORMAT= raw
+BASIC-CI_DESC= Image for CI
+BASIC-CI_DISK= ${OSRELEASE}.${BASIC-CI_FORMAT}
EC2_FORMAT= raw
EC2_DESC= Amazon EC2 image
EC2_DISK= ${OSRELEASE}.${EC2_FORMAT}
diff --git a/release/tools/basic-ci.conf b/release/tools/basic-ci.conf
new file mode 100644
index 000000000000..19bb2454f78d
--- /dev/null
+++ b/release/tools/basic-ci.conf
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Should be enough for base image, image can be resized in needed
+export VMSIZE=5G
+
+# Set to a list of third-party software to enable in rc.conf(5).
+export VM_RC_LIST="sshd growfs"
+
+vm_extra_pre_umount() {
+ cat << EOF >> ${DESTDIR}/etc/rc.conf
+dumpdev="AUTO"
+ifconfig_DEFAULT="DHCP"
+sshd_enable="YES"
+EOF
+
+ cat << EOF >> ${DESTDIR}/boot/loader.conf
+autoboot_delay="-1"
+beastie_disable="YES"
+loader_logo="none"
+console="comconsole,vidconsole"
+EOF
+ cat <<EOF >> ${DESTDIR}/etc/ssh/sshd_config
+PermitRootLogin yes
+PasswordAuthentication yes
+PermitEmptyPasswords yes
+UsePAM no
+EOF
+
+ touch ${DESTDIR}/firstboot
+
+ return 0
+}