Please check gitlab-tutorial

Skip to content
Snippets Groups Projects
Commit 7dd7f204 authored by Dimitrii Nikolaev's avatar Dimitrii Nikolaev
Browse files

Update .gitlab-ci.yml file

parent cc063619
No related branches found
Tags
No related merge requests found
......@@ -15,11 +15,19 @@
# adnrv/texlive
# LATEX_IMAGE: listx/texlive:2020
stages:
- build
- release
build-windows:
stage: build
tags:
- windows
- latex
before_script:
- echo $CI_JOB_ID
# Writing GE_JOB_ID variable to environment file, will need the value in the next stage.
- echo BUILD_JOB_ID=$CI_JOB_ID >> build-windows.env
script:
# prepare all possible variants of the thesis
- (Get-Content ./Example.tex -Raw) -Replace 'ThesisType.=.{\w*}', 'ThesisType = {SEM}' | Set-Content ./Example_SEM.tex
......@@ -29,12 +37,41 @@ build-windows:
- (Get-Content ./Example.tex -Raw) -Replace 'ThesisType.=.{\w*}', 'ThesisType = {PHD}' | Set-Content ./Example_PHD.tex
# remove Example.tex - no need to compile it now
- rm ./Example.tex
- rm ./Example.pdf
# compile all .tex files
- latexmk -pdf
artifacts:
paths:
- "*.pdf"
reports:
# To ensure we've access to this file in the next stage
dotenv: build-windows.env
release-windows:
stage: release
tags:
- windows
- latex
needs:
- job: build-windows
artifacts: true
variables:
TAG: '$CI_COMMIT_SHA'
script:
- echo "Create Release $TAG"
- echo $JOB_ID
release:
name: 'Release $TAG'
tag_name: '$TAG'
ref: '$TAG'
description: 'Release $TAG'
assets:
links:
- name: "Thesis examples.zip"
url: "git.ift.tuwien.ac.at/lab/pub/ift-latex/-/jobs/${BUILD_JOB_ID}/artifacts/download"
#release:
# stage: release
......@@ -50,5 +87,5 @@ build-windows:
# links:
# - name: 'Compiled example thesis'
# https://example.com/<namespace>/<project>/-/jobs/artifacts/<ref>/download?job=<job_name>
#
#https://git.ift.tuwien.ac.at/lab/pub/ift-latex/-/jobs/524/artifacts/download?file_type=archive
# url: 'https://git.ift.tuwien.ac.at/lab/pub/ift-latex/-/jobs/${GE_JOB_ID}/artifacts/file/*.pdf'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment