Newer
Older
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
# _____ _ _
# | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
# | __| _| -_| -_| . | . | | . | . | | -_|
# |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
#
# Freedom in the Cloud
#
# Gitlab-CI: Build and Test to ensure that known bugs get caught
#
# License
# =======
#
# Copyright (C) 2019 Liam Hurwitz <liam@contra-bit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This file builds images for freedombone and tests various apps
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
#
# The Freedombone Docker image is defined in the Dockerfile, its purpose is to build and test freedombone. Using a docker image has the advantage, that most overhead is removed from the setup phase.
# TODO: Currently erverything is run as root
#
# Local Testing is sometimes more Verbose. To run locally make sure you have gitlab-runner and docker installed,
# then run gitlab-runner exec docker [testname]
image: gitlab.informatik.uni-bremen.de:5005/turingcomplete/freedombone:latest
stages:
- build
- test
- deploy
build amd64:
stage: build
script:
- echo "Buidling Image for amd64"
- freedombone-image -t amd64 -m http://www.fb3.uni-bremen.de/download/linux/debian/debian/
artifacts:
paths:
- freedombone-main-all-amd64.img
only:
- tags
build qemu64:
stage: build
script:
- echo "Buidling Image for qemu-x86_64"
- freedombone-image -t qemu-x86_64 -m http://www.fb3.uni-bremen.de/download/linux/debian/debian/
artifacts:
paths:
- freedombone-main-all-qemu-x86_64.img
only:
- tags
build beaglebonegreen:
stage: build
script:
- echo "Buidling Image for beaglebonegreen"
- freedombone-image -t beaglebonegreen -m http://www.fb3.uni-bremen.de/download/linux/debian/debian/
artifacts:
paths:
- freedombone-main-all-beaglebonegreen.img
only:
- tags
build beaglebonegreenmesh:
stage: build
script:
- echo "Buidling Image for beaglebonegreen"
- freedombone-image -t beaglebonegreen -m http://www.fb3.uni-bremen.de/download/linux/debian/debian/ -v mesh
artifacts:
paths:
- freedombone-main-all-beaglebonegreen.img
only:
- tags
build amd64meshclient:
stage: build
script:
- echo "Buidling Image for amd64 meshclient"
- freedombone-image -t amd64 -m http://www.fb3.uni-bremen.de/download/linux/debian/debian/ -v meshclient
artifacts:
paths:
- freedombone-main-all-beaglebonegreen.img
only:
- tags
build menuconfig-onion:
stage: build
script:
# Install Freedombone to local testing for testing
# TODO: make sure,that tests have access to this build
# TODO: add headless menuconfig
- export TERMINFO=/usr/lib/terminfo
- echo $TERMINFO
- sudo freedombone menuconfig-onion
build menuconfig:
stage: build
script:
- export TERMINFO=/usr/lib/terminfo
- echo $TERMINFO
- sudo freedombone menuconfig
test syncthing:
stage: test
script:
# TODO: Emualte User in Browser for Clicks in postinstall with python programm
# Then scrape HTML in order to use assertions to check if app works
- echo "Testing Install for Syncthing"
- freedombone addremove add syncthing
- echo "For example run a test suite"
- freedombone addremove remove syncthing
test2:
stage: test
script:
- echo "Do another parallel test here"
- echo "For example run a lint test"
deploy1:
stage: deploy
script:
# TODO: Decide where to host images, and then push artefacts to website
# Hosting at Uni Bremen should be no problem. TODO: Ask about logging
- echo "Do your deploy here"