summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2020-07-17 16:54:41 -0700
committerArmin Kuster <akuster808@gmail.com>2020-07-18 18:33:23 -0700
commit171c3da4303d361258f785fbc6c958d643212779 (patch)
tree78e3baef553c15d6cecc3c059fa510ba21a045e8
parentf876289913e070e7d63611439f1225cb29c57ec7 (diff)
downloadmeta-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.yml56
-rw-r--r--kas/kas-security-base.yml52
-rw-r--r--kas/qemuarm.yml6
-rw-r--r--kas/qemuarm64.yml6
-rw-r--r--kas/qemuppc.yml6
-rw-r--r--kas/qemuriscv64.yml6
-rw-r--r--kas/qemux86-64.yml6
-rw-r--r--kas/qemux86.yml6
-rwxr-xr-xscripts/ci-build.sh10
-rwxr-xr-xscripts/ci-cleanup.sh7
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 @@
1stages:
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
23qemux86:
24 extends: .build
25 script:
26 - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image
27
28qemux86-64:
29 extends: .build
30 script:
31 - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image
32
33qemuarm:
34 extends: .build
35 script:
36 - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image
37
38qemuarm64:
39 extends: .build
40 script:
41 - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image
42
43qemumppc:
44 extends: .build
45 script:
46 - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image
47
48qemumips64:
49 extends: .build
50 script:
51 - ./scripts/ci-build.sh $CI_JOB_NAME security-build-image
52
53qemuriscv64:
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 @@
1header:
2 version: 8
3
4distro: poky
5
6repos:
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
26local_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
47bblayers_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 @@
1header:
2 version: 8
3 includes:
4 - kas-security-base.yml
5
6machine: 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 @@
1header:
2 version: 8
3 includes:
4 - kas-security-base.yml
5
6machine: 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 @@
1header:
2 version: 8
3 includes:
4 - kas-security-base.yml
5
6machine: 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 @@
1header:
2 version: 8
3 includes:
4 - kas-security-base.yml
5
6machine: 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 @@
1header:
2 version: 8
3 includes:
4 - kas-security-base.yml
5
6machine: 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 @@
1header:
2 version: 8
3 includes:
4 - kas-security-base.yml
5
6machine: 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
3set -e
4
5CONF=$1
6shift 1
7IMAGES=$@
8
9( kas shell kas/${CONF}.yml -c "bitbake --setscene-only ${IMAGES}" || true ) | sed -e '/^NOTE: .*Started$/d' -e '/^NOTE: Running /d'
10kas 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
3set -e
4
5export SSTATE_CACHE_DIR=/home/srv/sstate/master
6
7./poky/scripts/sstate-cache-management.sh -d -y