Commit 1a4c4979 authored by Andreas Böttger's avatar Andreas Böttger 😜

Update .gitlab-ci.yml

parent 57aaadf1
......@@ -6,27 +6,25 @@ stages:
- review
- deploy
build_pandoc:
stage: build
only:
- branches
tags:
- development
script:
- pwd
- sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/pandoc4gitbook
- sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/pandoc --list-extensions
- mkdir -p book_pdf; sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/pandoc .pandoc-config.yml book.md -o book_pdf/pandocbook.pdf --template=gitbook.latex --latex-engine=xelatex -H preamble.tex -f markdown+autolink_bare_uris --highlight-style=zenburn
- sudo chown -R gitlab-runner:gitlab-runner $HOME
#pdfs:
# stage: build
# only:
# - branches
# tags:
# - development
# script:
# - pwd
# - sudo docker pull docker.rz.tu-harburg.de:5000/docker/pandoc4gitbook-glr:latest
# - sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/pandoc4gitbook-glr
# - sudo docker pull docker.rz.tu-harburg.de:5000/docker/pandoc-glr:latest
# - mkdir -p book_pdf; sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/pandoc-glr .pandoc-config.yml book.md -o book_pdf/pandocbook.pdf
# artifacts:
# name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
# paths:
# # Was hier nicht gelistet ist, landet auch nicht in der `review`-Phase
# - book_pdf
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
paths:
# Was hier nicht gelistet ist, landet auch nicht in der `review`-Phase
- book_pdf
build_gitbook:
static_sites:
stage: build
only:
- branches
......@@ -34,14 +32,10 @@ build_gitbook:
- development
script:
- pwd
#- gitbook install
#- gitbook build
# Quick and dirty hack: The creation of the PDF document does not always work. This seems to be a bug.
#- mkdir -p book_pdf; until gitbook pdf ./ ./book_pdf/book.pdf; do printf "$s\n" "failure, next try …"; done
- sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/gitbook install
- sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/gitbook build
- mkdir -p book_pdf; sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/gitbook pdf ./ ./book_pdf/book.pdf
- sudo chown -R gitlab-runner:gitlab-runner $HOME
- sudo docker pull docker.rz.tu-harburg.de:5000/docker/gitbook-glr:latest
- sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/gitbook-glr install
- sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/gitbook-glr build
- mkdir -p book_pdf; sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/gitbook-glr pdf ./ ./book_pdf/book.pdf
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
......@@ -93,9 +87,11 @@ deploy:
tags:
- production
script:
- pwd
- sshpass -p "$SSH_PASSWD" ssh -p "$SSH_PORT" $SSH_USER@$HOST_NAME "mkdir -p /usr/share/nginx/html/production"
- sshpass -p "$SSH_PASSWD" scp -P "$SSH_PORT" -r _book/* $SSH_USER@$HOST_NAME:/usr/share/nginx/html/production
- sshpass -p "$SSH_PASSWD" scp -P "$SSH_PORT" -r book_pdf $SSH_USER@$HOST_NAME:/usr/share/nginx/html/production
environment:
name: production
url: https://$PROXY_HOST_NAME/$CI_PROJECT_PATH/
#url: http://$HOST_NAME$COLON$HTTP_PORT/production/
url: https://$PROXY_HOST_NAME/$CI_PROJECT_PATH/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment