blob: 564885e784aa260435d8831bc8be095dc22e2817 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
image: fedora:26
variables:
YBD_base: "/cache/ybd_base"
stages:
- validate
- build-1
- deploy-1
- build-2
- build-3
before_script:
- export LC_ALL="C.UTF-8"
- export XDG_CACHE_HOME=/cache
- dnf install -y git python-devel
- export CI_YBD_BRANCH=`[[ "$CI_BUILD_REF_NAME" =~ ^staging/fromybd/ ]] && echo -b ${CI_BUILD_REF_NAME#staging/fromybd/}`
- git clone https://gitlab.com/baserock/spec.git
- git clone https://gitlab.com/baserock/ybd.git $CI_YBD_BRANCH
- cd ybd && ./install_dependencies.sh && cd ..
- pip install -r spec/requirements.txt
# Install buildstream
- dnf install -y bubblewrap ostree python3 python3-pip python3-gobject python3-devel
- git clone https://gitlab.com/buildstream/buildstream
- python3 -m pip install buildstream/
# Private key stored as a protected variable that allows pushing to
# ostree@ostree.baserock.org
- |
if [ -z "$baserock_ostree_cache_private_key" ]; then
echo >&2 "Private key for ostree.baserock.org is not available."
exit 1
fi
mkdir -p ~/.ssh
echo "$baserock_ostree_cache_private_key" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
# Trust the host key of the cache server.
- ssh-keyscan -p 22200 ostree.baserock.org >> ~/.ssh/known_hosts
# Enable push and pull for Baserock artifact cache
- |
mkdir -p ~/.config
echo "artifacts:" > ~/.config/buildstream.conf
echo " pull-url: https://ostree.baserock.org/cache/" >> ~/.config/buildstream.conf
echo " push-url: ostree@ostree.baserock.org:cache" >> ~/.config/buildstream.conf
echo " push-port: 22200" >> ~/.config/buildstream.conf
cat ~/.config/buildstream.conf
migrate-bst:
stage: validate
script:
- git clone https://gitlab.com/baserock/definitions.git
- git clone https://gitlab.com/BuildStream/defs2bst.git -b jjardon/target_dumpmachine
- git clone https://gitlab.com/BuildStream/buildstream-tests.git -b gnu-toolchain
- ./defs2bst/defs2bst.py --ybd ybd/ybd.py
--definitions definitions
--output buildstream-tests/elements
--rebase strata/build-essential.morph gnu-toolchain.bst
systems/build-system-x86_64.morph x86_64
- ./defs2bst/defs2bst.py --ybd ybd/ybd.py
--definitions definitions
--output buildstream-tests/elements
--rebase strata/build-essential.morph gnu-toolchain.bst
gnome/systems/gnome-system-x86_64.morph x86_64
artifacts:
paths:
- buildstream-tests/
validate-all-definitions:
stage: validate
script:
- python spec/quick_check.py .
bst-build-system-x86_32-build:
stage: build-1
script:
- bst --colors -C buildstream-tests build build-system-x86_64-content.bst
dependencies:
- migrate-bst
build-system-x86_64-chroot-build:
stage: build-1
variables:
YBD_kbas_url: "false_url"
script:
- ybd/ybd.py systems/build-system-x86_64-chroot.morph x86_64
build-system-x86_64-chroot-deploy:
stage: deploy-1
dependencies:
- build-system-x86_64-chroot-build
script:
- ybd/ybd.py clusters/build-system-x86_64-chroot-deploy.morph x86_64
artifacts:
name: "${CI_BUILD_NAME}-${CI_BUILD_REF}"
paths:
- build-system-x86_64-chroot.tar
#build-system-armv7lhf-rootfs-build:
# stage: build-1
# script:
# - sudo ybd/ybd.py systems/build-system-armv7lhf-rootfs.morph armv7lhf
# tags:
# - armv7l
# only:
# - master
# - /^staging\/.*$/
devel-build-64:
stage: build-2
script:
- ybd/ybd.py systems/devel-system-x86_64-generic.morph x86_64
genivi-baseline-build-64:
stage: build-2
script:
- ybd/ybd.py genivi/systems/genivi-baseline-system-x86_64-generic.morph x86_64
- ybd/ybd.py systems/initramfs-x86_64.morph x86_64
genivi-demo-platform-build-64:
stage: build-3
script:
- ybd/ybd.py genivi/systems/genivi-demo-platform-x86_64-generic.morph x86_64
- ybd/ybd.py systems/initramfs-x86_64.morph x86_64
ivi-build-64:
stage: build-3
script:
- ybd/ybd.py ivi/systems/ivi-system-x86_64.morph x86_64
- ybd/ybd.py systems/initramfs-x86_64.morph x86_64
gnome-build-64:
stage: build-3
script:
- ybd/ybd.py gnome/systems/gnome-system-x86_64.morph x86_64
- ybd/ybd.py systems/initramfs-x86_64.morph x86_64
bst-gnome-build-64:
stage: build-3
script:
- bst --colors -C buildstream-tests build gnome/gnome-system-x86_64-content.bst
dependencies:
- migrate-bst
minimal-build-64:
stage: build-1
script:
- ybd/ybd.py systems/minimal-system-x86_64-chroot.morph x86_64
minimal-system-x86_64-chroot-deploy:
stage: deploy-1
dependencies:
- minimal-build-64
script:
- ybd/ybd.py clusters/minimal-system-x86_64-chroot-deploy.morph x86_64
artifacts:
name: "${CI_BUILD_NAME}-${CI_BUILD_REF}"
paths:
- minimal-system-x86_64-chroot.tar
trove-build-64:
stage: build-2
script:
- ybd/ybd.py trove/systems/trove-system-x86_64.morph x86_64
weston-build-64:
stage: build-2
script:
- ybd/ybd.py weston/systems/weston-system-x86_64-generic.morph x86_64
- ybd/ybd.py systems/initramfs-x86_64.morph x86_64
weston-qt-build-64:
stage: build-3
script:
- ybd/ybd.py weston/systems/weston-qt5-system-x86_64.morph x86_64
- ybd/ybd.py systems/initramfs-x86_64.morph x86_64
|