1.before-my-script: &before-my-script
2    - echo "$ERR_REPORT_USERNAME" > ~/.oe-send-error
3    - echo "$ERR_REPORT_EMAIL" >> ~/.oe-send-error
4    - export PATH=~/.local/bin:$PATH
5    - wget https://bootstrap.pypa.io/get-pip.py
6    - python3 get-pip.py
7    - python3 -m pip install kas
8
9.after-my-script: &after-my-script
10    - cd $CI_PROJECT_DIR/poky
11    - . ./oe-init-build-env $CI_PROJECT_DIR/build
12    - for x in `ls $CI_PROJECT_DIR/build/tmp/log/error-report/ | grep error_report_`; do
13    - send-error-report -y tmp/log/error-report/$x
14    - done
15    - rm -fr $CI_PROJECT_DIR/build
16
17stages:
18  - base
19  - parsec
20  - musl
21  - test
22
23.base:
24  before_script:
25    - *before-my-script
26  stage: base
27  after_script:
28    - *after-my-script
29
30.parsec:
31  before_script:
32    - *before-my-script
33  stage: parsec
34  after_script:
35    - *after-my-script
36
37.musl:
38  before_script:
39    - *before-my-script
40  stage: musl
41  after_script:
42    - *after-my-script
43
44.test:
45  before_script:
46    - *before-my-script
47  stage: test
48  after_script:
49    - *after-my-script
50
51qemux86:
52  extends: .base
53  script:
54  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k security-build-image integrity-image-minimal"
55  - kas build --target harden-image-minimal kas/$CI_JOB_NAME-harden.yml
56
57qemux86-musl:
58  extends: .musl
59  needs: ['qemux86']
60  script:
61  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
62
63qemux86-parsec:
64  extends: .parsec
65  needs: ['qemux86']
66  script:
67  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
68
69qemux86-test:
70  extends: .test
71  needs: ['qemux86']
72  allow_failure: true
73  script:
74  - kas build --target security-test-image kas/$CI_JOB_NAME.yml
75  - kas build -c testimage --target security-test-image kas/$CI_JOB_NAME.yml
76
77qemux86-64:
78  extends: .base
79  script:
80  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k security-build-image security-tpm-image security-tpm2-image integrity-image-minimal"
81  - kas build --target dm-verity-image-initramfs kas/$CI_JOB_NAME-dm-verify.yml
82  - kas build --target security-build-image kas/$CI_JOB_NAME-alt.yml
83
84qemux86-64-parsec:
85  extends: .parsec
86  needs: ['qemux86-64']
87  script:
88  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
89
90qemuarm:
91  extends: .base
92  script:
93  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
94
95qemuarm-parsec:
96  extends: .parsec
97  needs: ['qemuarm']
98  script:
99  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
100
101qemuarm64:
102  extends: .base
103  script:
104  - kas shell kas/$CI_JOB_NAME.yml  -c "bitbake -k security-build-image security-tpm2-image integrity-image-minimal"
105  - kas build --target security-build-image kas/$CI_JOB_NAME-alt.yml
106
107qemuarm64-musl:
108  extends: .musl
109  needs: ['qemuarm64']
110  script:
111  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
112
113qemuarm64-parsec:
114  extends: .parsec
115  needs: ['qemuarm64']
116  script:
117  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
118
119qemumips64:
120  extends: .base
121  script:
122  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
123
124qemuriscv64:
125  extends: .base
126  script:
127  - kas build --target security-build-image kas/$CI_JOB_NAME.yml
128