This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
49 lines (48 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
compile_pdf:
stage: build
image: timnn/texlive
script:
- echo GE_JOB_ID=$CI_JOB_ID >> compile_pdf.env
- cd report
- xelatex report.tex -output-directory=..
- xelatex report.tex -output-directory=..# One more for good measure
- xelatex slides.tex -output-directory=..
- xelatex slides.tex -output-directory=..# One more for good measure
- cd ..
artifacts:
paths:
- report/report.pdf
- report/slides.pdf
reports:
# To ensure we've access to this file in the next stage
dotenv: compile_pdf.env
only:
- merge_requests
- main
release_job:
stage: deploy
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
# - if: $CI_COMMIT_TAG
# when: never # Do not run this job when a tag is created manually
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch
script:
- echo "running release_job for $TAG"
needs:
- job: compile_pdf
artifacts: true
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
name: "v0.$CI_PIPELINE_IID ($CI_COMMIT_SHORT_SHA)"
tag_name: "v0.$CI_PIPELINE_IID" # The version is incremented per pipeline.
description: "v0.$CI_PIPELINE_IID"
ref: "$CI_COMMIT_SHA" # The tag is created from the pipeline SHA.
assets:
links:
- name: "docker-compose.yml"
url: "https://git.hjkl.gq/team13/birdazzone-full/-/raw/v0.$CI_PIPELINE_IID/docker-compose.yml"
- name: "production.yml"
url: "https://git.hjkl.gq/team13/birdazzone-full/-/raw/v0.$CI_PIPELINE_IID/production.yml"
- name: "Report"
url: "https://git.hjkl.gq/team13/birdazzone-full/-/jobs/$GE_JOB_ID/artifacts/raw/report/report.pdf?inline=false"
- name: "Slides"
url: "https://git.hjkl.gq/team13/birdazzone-full/-/jobs/$GE_JOB_ID/artifacts/raw/report/slides.pdf?inline=false"