Loading README.md +5 −5 Original line number Diff line number Diff line # Just CI templates v5.4.0 # Just CI templates v5.6.1 Maintainers: Loading Loading @@ -81,7 +81,7 @@ is an example `.gitlab-ci.yml` importing the python template: include: - project: "just-ci/templates" file: "templates/python.yml" ref: "v5.4.0" ref: "v5.6.1" ``` The above is a template for Python projects. Other templates can be found in Loading @@ -100,9 +100,9 @@ you want you can always disable specific jobs with custom rules. ```yaml --- include: - project: just-ci/templates file: templates/python.yml ref: v5.4.0 - project: "just-ci/templates" file: "templates/python.yml" ref: "v5.6.1" python:pytest: rules: Loading docs/md-presentation-badges.yml +8 −1 Original line number Diff line number Diff line Loading @@ -33,9 +33,16 @@ badge:html: URL: "${HTML}" BADGE_NAME: html badge:html-zip: extends: .badge:md-presentation variables: VALUE: html.zip - ${CI_COMMIT_REF_NAME} URL: "${HTML_ZIP}" BADGE_NAME: html-zip badge:images: extends: .badge:md-presentation variables: VALUE: images - ${CI_COMMIT_REF_NAME} VALUE: images.zip - ${CI_COMMIT_REF_NAME} URL: "${IMAGES}" BADGE_NAME: images docs/md-presentation.yml +11 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ # Running a local webserver of MARP is as easy as: # docker run --rm -ti -p 127.0.0.1:8080:8080 -v "${PWD}:/pwd" -w /pwd docker.io/marpteam/marp-cli:latest -s . # This currently assumes a single presentation. Having more will probably work fine, but may provide unexpected results. docs:md-presentation: image: name: docker.io/marpteam/marp-cli:latest Loading @@ -24,9 +26,15 @@ docs:md-presentation: - zip -r ${CI_PROJECT_DIR}/output/html.zip *.* -x *.md -x ${CI_PROJECT_DIR}/output - rm ${OUTPUT_FILES} - unzip ${CI_PROJECT_DIR}/output/html.zip -d ${CI_PROJECT_DIR}/html-output - HTML_FILENAME=$(basename $(ls ${CI_PROJECT_DIR}/html-output/*.html | head -n1)) - echo "HTML=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/output/html.zip" "HTML=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/html-output/${HTML_FILENAME}" > ${CI_PROJECT_DIR}/links.env - echo "HTML_ZIP=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/output/html.zip" >> ${CI_PROJECT_DIR}/links.env # Next the images export - marp-cli.js --images -I ${CONVERSION_PATH} ${DEFAULT_ARGS} ${EXTRA_ARGS} Loading Loading @@ -57,9 +65,11 @@ docs:md-presentation: echo "${EXT}=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/output/${BASENAME}" >> ${CI_PROJECT_DIR}/links.env fi done echo -e "[+] View \033[1m${HTML_FILENAME}\033[0m from ${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/html-output/${HTML_FILENAME}" artifacts: when: always paths: - output - html-output reports: dotenv: links.env docs/report-pandoc.yml +24 −10 Original line number Diff line number Diff line --- variables: PANDOC_EXTRA_ARGS: "" docs:pandoc-from-template: image: name: registry.gitlab.com/just-ci/images/pandoc:latest entrypoint: [""] stage: build variables: FORMATS: pdf docx html DEFAULT_ARGS: > DEFAULT_ARGS: --standalone --table-of-contents --number-sections --citeproc --metadata link-citations=true PDF_ENGINE: xelatex SOURCE_DIR: . MEDIA_DIR: media BIBLIOGRAPHY: references.yaml TEMPLATE: https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/master/eisvogel.tex CSL: https://raw.githubusercontent.com/citation-style-language/styles/master/cell-numeric.csl CSS: https://gist.githubusercontent.com/killercup/5917178/raw/40840de5352083adb2693dc742e9f75dbb18650f/pandoc.css TOC_DEPTH: 2 REPORT_NAME: "${CI_PROJECT_NAME}" TOC_DEPTH: "2" REPORT_NAME: ${CI_PROJECT_NAME} METADATA_LANG: en-US EXTRA_ARGS: "" # Add extra arguments to customize even further script: - mkdir output - cd ${SOURCE_DIR} - | for FORMAT in $FORMATS; do pandoc ${DEFAULT_ARGS} ${EXTRA_ARGS} --template="${TEMPLATE}" --pdf-engine=${PDF_ENGINE} --csl="${CSL}" --css="${CSS}" --toc-depth=${TOC_DEPTH} --bibliography="${BIBLIOGRAPHY}" --extract-media="${OUTPUT_DIR}/${MEDIA_DIR}" --metadata lang=${METADATA_LANG} --to ${FORMAT} --output output/"${REPORT_NAME}.${FORMAT}" --resource-path=.:"${SOURCE_DIR}" "${SOURCE_DIR}"/*.md for FORMAT in ${FORMATS}; do pandoc ${DEFAULT_ARGS} ${PANDOC_EXTRA_ARGS} \ --template="${TEMPLATE}" \ --pdf-engine=${PDF_ENGINE} \ --csl="${CSL}" \ --css="${CSS}" \ --toc-depth=${TOC_DEPTH} \ --bibliography="${BIBLIOGRAPHY}" \ --extract-media="." \ --metadata lang=${METADATA_LANG} \ --to ${FORMAT} \ --output "${REPORT_NAME}.${FORMAT}" \ *.md echo "[+] ${SOURCE_DIR}/${REPORT_NAME}.${FORMAT} done." done artifacts: paths: - output/* - "**/*.*" when: always pipelines/project-automation.yml +9 −0 Original line number Diff line number Diff line Loading @@ -16,3 +16,12 @@ tbump: exists: - tbump.toml - pyproject.toml tbump:check: extends: tbump rules: - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH exists: - tbump.toml - pyproject.toml artifacts: null Loading
README.md +5 −5 Original line number Diff line number Diff line # Just CI templates v5.4.0 # Just CI templates v5.6.1 Maintainers: Loading Loading @@ -81,7 +81,7 @@ is an example `.gitlab-ci.yml` importing the python template: include: - project: "just-ci/templates" file: "templates/python.yml" ref: "v5.4.0" ref: "v5.6.1" ``` The above is a template for Python projects. Other templates can be found in Loading @@ -100,9 +100,9 @@ you want you can always disable specific jobs with custom rules. ```yaml --- include: - project: just-ci/templates file: templates/python.yml ref: v5.4.0 - project: "just-ci/templates" file: "templates/python.yml" ref: "v5.6.1" python:pytest: rules: Loading
docs/md-presentation-badges.yml +8 −1 Original line number Diff line number Diff line Loading @@ -33,9 +33,16 @@ badge:html: URL: "${HTML}" BADGE_NAME: html badge:html-zip: extends: .badge:md-presentation variables: VALUE: html.zip - ${CI_COMMIT_REF_NAME} URL: "${HTML_ZIP}" BADGE_NAME: html-zip badge:images: extends: .badge:md-presentation variables: VALUE: images - ${CI_COMMIT_REF_NAME} VALUE: images.zip - ${CI_COMMIT_REF_NAME} URL: "${IMAGES}" BADGE_NAME: images
docs/md-presentation.yml +11 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ # Running a local webserver of MARP is as easy as: # docker run --rm -ti -p 127.0.0.1:8080:8080 -v "${PWD}:/pwd" -w /pwd docker.io/marpteam/marp-cli:latest -s . # This currently assumes a single presentation. Having more will probably work fine, but may provide unexpected results. docs:md-presentation: image: name: docker.io/marpteam/marp-cli:latest Loading @@ -24,9 +26,15 @@ docs:md-presentation: - zip -r ${CI_PROJECT_DIR}/output/html.zip *.* -x *.md -x ${CI_PROJECT_DIR}/output - rm ${OUTPUT_FILES} - unzip ${CI_PROJECT_DIR}/output/html.zip -d ${CI_PROJECT_DIR}/html-output - HTML_FILENAME=$(basename $(ls ${CI_PROJECT_DIR}/html-output/*.html | head -n1)) - echo "HTML=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/output/html.zip" "HTML=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/html-output/${HTML_FILENAME}" > ${CI_PROJECT_DIR}/links.env - echo "HTML_ZIP=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/output/html.zip" >> ${CI_PROJECT_DIR}/links.env # Next the images export - marp-cli.js --images -I ${CONVERSION_PATH} ${DEFAULT_ARGS} ${EXTRA_ARGS} Loading Loading @@ -57,9 +65,11 @@ docs:md-presentation: echo "${EXT}=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/output/${BASENAME}" >> ${CI_PROJECT_DIR}/links.env fi done echo -e "[+] View \033[1m${HTML_FILENAME}\033[0m from ${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/html-output/${HTML_FILENAME}" artifacts: when: always paths: - output - html-output reports: dotenv: links.env
docs/report-pandoc.yml +24 −10 Original line number Diff line number Diff line --- variables: PANDOC_EXTRA_ARGS: "" docs:pandoc-from-template: image: name: registry.gitlab.com/just-ci/images/pandoc:latest entrypoint: [""] stage: build variables: FORMATS: pdf docx html DEFAULT_ARGS: > DEFAULT_ARGS: --standalone --table-of-contents --number-sections --citeproc --metadata link-citations=true PDF_ENGINE: xelatex SOURCE_DIR: . MEDIA_DIR: media BIBLIOGRAPHY: references.yaml TEMPLATE: https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/master/eisvogel.tex CSL: https://raw.githubusercontent.com/citation-style-language/styles/master/cell-numeric.csl CSS: https://gist.githubusercontent.com/killercup/5917178/raw/40840de5352083adb2693dc742e9f75dbb18650f/pandoc.css TOC_DEPTH: 2 REPORT_NAME: "${CI_PROJECT_NAME}" TOC_DEPTH: "2" REPORT_NAME: ${CI_PROJECT_NAME} METADATA_LANG: en-US EXTRA_ARGS: "" # Add extra arguments to customize even further script: - mkdir output - cd ${SOURCE_DIR} - | for FORMAT in $FORMATS; do pandoc ${DEFAULT_ARGS} ${EXTRA_ARGS} --template="${TEMPLATE}" --pdf-engine=${PDF_ENGINE} --csl="${CSL}" --css="${CSS}" --toc-depth=${TOC_DEPTH} --bibliography="${BIBLIOGRAPHY}" --extract-media="${OUTPUT_DIR}/${MEDIA_DIR}" --metadata lang=${METADATA_LANG} --to ${FORMAT} --output output/"${REPORT_NAME}.${FORMAT}" --resource-path=.:"${SOURCE_DIR}" "${SOURCE_DIR}"/*.md for FORMAT in ${FORMATS}; do pandoc ${DEFAULT_ARGS} ${PANDOC_EXTRA_ARGS} \ --template="${TEMPLATE}" \ --pdf-engine=${PDF_ENGINE} \ --csl="${CSL}" \ --css="${CSS}" \ --toc-depth=${TOC_DEPTH} \ --bibliography="${BIBLIOGRAPHY}" \ --extract-media="." \ --metadata lang=${METADATA_LANG} \ --to ${FORMAT} \ --output "${REPORT_NAME}.${FORMAT}" \ *.md echo "[+] ${SOURCE_DIR}/${REPORT_NAME}.${FORMAT} done." done artifacts: paths: - output/* - "**/*.*" when: always
pipelines/project-automation.yml +9 −0 Original line number Diff line number Diff line Loading @@ -16,3 +16,12 @@ tbump: exists: - tbump.toml - pyproject.toml tbump:check: extends: tbump rules: - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH exists: - tbump.toml - pyproject.toml artifacts: null