-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
64 lines (61 loc) · 1.9 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
variables:
ACADEMIC_YEAR:
value: "2022/2023"
description: "Academic year in form 'yyyy/yyyy'"
DOC_NAME:
value: "booklet_ps5_2022-2023"
description: "Name of output documents (pdf and csv)"
PROJECT_TYPE:
value: "ps5"
description: "Type of project to build (ps5, ps6 or tb)"
TAG:
value: "none"
description: "Tag projects and use this tag to fetch git project (keep none to not tag projects and fetch last commit on main)"
OVERRIDE_TAG:
value: "False"
description: "Override tag if projects already taged with this tag (True/False)"
GITLAB_TOKEN: $GITLAB_TOKEN
stages:
- build
build-kaniko:
stage: build
only:
- tags
image:
name: 'gcr.io/kaniko-project/executor:debug'
entrypoint:
- ''
script:
- >-
echo
"{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}"
> /kaniko/.docker/config.json
- >-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile
$CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
--destination $CI_REGISTRY_IMAGE:latest
create-booklet:
image: "registry.forge.hefr.ch/damien.goetschi/projetu:latest"
stage: build
when: manual
script:
- projetu-book --page-template=page.md --template=booklet.md --type $PROJECT_TYPE --school-year $ACADEMIC_YEAR --output $DOC_NAME --tag $TAG --token $GITLAB_TOKEN
- xelatex $DOC_NAME.tex
- xelatex $DOC_NAME.tex
- xelatex $DOC_NAME.tex
- makeindex $DOC_NAME
- texindy -L french -C utf8 $DOC_NAME.idx
- xelatex $DOC_NAME.tex
- xelatex $DOC_NAME.tex
- xelatex $DOC_NAME.tex
artifacts:
when: always
paths:
- ./*.pdf
- ./*.csv
tag-projects:
image: "registry.forge.hefr.ch/damien.goetschi/projetu:latest"
stage: build
when: manual
script:
- projetu-tag --tag $TAG --override $OVERRIDE_TAG --token $GITLAB_TOKEN