Change-Id: Idac9dc6a36e725ae54dda297e9190dcff1187cdc
#!/bin/bash
set -ex
+
+if [[ -f /tmp/jjb_creds.sh ]] ; then
+source /tmp/jjb_creds.sh
+fi
+
adduser --disabled-password --gecos "" jenkins
echo "jenkins:jenkins" | chpasswd
adduser jenkins sudo
#!/bin/bash
set -ex
+
+if [[ -f /tmp/jjb_creds.sh ]] ; then
+source /tmp/jjb_creds.sh
+fi
+
adduser --disabled-password --gecos "" jenkins
echo "jenkins:jenkins" | chpasswd
adduser jenkins sudo
sudo cp -f /etc/resolv.conf /mnt/image/etc/resolv.conf
sudo cp "${UPDATE_SCRIPT}" /mnt/image/tmp/build_image.sh
+sudo cat > /mnt/image/tmp/jjb_creds.sh <<EOF
+JJB_USER=${JJB_USER}
+JJB_PASS=${JJB_PASS}
+EOF
sudo chroot /mnt/image /bin/bash /tmp/build_image.sh