-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.gitlab-ci.yml
100 lines (93 loc) · 3.41 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
99
100
image: registry.exo.cool/exo/mta-gamemode-build:latest
stages:
- build
- fast_deploy
- build_docker
- deploy
# Build jobs
build_app_job:
tags:
- linux
- dind
stage: build
script:
- 'echo "GIT_VERSION=\"$(git rev-parse HEAD)\" ; GIT_BRANCH=\"$CI_BUILD_REF_NAME\"" >> vrp/buildinfo.lua'
- python3 build/lint.py
- python3 build/buildscript.py --branch $CI_BUILD_REF_NAME
- python3 build/packAssets.py
- ./build/make_archives.sh
artifacts:
name: "$CI_BUILD_NAME"
expire_in: 2 days
paths:
- artifacts.tar.gz
- assets.tar.gz
build_docker_job:
image: docker:17.06.0-ce
tags:
- linux
- dind
stage: build_docker
script:
#- wget -q --no-check-certificate -O build/workerserver https://do-not.press/exo/workerserver # Built by deploy-workerunit project
#- wget -q --no-check-certificate -O build/ml_gps.so https://do-not.press/exo/ml_gps.so # Built by mta-module-gps project
- apk add --update openssl
- apk add curl
- wget -q -O build/workerserver https://upload.exo-reallife.de/build/workerserver # Built by deploy-workerunit project
- wget -q -O build/ml_gps.so https://upload.exo-reallife.de/build/ml_gps.so # Built by mta-module-gps project
- wget -q -O build/ml_jwt.so https://glare.vercel.app/eXo-OpenSource/ml_jwt/ml_jwt.so # Built by eXo-OpenSource/ml_jwt project
- wget -q -O build/ml_redis.so https://glare.vercel.app/eXo-OpenSource/ml_redis/ml_redis.so # Built by eXo-OpenSource/ml_redis project
- docker build -t exo-rl-mta .
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker tag exo-rl-mta $CI_REGISTRY_IMAGE:latest-$(echo $CI_BUILD_REF_NAME | tr -d /)
- '[ "$CI_BUILD_REF_NAME" == "master" ] && docker tag exo-rl-mta $CI_REGISTRY_IMAGE:latest'
- docker push "$CI_REGISTRY_IMAGE"
- curl -k -F "secret=$ASSETS_UPLOAD_SECRET_KEY" -F "git_branch=$CI_BUILD_REF_NAME" -F [email protected] https://upload.exo-reallife.de/upload.php
- curl -k -F "secret=$ASSETS_UPLOAD_SECRET_KEY" -F "git_branch=$CI_BUILD_REF_NAME" -F [email protected] https://download2.exo-reallife.de/upload.php
only:
- master
- release/pre-production
- release/production
# Deploy jobs
deploy_job_bugfixes:
tags:
- linux
- dind
stage: fast_deploy
script:
- curl -F "[email protected]" -H "API_SECRET:$WORKER_API_SECRET_DEVELOP" http://mta.exo-reallife.de:5002/upload
#- curl -F "command=restart vrp_build" -H "API_SECRET:$WORKER_API_SECRET_DEVELOP" http://mta.exo-reallife.de:5002/command
environment:
name: development
url: http://mta.exo-reallife.de:5002/
only:
- /^bugfix\/.*$/
deploy_job_develop:
tags:
- linux
- dind
stage: deploy
script:
#- curl -F "secret=$ASSETS_UPLOAD_SECRET_KEY" -F "git_branch=$CI_BUILD_REF_NAME" -F [email protected] http://ts.exo-reallife.de/upload/upload.php
- curl http://$DEPLOYRON_IP:6000/deploy/mta_develop?APISecret=$DEPLOY_API_SECRET_DEVELOP
only:
- master
deploy_job_testing:
tags:
- linux
- dind
stage: deploy
script:
- curl http://$DEPLOYRON_IP:6000/deploy/mta_testing?APISecret=$DEPLOY_API_SECRET_TESTING
only:
- release/testing
deploy_job_production:
tags:
- linux
- dind
stage: deploy
script:
- curl http://$DEPLOYRON_IP:6000/deploy/mta_production?APISecret=$DEPLOY_API_SECRET_PRODUCTION
only:
- release/production
when: manual