Skip to content
Snippets Groups Projects
Unverified Commit b3d325ce authored by Robby3St's avatar Robby3St
Browse files

ci{.gitlab-ci, decker.yaml}: use Docker images for builds

parent a6995fd2
No related branches found
No related tags found
1 merge request!5ci(.gitlab-ci): use Docker images for builds
Pipeline #282411 failed
...@@ -3,6 +3,7 @@ image: python:3.13-slim ...@@ -3,6 +3,7 @@ image: python:3.13-slim
stages: stages:
- prebuild - prebuild
# - pdf
- build - build
- deploy - deploy
- deploy-pages - deploy-pages
...@@ -14,52 +15,75 @@ variables: ...@@ -14,52 +15,75 @@ variables:
prebuild: prebuild:
before_script: before_script:
- apt-get update && apt-get install -y pandoc python3-pip texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra - apt-get update && apt-get install -y python3-pip
- python3 -m pip install poetry - python3 -m pip install poetry
- pandoc -v
- poetry --version - poetry --version
stage: prebuild stage: prebuild
script: | script: |
# Run the build script # Run the build script
./build.sh ./build.sh
echo "Generate Decks as PDF with Pandoc. It is generated as a backup."
pandoc -t beamer $PREBUILD_OUTPUT/fvv-folien-deck.md -o $PREBUILD_OUTPUT/fvv-folien.pdf
artifacts: artifacts:
paths: paths:
- $PREBUILD_OUTPUT - $PREBUILD_OUTPUT
expire_in: "1 hour" expire_in: "1 hour"
# pdf:
# image: registry.gitlab.fachschaften.org/robinst/pandoc-image:latest
# stage: pdf
# dependencies:
# - prebuild
# script:
# - echo "Generate Decks as PDF with Pandoc. It is generated as a backup."
# - pandoc -t beamer $PREBUILD_OUTPUT/fvv-folien-deck.md -o $PREBUILD_OUTPUT/fvv-folien.pdf
# - ls
# artifacts:
# paths:
# - $PREBUILD_OUTPUT
# expire_in: "1 hour"
# build:
# image: ubuntu:24.04
# stage: build
# cache:
# key: decker-cache
# paths:
# - .cache/decker/
# policy: pull-push
# before_script:
# - mkdir -p .cache/decker
# - |
# if [ ! -f .cache/decker/decker ]; then
# echo "Downloading decker..."
# apt-get update && apt-get install -y curl
# curl -L -o .cache/decker/decker https://github.com/decker-edu/decker/releases/download/latest/decker-latest-Linux-X64-3f4150d61ca167361b02665da969da769ca98e7c
# chmod +x .cache/decker/decker
# else
# echo "Using cached decker binary"
# fi
# dependencies:
# - pdf
# script: |
# cd $PREBUILD_OUTPUT
# echo "Generate Decks with Decker."
# ../.cache/decker/decker decks
# echo "Successfully built Decker slides."
# cp fvv-folien.pdf public/fvv-folien.pdf
# artifacts:
# paths:
# - $BUILD_OUTPUT
# expire_in: "1 hour"
build: build:
image: ubuntu:24.04 image: registry.gitlab.fachschaften.org/robinst/decker-image:1.0.2
stage: build stage: build
cache:
key: decker-cache
paths:
- .cache/decker/
policy: pull-push
before_script:
- mkdir -p .cache/decker
- |
if [ ! -f .cache/decker/decker ]; then
echo "Downloading decker..."
apt-get update && apt-get install -y curl
curl -L -o .cache/decker/decker https://github.com/decker-edu/decker/releases/download/latest/decker-latest-Linux-X64-3f4150d61ca167361b02665da969da769ca98e7c
chmod +x .cache/decker/decker
else
echo "Using cached decker binary"
fi
dependencies: dependencies:
- prebuild - prebuild
script: | script:
cd $PREBUILD_OUTPUT - ls
echo "Generate Decks with Decker." - /usr/local/bin/decker -h
../.cache/decker/decker decks - cd output
echo "Successfully built Decker slides." - /usr/local/bin/decker decks
cp fvv-folien.pdf public/fvv-folien.pdf - /usr/local/bin/decker pdf
artifacts:
paths:
- $BUILD_OUTPUT
expire_in: "1 hour"
deploy: deploy:
stage: deploy stage: deploy
......
# A minimal Decker meta data file # A minimal Decker meta data file
author: The example generator author: Fachschaftsrat Informatik TU Dortmund
external-tools:
chrome:
linux:
command: "chromium"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment