Skip to content

Commit 8bcf8e8

Browse files
committed
Switch to use GitLab CI for ARM builds
1 parent 9cf6a0f commit 8bcf8e8

File tree

2 files changed

+176
-0
lines changed

2 files changed

+176
-0
lines changed

.gitlab-ci.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
image: golang:1.10-stretch
2+
3+
variables:
4+
REPO_NAME: github.com/ernoaapa/eliot-os
5+
6+
stages:
7+
- test
8+
- build
9+
- publish
10+
11+
before_script:
12+
- go version
13+
# Move project under $GOPATH
14+
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
15+
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
16+
- cd $GOPATH/src/$REPO_NAME
17+
# Build tools
18+
- go get -u github.com/linuxkit/linuxkit/src/cmd/linuxkit
19+
# - go get -u github.com/estesp/manifest-tool
20+
# - go get -u github.com/tcnksm/ghr
21+
# Ensure jq is installed
22+
- apt-get install -y jq
23+
- echo '{}' | jq '.'
24+
# Configure Docker
25+
- echo $DOCKER_PASS | docker login --username $DOCKER_USER --password-stdin
26+
27+
test:
28+
stage: test
29+
tags:
30+
- arm64
31+
script:
32+
- cd pkg
33+
- make forcebuild
34+
35+
publish:arm64:
36+
stage: publish
37+
tags:
38+
- arm64
39+
script:
40+
- cd pkg
41+
- GOOS=linux GOARCH=arm64 make forcepush
42+
43+
publish:armv6:
44+
stage: publish
45+
tags:
46+
- armv6
47+
script:
48+
- cd pkg
49+
- GOOS=linux GOARCH=arm GOARM=6 make forcepush
50+
51+
publish:armv7:
52+
stage: publish
53+
tags:
54+
- armv7
55+
script:
56+
- cd pkg
57+
- GOOS=linux GOARCH=arm GOARM=7 make forcepush

rpi3-persisted.yml

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
kernel:
2+
image: linuxkit/kernel:4.14.27
3+
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
4+
init:
5+
- linuxkit/init:b212cfeb4bb6330e0a7547d8010fe2e8489b677a
6+
- linuxkit/runc:7c39a68490a12cde830e1922f171c451fb08e731
7+
- linuxkit/containerd:37e397ebfc6bd5d8e18695b121166ffd0cbfd9f0
8+
- linuxkit/ca-certificates:v0.2
9+
onboot:
10+
- name: sysctl
11+
image: linuxkit/sysctl:v0.2
12+
- name: netdev
13+
image: linuxkit/modprobe:v0.2
14+
# smsc95xx - https://github.com/linuxkit/linuxkit/blob/master/docs/platform-rpi3.md#networking
15+
# mmc_block - Load MMC block device driver so the sdcard is visible in /dev/mmc*
16+
command: ["modprobe", "-a", "smsc95xx", "mmc_block" ]
17+
- name: extend
18+
# Note: temporarily use ernoaapa/extend to extend the last partition
19+
# See: https://github.com/linuxkit/linuxkit/issues/2971
20+
image: ernoaapa/extend:187548787419ea12ce02025cc50cf6ff5d6bfc7a
21+
command: ["/usr/bin/extend", "/dev/mmcblk0"]
22+
- name: format
23+
image: linuxkit/format:v0.2
24+
command: ["/usr/bin/format", "-force", "-type", "ext4", "-label", "DATA", "-verbose", "/dev/sda"]
25+
- name: mount-disk
26+
image: linuxkit/mount:v0.2
27+
# command: ["/usr/bin/mountie", "/dev/mmcblk0p2", "/var"]
28+
command: ["/usr/bin/mountie", "-device", "/dev/sda1", "/var/foo"]
29+
binds:
30+
- /dev:/dev
31+
- /var:/var:rshared,rbind
32+
- /:/hostroot
33+
- /etc/fstab:/etc/fstab
34+
- /mnt:/mnt
35+
# - name: mount-fstab
36+
# image: linuxkit/mount:v0.2
37+
# binds:
38+
# - "/etc/fstab:/etc/fstab"
39+
# command: ["/bin/mount", "-a", "-v"]
40+
# - name: mount-tmp
41+
# image: linuxkit/mount:v0.2
42+
# command: ["/bin/sh", "-c", "mkdir -p /mnt/tmp && mount --bind /mnt/tmp /tmp"]
43+
# - name: mount-containers
44+
# image: linuxkit/mount:v0.2
45+
# command: ["/bin/sh", "-c", "mkdir -p /mnt/containers && mount --bind /mnt/containers /containers"]
46+
# - name: mount-var
47+
# image: linuxkit/mount:v0.2
48+
# command: ["/bin/sh", "-c", "mkdir -p /mnt/var && mount --bind /mnt/var /var"]
49+
- name: dhcpcd
50+
image: linuxkit/dhcpcd:v0.2
51+
# Halts until dhcpcd can resolve ip address
52+
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
53+
54+
services:
55+
- name: getty
56+
image: linuxkit/getty:v0.2
57+
env:
58+
# Makes the terminal open without password prompt
59+
- INSECURE=true
60+
binds:
61+
- "/etc/resolv.conf:/etc/resolv.conf"
62+
- "/run:/run"
63+
- "/tmp:/tmp"
64+
- "/etc:/hostroot/etc"
65+
- "/usr/bin/ctr:/usr/bin/ctr"
66+
- "/usr/bin/runc:/usr/bin/runc"
67+
- "/containers:/containers"
68+
- "/var/log:/var/log"
69+
- "/dev:/dev"
70+
- "/sys:/sys"
71+
- "/proc:/hostroot/proc"
72+
- "/var:/var"
73+
- "/var/foo:/var/foo"
74+
- name: ntpd
75+
image: linuxkit/openntpd:v0.2
76+
- name: dhcpcd
77+
image: linuxkit/dhcpcd:v0.2
78+
79+
- name: eliotd
80+
image: ernoaapa/eliotd:v0.2.8
81+
command: ["/eliotd", "--debug", "--profile", "--grpc-api-listen", "0.0.0.0:5000"]
82+
capabilities:
83+
- all
84+
net: host
85+
pid: host
86+
runtime:
87+
mkdir: ["/var/lib/volumes"]
88+
binds:
89+
- /containers:/containers
90+
- /var/lib/volumes:/var/lib/volumes
91+
- /var/lib/containerd:/var/lib/containerd
92+
- /run/containerd:/run/containerd
93+
- /etc/resolv.conf:/etc/resolv.conf
94+
- /etc/machine-id:/etc/machine-id
95+
- /var/log:/var/log # To be able to serve default containers logs through api
96+
- /tmp:/tmp # To be able to read temporary fifo log files
97+
- /run:/run
98+
- /dev:/dev
99+
- /sys:/sys
100+
101+
files:
102+
- path: /etc/issue
103+
contents: "welcome to EliotOS"
104+
- path: /etc/machine-id
105+
contents: "todo-generate"
106+
mode: "0600"
107+
# - path: /etc/fstab
108+
# contents: |
109+
# /mnt/containers /containers bind bind
110+
# /mnt/var/lib /var/lib bind bind
111+
# /mnt/var/log /var/log bind bind
112+
# /mnt/tmp /tmp bind bind
113+
trust:
114+
org:
115+
- linuxkit
116+
# image:
117+
# partitions:
118+
# - { start: 1048576, size: 104857600, boot: true, type: "fat32" } # 100MB partition for boot
119+
# - { start: 105906688, size: 52428800, type: "ext4" } # 50MB partition (get extended on boot) for persisted

0 commit comments

Comments
 (0)