mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
image_builder: fix syntax in README
This commit is contained in:
@@ -1,80 +1,72 @@
|
||||
## Setup your builder
|
||||
|
||||
1. Install requirements
|
||||
```(bash)
|
||||
sudo apt-get install unzip zip git python-pip jq curl
|
||||
sudo pip install YaDiskClient
|
||||
```
|
||||
```bash
|
||||
sudo apt-get install unzip zip git python-pip jq curl
|
||||
sudo pip install YaDiskClient
|
||||
```
|
||||
2. Mount HDD
|
||||
```bash
|
||||
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
|
||||
```
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
3. Enable swap on HDD
|
||||
> TODO:
|
||||
|
||||
And disable `dphys-swapfile`
|
||||
```(bash)
|
||||
sudo systemctl stop dphys-swapfile
|
||||
sudo systemctl disable dphys-swapfile
|
||||
```
|
||||
|
||||
3. Create /mnt/hdd_builder/workspace/coex-ci.json
|
||||
```(json)
|
||||
{
|
||||
"yadisk":
|
||||
> TODO
|
||||
4. And disable `dphys-swapfile`
|
||||
```bash
|
||||
sudo systemctl stop dphys-swapfile
|
||||
sudo systemctl disable dphys-swapfile
|
||||
```
|
||||
5. Create /mnt/hdd_builder/workspace/coex-ci.json
|
||||
```(json)
|
||||
{
|
||||
"login":"LOGIN",
|
||||
"password":"PASS",
|
||||
"server_dir":"/clever_images"
|
||||
},
|
||||
"github":
|
||||
{
|
||||
"login":"LOGIN",
|
||||
"password":"PASS",
|
||||
"url":"https://api.github.com/repos/CopterExpress/clever/releases/"
|
||||
"yadisk":
|
||||
{
|
||||
"login":"LOGIN",
|
||||
"password":"PASS",
|
||||
"server_dir":"/clever_images"
|
||||
},
|
||||
"github":
|
||||
{
|
||||
"login":"LOGIN",
|
||||
"password":"PASS",
|
||||
"url":"https://api.github.com/repos/CopterExpress/clever/releases/"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
6. Add webhook to release on your github project
|
||||
> TODO
|
||||
|
||||
9. Install Jenkins
|
||||
> Manual https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04
|
||||
|
||||
10. Change user & group invoked Jenkins
|
||||
```(bash)
|
||||
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
|
||||
```
|
||||
11. Install Jenikins plugins
|
||||
> Pipeline, Git SCM, Matrix Authorization, github-webhook-build-trigger-plugin
|
||||
|
||||
12. Create Jenkins pipeline job
|
||||
> TODO
|
||||
|
||||
13. Configure Jenkins
|
||||
> TODO: Matrix autorization, GIT Token
|
||||
|
||||
13. Add Jenkins service to autostart
|
||||
```(bash)
|
||||
sudo systemctl enable jenkins
|
||||
```
|
||||
|
||||
14. Start service
|
||||
```(bash)
|
||||
sudo systemctl start jenkins
|
||||
```
|
||||
> TODO
|
||||
7. Install Jenkins
|
||||
> Manual https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04
|
||||
8. Change user & group invoked Jenkins
|
||||
```bash
|
||||
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
|
||||
```
|
||||
9. Install Jenikins plugins
|
||||
> Pipeline, Git SCM, Matrix Authorization, github-webhook-build-trigger-plugin
|
||||
10. Create Jenkins pipeline job
|
||||
> TODO
|
||||
11. Configure Jenkins
|
||||
> TODO: Matrix autorization, GIT Token
|
||||
12. Add Jenkins service to autostart
|
||||
```bash
|
||||
sudo systemctl enable jenkins
|
||||
```
|
||||
13. Start service
|
||||
```bash
|
||||
sudo systemctl start jenkins
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -90,10 +82,11 @@ sudo apt-get install default-jdk
|
||||
|
||||
## Для использования execute в качестве mount_image
|
||||
|
||||
```bash
|
||||
./image_config.sh execute $IMAGE_PATH << EOF
|
||||
uname -a
|
||||
EOF
|
||||
}
|
||||
```
|
||||
|
||||
## Running the Docker
|
||||
|
||||
|
||||
Reference in New Issue
Block a user