Files
clover/image_builder

Setup your builder

  1. Install requirements
sudo apt-get install unzip zip git python-pip jq curl
sudo pip install YaDiskClient
  1. Mount HDD
nano /etc/fstab
proc            /proc           proc    defaults          0       0
PARTUUID=37665771-01  /boot           vfat    defaults          0       2
PARTUUID=37665771-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
/dev/sdb1       none                    swap    sw              0       0
/dev/sdb2       /mnt/hdd_system         ext4    defaults,acl    0       0
/dev/sdb3       /mnt/hdd_builder        ext4    defaults,acl    0       0
  1. Enable swap on HDD

TODO:

And disable dphys-swapfile

sudo systemctl stop dphys-swapfile
sudo systemctl disable dphys-swapfile
  1. Create /mnt/hdd_builder/workspace/coex-ci.json
{
    "yadisk":
    {
        "login":"LOGIN",
        "password":"PASS",
        "server_dir":"/clever_images"
    },
    "github":
    {
        "login":"LOGIN",
        "password":"PASS",
        "url":"https://api.github.com/repos/CopterExpress/clever/releases/"
    }
}
  1. Add webhook to release on your github project

TODO

  1. Install Jenkins

Manual https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04

  1. Change user & group invoked Jenkins
sudo sed -i 's/JENKINS_USER=$NAME/JENKINS_USER=root/' /etc/default/jenkins
sudo sed -i 's/JENKINS_GROUP=$NAME/JENKINS_GROUP=root/' /etc/default/jenkins
  1. Install Jenikins plugins

Pipeline, Git SCM

  1. Create Jenkins pipeline job

TODO

  1. Configure Jenkins

TODO: Matrix autorization, GIT Token

  1. Add Jenkins service to autostart
sudo systemctl enable jenkins
  1. Start service
sudo systemctl start jenkins

Requirements

  • Jenkins (BlueOcean plugin, optional)