-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.gitlab-ci.yml
36 lines (30 loc) · 909 Bytes
/
.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
image: debian:stretch
before_script:
- source /etc/profile
stages:
- build
- deploy
run-build:
stage: build
script:
- apt-get update
- apt-get install -y devscripts dpkg-dev debhelper debianutils bash-completion fakeroot
- dpkg-buildpackage -us -uc -b
- mkdir build
- mv ../*.deb build/
artifacts:
paths:
- build/*
run-deploy:
stage: deploy
script:
- apt-get update
- apt-get install -y openssh-client
- mkdir -p ~/.ssh
- echo "$SSH_PUBLIC_KEY" > ~/.ssh/id_rsa.pub
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 700 ~/.ssh/
- chmod 600 ~/.ssh/*
- scp -P 50022 build/*.deb aptlywebhook@maikelwever.nl:~/holding-pond/
- ssh -p 50022 aptlywebhook@maikelwever.nl "~/trigger-update.sh"