-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitlab-ci.yml
98 lines (85 loc) · 2.97 KB
/
.gitlab-ci.yml
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
stages:
#- test
- package
#- packagetest
- deploy
#test:debian:
# stage: test
# script:
# - apt-get update -qy
# - apt-get install -y python3-dev python3-pip
# - pip3 install -r requirements.txt
# - python3 setup.py test
# tags:
# - debian
#test:archlinux:
# stage: test
# script:
# - pacman -Sy python-pip python-setuptools gcc --noconfirm
# - pip install -r requirements.txt
# - python setup.py test
# tags:
# - archlinux
package:debian:
stage: package
script:
- apt-get update -qy
- apt-get install -y curl gnupg apt-transport-https
- curl -sL https://repository.salamek.cz/deb/salamek.gpg.key | apt-key add -
- echo "deb https://repository.salamek.cz/deb/pub all main" | tee /etc/apt/sources.list.d/salamek.cz.list
- apt-get update -qy
- apt-get install -y curl gnupg apt-transport-https
- apt-get install -y python3-pip python3-stdeb python3-docopt python3-yaml python3-websockets dh-python
- rm -rf "./deb_dist"
- python3 setup.py --command-packages=stdeb.command sdist_dsc --compat 14 bdist_deb
tags:
- debian
artifacts:
paths:
- deb_dist/*.deb
expire_in: 1d
# dependencies:
# - test:debian
package:archlinux:
stage: package
script:
- echo "[salamek]" >> /etc/pacman.conf
- echo "Server = https://repository.salamek.cz/arch/pub/x86_64" >> /etc/pacman.conf
- echo "SigLevel = Optional" >> /etc/pacman.conf
- pacman -Sy qiosk git python-setuptools xfwm4 fakeroot xf86-video-fbdev xorg-xrandr binutils sudo chromium xorg-server xorg-xset xorg-xinit xorg-xinput alsa-utils ttf-dejavu unclutter python-yaml python-docopt python-websockets base-devel --noconfirm
- useradd -m -G users -s /bin/bash package
- cd archlinux
- sudo -H -u package makepkg -f
- cd -
tags:
- archlinux
artifacts:
paths:
- archlinux/chromium-kiosk*.pkg.tar.zst
expire_in: 1d
# dependencies:
# - test:archlinux
repoupdate:
stage: deploy
variables:
GIT_STRATEGY: none
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script:
- ssh www-data@repository 'rm -rf /var/www/repository.salamek.cz/www/arch/pub/any/chromium-kiosk-2*.pkg.tar.zst'
- ssh www-data@repository 'rm -rf /var/www/repository.salamek.cz/cache/deb/pub/all/chromium-kiosk_2*.deb'
- scp archlinux/chromium-kiosk*.pkg.tar.zst www-data@repository:/var/www/repository.salamek.cz/www/arch/pub/any
- scp deb_dist/*.deb www-data@repository:/var/www/repository.salamek.cz/cache/deb/pub/all
- ssh www-data@repository '/var/www/repository.salamek.cz/deb-pub-update.sh'
- ssh www-data@repository '/var/www/repository.salamek.cz/arch-pub-update.sh'
dependencies:
- package:archlinux
- package:debian
tags:
- docker
only:
- tags