-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
109 lines (104 loc) · 2.68 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
101
102
103
104
105
106
107
108
109
# This file is a template, and might need editing before it works on your project.
# Official docker image.
variables:
GIT_SUBMODULE_STRATEGY: "normal"
IS_FXSERVER: "1"
stages:
- prep
- build-docs
- deploy-docs
- build-server
- deploy-server
prep-linux:
variables:
BOOST_ROOT: "$CI_PROJECT_DIR\\libs\\boost_1_64_0"
artifacts:
paths:
- fivem/code/bin
untracked: true
image: alpine:latest
stage: build-server
variables:
GIT_STRATEGY: clone
script:
- docker pull alpine:3.6
- git clone https://github.com/citizenfx/fivem.git work
- cd work
- git submodule update --init --recursive
- curl -O -L https://github.com/grammarly/rocker/releases/download/1.3.0/rocker_linux_amd64.tar.gz
- tar xvf rocker_linux_amd64.tar.gz
- cd code/
- ../rocker build
tags:
- docker
build server:
stage: build-server
tags:
- win32
when: manual
cache:
paths:
- save\*
before_script:
- cmd /c "git clone `"https://github.com/citizenfx/fivem.git`" work"
- ."$env:CI_PROJECT_DIR\Build-Scripts\scripts\fxs-components\win32\componentLinker.ps1" -WorkDir "$env:CI_PROJECT_DIR\work" -SrcDir "$env:CI_PROJECT_DIR\."
- cd work
script:
- ."$env:CI_PROJECT_DIR\Build-Scripts\scripts\fxs-components\win32\FiveM.ps1" -WorkDir "$env:CI_PROJECT_DIR\work" -SaveDir "$env:CI_PROJECT_DIR\save"
artifacts:
paths:
- save\bin
- work\out
build docs :
tags:
- win32
stage: build-docs
script:
- cd docs\slate
- bundle install
- bundle exec middleman build --clean
artifacts:
paths:
- docs\slate\build
deploy_review:
stage: deploy-docs
tags:
- win32
script:
- New-Item -ItemType Directory -Force -Path "C:\www\docs\staging\fxs_web\$env:CI_COMMIT_REF_NAME"
- cp -recurse -force docs\slate\build\* "C:\www\docs\staging\fxs_web\$env:CI_COMMIT_REF_NAME"
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://win01.fivem-scripts.org/docs/staging/fxs_web/$CI_COMMIT_REF_NAME
only:
- branches
except:
- master
dependencies:
- build docs
deploy production docs:
tags:
- win32
stage: deploy-docs
script:
- rm -force -recurse C:\www\docs\prod\fxs_web\*
- cp -recurse -force docs\slate\build\* C:\www\docs\prod\fxs_web
dependencies:
- build docs
only:
- master
when: manual
environment:
name: Production docs
url: https://win01.fivem-scripts.org/docs/prod/fxs_web/
deploy server:
tags:
- win32
when: manual
stage: deploy-server
script:
- stop-service fxserver-gitlab
- 7z x -y -o"$env:DEPLOY_PATH" $env:CI_PROJECT_DIR\work\out\server.zip
- start-service fxserver-gitlab
dependencies:
- build server