-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
63 lines (58 loc) · 1.08 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
stages:
- test
- deploy
variables:
INNER_NAME: "RHCSKY"
test_flutter:
tags:
- runner
stage: test
script:
- echo INNER_NAME=$INNER_NAME
only:
- main
- dev
- merge_requests
test_nodejs:
tags:
- runner
stage: test
script:
- echo INNER_NAME=$INNER_NAME
only:
- main
- dev
- merge_requests
test_flask:
image:
name: pytorch/pytorch:latest
tags:
- runner
stage: test
before_script:
- cd flask-api
- export PATH=/opt/conda/bin:$PATH
# - python3 -m pip install -r requirements.txt
script:
- echo INNER_NAME=$INNER_NAME
only:
- main
- dev
- merge_requests
deploy_to_server:
stage: deploy
before_script:
- 'command -v ssh-agent >/dev/null || ( apk add --update openssh )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan $VM_IPADDRESS >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh $SSH_USER@$VM_IPADDRESS "hostname && sh git_pull.sh"
artifacts:
paths:
- public
only:
- main