forked from 3liz/lizmap-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
58 lines (52 loc) · 1.54 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
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- test
- build
- package 📦
- deploy 🚀
- release
test:server:
stage: test
script: make test_server
environment:
name: snap
tags:
- infrav3
package:
stage: package 📦
only:
- schedules
before_script:
- TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
- VERSION=$(echo ${TAG} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')-beta
script:
# --transifex-token ${TX_TOKEN} # Need to fix the docker image about lrelease
- >
docker run
--rm -w /plugin
-v ${CI_PROJECT_DIR}:/plugin
-u $(id -u):$(id -g)
3liz/qgis-plugin-ci:2.0.1
package ${VERSION}
--allow-uncommitted-changes
--disable-submodule-update
after_script:
- TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
- VERSION=$(echo ${TAG} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')-beta
- mv lizmap.${VERSION}.zip lizmap-qgis-plugin.${CI_COMMIT_REF_NAME}.zip
tags:
- factory
artifacts:
paths:
- lizmap-qgis-plugin.${CI_COMMIT_REF_NAME}.zip
deploy:
stage: deploy 🚀
only:
- schedules
script:
- upload_to_packages_server lizmap-qgis-plugin.${CI_COMMIT_REF_NAME}.zip pub/lizmap-qgis-plugin/${CI_COMMIT_REF_NAME}
tags:
- fabric
# Infrav3 build
include: '/.lizcloud/.gitlab-ci.yml'