-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
80 lines (72 loc) · 1.88 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
stages:
- run_erc
- run_drc
- gen_fab
- deploy
image:
name: setsoft/kicad_auto:dev_k6
erc:
stage: run_erc
script:
- "cd hardware && [ -f *.kicad_sch ] && kibot -d Fabrication -s update_xml,run_drc -i"
rules:
- if: '$CI_COMMIT_TAG'
when: always
artifacts:
when: always
paths:
- hardware/Fabrication/
drc:
stage: run_drc
script:
- "cd hardware && [ -f *.kicad_pcb ] && kibot -d Fabrication -s update_xml,run_erc -i"
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
artifacts:
when: always
paths:
- hardware/Fabrication/
sch_outputs:
stage: gen_fab
script:
- "cd hardware && [ -f *.kicad_sch ] && kibot -d Fabrication -s run_drc,run_erc print_sch"
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
artifacts:
when: always
paths:
- hardware/Fabrication/
pcb_outputs:
stage: gen_fab
script:
- "cd hardware && [ -f *.kicad_pcb ] && kibot -d Fabrication -s run_drc,run_erc print_front gerbers drill zip render && rm -rf Fabrication/Gerbers"
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
artifacts:
when: always
paths:
- hardware/Fabrication/
copy_artifacts:
image: eeacms/rsync:latest
stage: deploy
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
artifacts:
when: always
paths:
- hardware/Fabrication/
script:
- apt-get update -y && apt-get install rsync -y
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan -p 2543 144.76.104.209
- ssh-keyscan -p 2543 144.76.104.209|grep rsa >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- rsync -rvz -e 'ssh -p 2543' ./hardware/Fabrication/* [email protected]:/home/deploy/gerbers/picovic