diff options
author | Armin Kuster <akuster808@gmail.com> | 2020-07-17 16:54:41 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2020-07-18 18:33:23 -0700 |
commit | 171c3da4303d361258f785fbc6c958d643212779 (patch) | |
tree | 78e3baef553c15d6cecc3c059fa510ba21a045e8 | |
parent | f876289913e070e7d63611439f1225cb29c57ec7 (diff) | |
download | meta-security-171c3da4303d361258f785fbc6c958d643212779.tar.gz |
add gitlab framework and qemu machine
Machines:
qemux86
qemux86-64
qemuarm
qemuarm64
qemuppc
qemumips84
qemuriscv64
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | .gitlab-ci.yml | 56 | ||||
-rw-r--r-- | kas/kas-security-base.yml | 52 | ||||
-rw-r--r-- | kas/qemuarm.yml | 6 | ||||
-rw-r--r-- | kas/qemuarm64.yml | 6 | ||||
-rw-r--r-- | kas/qemuppc.yml | 6 | ||||
-rw-r--r-- | kas/qemuriscv64.yml | 6 | ||||
-rw-r--r-- | kas/qemux86-64.yml | 6 | ||||
-rw-r--r-- | kas/qemux86.yml | 6 | ||||
-rwxr-xr-x | scripts/ci-build.sh | 10 | ||||
-rwxr-xr-x | scripts/ci-cleanup.sh | 7 |
10 files changed, 161 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f7517a5 --- /dev/null +++ b/.gitlab-ci.yml | |||
@@ -0,0 +1,56 @@ | |||
1 | stages: | ||
2 | - build | ||
3 | |||
4 | .build: | ||
5 | stage: build | ||
6 | image: crops/poky | ||
7 | before_script: | ||
8 | - export PATH=~/.local/bin:$PATH | ||
9 | - wget https://bootstrap.pypa.io/get-pip.py | ||
10 | - python3 get-pip.py | ||
11 | - python3 -m pip install kas | ||
12 | - wget -q 'https://downloads.rclone.org/rclone-current-linux-amd64.zip' | ||
13 | - unzip -q rclone-current-linux-amd64.zip | ||
14 | - mv rclone-*-linux-amd64/rclone ~/.local/bin/ | ||
15 | - rm -rf rclone-*-linux-amd64* | ||
16 | after_script: | ||
17 | - rm -rf build | ||
18 | - ./scripts/ci-cleanup.sh | ||
19 | cache: | ||
20 | paths: | ||
21 | - layers | ||
22 | |||
23 | qemux86: | ||
24 | extends: .build | ||
25 | script: | ||
26 | - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image | ||
27 | |||
28 | qemux86-64: | ||
29 | extends: .build | ||
30 | script: | ||
31 | - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image | ||
32 | |||
33 | qemuarm: | ||
34 | extends: .build | ||
35 | script: | ||
36 | - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image | ||
37 | |||
38 | qemuarm64: | ||
39 | extends: .build | ||
40 | script: | ||
41 | - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image | ||
42 | |||
43 | qemumppc: | ||
44 | extends: .build | ||
45 | script: | ||
46 | - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image | ||
47 | |||
48 | qemumips64: | ||
49 | extends: .build | ||
50 | script: | ||
51 | - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image | ||
52 | |||
53 | qemuriscv64: | ||
54 | extends: .build | ||
55 | script: | ||
56 | - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image | ||
diff --git a/kas/kas-security-base.yml b/kas/kas-security-base.yml new file mode 100644 index 0000000..7f807d1 --- /dev/null +++ b/kas/kas-security-base.yml | |||
@@ -0,0 +1,52 @@ | |||
1 | header: | ||
2 | version: 8 | ||
3 | |||
4 | distro: poky | ||
5 | |||
6 | repos: | ||
7 | meta-security: | ||
8 | |||
9 | poky: | ||
10 | url: https://git.yoctoproject.org/git/poky | ||
11 | refspec: master | ||
12 | layers: | ||
13 | meta: | ||
14 | meta-poky: | ||
15 | meta-yocto-bsp: | ||
16 | |||
17 | meta-openembedded: | ||
18 | url: http://git.openembedded.org/meta-openembedded | ||
19 | refspec: master | ||
20 | layers: | ||
21 | meta-oe: | ||
22 | meta-perl: | ||
23 | meta-python: | ||
24 | meta-networking: | ||
25 | |||
26 | local_conf_header: | ||
27 | meta-security: | | ||
28 | CONF_VERSION = "1" | ||
29 | SOURCE_MIRROR_URL = "http://downloads.yoctoproject.org/mirror/sources/" | ||
30 | SSTATE_MIRRORS = "file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH \n" | ||
31 | SSTATE_DIR = "/home/srv/sstate/master" | ||
32 | DL_DIR = "/home/srv/downloads/master" | ||
33 | BB_HASHSERVE = "auto" | ||
34 | BB_SIGNATURE_HANDLER = "OEEquivHash" | ||
35 | |||
36 | diskmon: | | ||
37 | BB_DISKMON_DIRS = "\ | ||
38 | STOPTASKS,${TMPDIR},1G,100K \ | ||
39 | STOPTASKS,${DL_DIR},1G,100K \ | ||
40 | STOPTASKS,${SSTATE_DIR},1G,100K \ | ||
41 | STOPTASKS,/tmp,100M,100K \ | ||
42 | ABORT,${TMPDIR},100M,1K \ | ||
43 | ABORT,${DL_DIR},100M,1K \ | ||
44 | ABORT,${SSTATE_DIR},100M,1K \ | ||
45 | ABORT,/tmp,10M,1K" | ||
46 | |||
47 | bblayers_conf_header: | ||
48 | meta-security: | | ||
49 | POKY_BBLAYERS_CONF_VERSION = "2" | ||
50 | BBPATH = "${TOPDIR}" | ||
51 | BBFILES ?= "" | ||
52 | |||
diff --git a/kas/qemuarm.yml b/kas/qemuarm.yml new file mode 100644 index 0000000..f51abac --- /dev/null +++ b/kas/qemuarm.yml | |||
@@ -0,0 +1,6 @@ | |||
1 | header: | ||
2 | version: 8 | ||
3 | includes: | ||
4 | - kas-security-base.yml | ||
5 | |||
6 | machine: qemuarm | ||
diff --git a/kas/qemuarm64.yml b/kas/qemuarm64.yml new file mode 100644 index 0000000..d55adff --- /dev/null +++ b/kas/qemuarm64.yml | |||
@@ -0,0 +1,6 @@ | |||
1 | header: | ||
2 | version: 8 | ||
3 | includes: | ||
4 | - kas-security-base.yml | ||
5 | |||
6 | machine: qemuarmu64 | ||
diff --git a/kas/qemuppc.yml b/kas/qemuppc.yml new file mode 100644 index 0000000..3dad81c --- /dev/null +++ b/kas/qemuppc.yml | |||
@@ -0,0 +1,6 @@ | |||
1 | header: | ||
2 | version: 8 | ||
3 | includes: | ||
4 | - kas-security-base.yml | ||
5 | |||
6 | machine: qemuppc | ||
diff --git a/kas/qemuriscv64.yml b/kas/qemuriscv64.yml new file mode 100644 index 0000000..e1b1e49 --- /dev/null +++ b/kas/qemuriscv64.yml | |||
@@ -0,0 +1,6 @@ | |||
1 | header: | ||
2 | version: 8 | ||
3 | includes: | ||
4 | - kas-security-base.yml | ||
5 | |||
6 | machine: qemuriscv64 | ||
diff --git a/kas/qemux86-64.yml b/kas/qemux86-64.yml new file mode 100644 index 0000000..4ba2b66 --- /dev/null +++ b/kas/qemux86-64.yml | |||
@@ -0,0 +1,6 @@ | |||
1 | header: | ||
2 | version: 8 | ||
3 | includes: | ||
4 | - kas-security-base.yml | ||
5 | |||
6 | machine: qemux86-64 | ||
diff --git a/kas/qemux86.yml b/kas/qemux86.yml new file mode 100644 index 0000000..83a5353 --- /dev/null +++ b/kas/qemux86.yml | |||
@@ -0,0 +1,6 @@ | |||
1 | header: | ||
2 | version: 8 | ||
3 | includes: | ||
4 | - kas-security-base.yml | ||
5 | |||
6 | machine: qemux86 | ||
diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh new file mode 100755 index 0000000..b6f1dda --- /dev/null +++ b/scripts/ci-build.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | set -e | ||
4 | |||
5 | CONF=$1 | ||
6 | shift 1 | ||
7 | IMAGES=$@ | ||
8 | |||
9 | ( kas shell kas/${CONF}.yml -c "bitbake --setscene-only ${IMAGES}" || true ) | sed -e '/^NOTE: .*Started$/d' -e '/^NOTE: Running /d' | ||
10 | kas shell kas/${CONF}.yml -c "bitbake --skip-setscene ${IMAGES}" | sed -e '/^NOTE: .*Started$/d' -e '/^NOTE: Running /d' | ||
diff --git a/scripts/ci-cleanup.sh b/scripts/ci-cleanup.sh new file mode 100755 index 0000000..df3b68f --- /dev/null +++ b/scripts/ci-cleanup.sh | |||
@@ -0,0 +1,7 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | set -e | ||
4 | |||
5 | export SSTATE_CACHE_DIR=/home/srv/sstate/master | ||
6 | |||
7 | ./poky/scripts/sstate-cache-management.sh -d -y | ||