-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
75 lines (65 loc) · 1.57 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
###############################################################################
## VARIABLES
# NA
###############################################################################
## CACHE
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- artifacts/
- paper/*.pdf
###############################################################################
## STAGES
stages:
- build
- artifacts
###############################################################################
## BUILD
build PDF:
stage: build
tags:
- shell
script:
- echo "==================================";
- echo "[info] generate PDF ";
- ./docker_build_pdf.sh
- echo "==================================";
after_script:
- echo "==================================";
- echo "[info] copy generated PDF into 'artifacts' directory ";
- test -d artifacts || mkdir artifacts
- cp paper/paper.pdf artifacts/
- echo "==================================";
###############################################################################
## ARTIFACTS
# build artifact for dev. branches
pdf-tmp:
stage: artifacts
tags:
- shell
except:
refs:
- master
- tags
script:
- ls artifacts/
artifacts:
name: mama-paper-$CI_COMMIT_REF_NAME
expire_in: 1 day
paths:
- $CI_PROJECT_DIR/artifacts
# build artifact for stables releases
pdf-lts:
stage: artifacts
tags:
- shell
only:
refs:
- master
- tags
script:
- ls artifacts/
artifacts:
name: mama-paper-$CI_COMMIT_REF_NAME
paths:
- $CI_PROJECT_DIR/artifacts