Skip to content
Snippets Groups Projects
Commit d80a856a authored by Raphael Das Gupta's avatar Raphael Das Gupta
Browse files

remove GitLab CI/CD pipeline

We don't need the project README as PDF.
parent adf143d5
No related branches found
No related tags found
No related merge requests found
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: '.'
Create-Solutions-And-Cleanup-Markdown:
image: $PANDOC_IMAGE
stage: build
variables:
LANG: en_US.utf8
LANGUAGE: ''
LC_ALL: ''
GIT_CHECKOUT: "false"
JOB_DIR: '.'
tags:
- docker
script:
- export JOB_DIR=${JOB_DIR:-$CI_JOB_NAME}
# do not fetch lfs content for docu jobs, change if job requires lfs files
- git config --global --remove-section filter.lfs || true
- git checkout -f $CI_COMMIT_SHA
- >
for n in $(find . -mindepth 1 "(" -iname README.md ")" -print); do
echo $n;
fn=$(basename $n);
( cd $(dirname $n) &&
cat ${fn} 2>/dev/null | sed -e 's|[„“”]|"|g' -e "s|[’]|'|g" -e "s|[–]|-|g" |
pandoc -f markdown+emoji
-t markdown+pipe_tables-grid_tables-simple_tables-multiline_tables-header_attributes-fenced_code_attributes-fenced_code_blocks+backtick_code_blocks+emoji
--template=MetadataAtEOF
--atx-headers --standalone
-o ${fn} ) &
done;
- >
for n in $(find . -mindepth 1 "(" -iname README.md ")" -exec grep -q SOLUTION {} \; -print); do
echo ${n/.md/.solutions.md};
fn=$(basename $n);
( cd $(dirname $n) &&
cat ${fn} 2>/dev/null | sed -e 's|[„“”]|"|g' -e "s|[’]|'|g" -e "s|[–]|-|g" |
pandoc -f markdown+emoji
-t markdown+pipe_tables-grid_tables-simple_tables-multiline_tables-header_attributes-fenced_code_attributes-fenced_code_blocks+backtick_code_blocks+emoji
--template=MetadataAtEOF
--filter=inline_solutions.py
--atx-headers --standalone
-o ${fn/.md/.solutions.md} ) &
done;
wait;
artifacts:
expire_in: 1 day
paths:
- ${JOB_DIR:-$CI_JOB_NAME}/*.solutions.md
- ${JOB_DIR:-$CI_JOB_NAME}/*.md
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment