-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.gitlab-ci.yml
44 lines (35 loc) · 1.07 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
stages:
- prepare
- build
- package
- deploy
- finalize
.production:
only:
- /^[0-9]+?\.[0-9]+?\.[0-9]+?$/i
.merge_request:
only:
- merge_requests
push main to master:
stage: prepare
image: alpine
only:
refs:
- main@tivolicloud/interface
script:
- apk add git openssh
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_PUSH_MAIN_TO_MASTER" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan git.tivolicloud.com >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- git remote set-url origin [email protected]:tivolicloud/interface.git
- git fetch origin master
- git push origin HEAD:master --force
include:
- local: .gitlab/build/linux.gitlab-ci.yml
- local: .gitlab/build/windows.gitlab-ci.yml
- local: .gitlab/build/macos.gitlab-ci.yml
- local: .gitlab/deploy.gitlab-ci.yml
- local: .gitlab/finalize.gitlab-ci.yml