Select Git revision
.gitlab-ci.yml
Forked from
Datenbank- und Informations-Systeme / angproj
10 commits behind the upstream repository.
-
Raphael Das Gupta authored
Throw away local changes when the CI checks out the commit to be built.
Raphael Das Gupta authoredThrow away local changes when the CI checks out the commit to be built.
.gitlab-ci.yml 3.68 KiB
variables:
PANDOC_IMAGE: gitlab.dev.ifs.hsr.ch:45023/ifs/gitlabmarkdowntopdf/pandoc:v1.5
stages:
- build
before_script:
.job_template: &job_definition
image: $PANDOC_IMAGE
stage: build
variables: &job_common_vars
LANG: en_US.utf8
MaxDepth: "1"
SourceFiles: "NotThere.Md"
GIT_CHECKOUT: "false"
FileOutputDir: $CI_PROJECT_DIR
tags:
- docker
script:
# do not fetch lfs content for docu jobs, change if job requires lfs files
- git config --global --remove-section filter.lfs || true
- export JOB_DIR=${JOB_DIR:-${CI_JOB_NAME/-Solutions/}}
- git config core.hooksPath hooks/
# checkout again to execute custom git-hooks
- git checkout -f $CI_COMMIT_SHA
- git clean -dxf
- git archive -o ${FileOutputDir}/${CI_JOB_NAME}.zip HEAD
- >
for n in $(find $JOB_DIR -maxdepth $MaxDepth "(" -name $SourceFiles -o -iname README.md ")" -print ); do
echo $n;
fn=$(basename $n);
( cd $(dirname $n) &&
pandoc -f markdown+emoji
-t latex
--pdf-engine=xelatex
--template=hsrtemplate
--filter=gfm_cleanup.py --filter=gitlab_links.py
--filter=plantuml.py --filter=svg_convert.py
-Vdate=$(date "+%Y-%m-%d")
-o $CI_PROJECT_DIR/${CI_JOB_NAME}.pdf $fn $CI_PROJECT_DIR/pandoc_meta.yaml ) &
done;
wait;
- >
for n in $(find $JOB_DIR -maxdepth $MaxDepth "(" -name $SourceFiles -o -iname README.md ")" -exec grep -q "SOLUTION" {} \; -print ); do
echo $n;
fn=$(basename $n);
( cd $(dirname $n) &&
pandoc -f markdown+emoji
-t latex
--pdf-engine=xelatex
--template=hsrtemplate --filter=inline_solutions.py
--filter=gfm_cleanup.py --filter=gitlab_links.py
--filter=plantuml.py --filter=svg_convert.py
-Vdate=$(date "+%Y-%m-%d") -Vsolution=1
-o $CI_PROJECT_DIR/${CI_JOB_NAME}-Solutions.pdf $fn $CI_PROJECT_DIR/pandoc_meta.yaml ) &
done;
wait;
artifacts:
#expire_in: 3 mos
paths:
- ${FileOutputDir}/${CI_JOB_NAME}*.pdf
- ${FileOutputDir}/${CI_JOB_NAME}.zip
AngProj:
<<: *job_definition
variables:
<<: *job_common_vars
JOB_DIR: '.'