forked from CoatiSoftware/Sourcetrail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
113 lines (98 loc) · 2.4 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
110
111
112
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
IMAGE_64: coatisoftware/centos6_64_qt_llvm:qt5101-llvm800
IMAGE_32: coatisoftware/centos6_32_qt_llvm:qt5101-llvm800
## Templates ##
.build_template: &build_def
stage: build
before_script:
# CCache Config/jobs
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
script:
- ./script/buildonly.sh all
- ./script/buildonly.sh package
# - ./script/build.sh release test
artifacts:
name: "$CI_JOB_NAME"
paths:
- Sourcetrail*.tar.gz
expire_in: 3 days
.deploy_template: &deploy_def
image: alpine
stage: deploy
before_script:
- apk add --no-cache lftp git
script:
- VERS=$(git describe --long | sed 's/-/./' | sed 's/-.*//')
- TARGET_DIR=releases-$CI_ENVIRONMENT_NAME/$TYPE/$VERS
- echo $TARGET_DIR/$CI_ENVIRONMENT_NAME/$TYPE/
- lftp -u $FTP_USER,$FTP_PW -p $FTP_PORT $FTP_ADDR -e "mkdir $TARGET_DIR; mput -O $TARGET_DIR Sourcetrail*; bye"
only:
- master
- tags
- /^release.*$/
## Build Stage ##
build:Linux64:
image: $IMAGE_64
when: manual
cache:
key: cache_linux_64
paths:
- ccache/
- java_indexer/.m2/repository
<<: *build_def
build:Linux32:
image: $IMAGE_32
when: manual
cache:
key: cache_linux_32
paths:
- ccache/
- java_indexer/.m2/repository
<<: *build_def
## Deploy ##
deploy:Linux_staging_beta:
when: manual
environment:
name: staging
variables:
TYPE: beta
<<: *deploy_def
deploy:Linux_staging_full:
when: manual
environment:
name: staging
variables:
TYPE: full
<<: *deploy_def
deploy:Linux_production_beta:
when: manual
environment:
name: production
variables:
TYPE: beta
<<: *deploy_def
deploy:Linux_production_full:
when: manual
environment:
name: production
variables:
TYPE: full
<<: *deploy_def
deploy:Linux_tag_staging:
environment:
name: staging
variables:
TYPE: beta
<<: *deploy_def
only:
- tags
## could be interesting for daily/weekly/monthly builds
# https://docs.gitlab.com/ce/user/project/pipelines/schedules.html
#
#job:on-schedule:
#only:
# - schedules
#