Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • wonka/angelguide
  • kaste/angelguide
  • Xu/angelguide
3 results
Show changes
Commits on Source (75)
Showing
with 66 additions and 11 deletions
stages: [ build ] stages:
- build
- publish
job_build: .template:build_guide:
stage: build stage: build
image: ubuntu:latest image: alpine
script: before_script:
- apt update - apk update
- apt install -y --no-install-recommends asciidoctor - apk add --no-cache ruby asciidoctor git
- gem install asciidoctor-pdf --pre - gem install asciidoctor-pdf --pre
- asciidoctor-pdf -o angelguide_en.pdf guide.adoc
- asciidoctor-pdf -a lang=de -o angelguide_de.pdf guide.adoc
artifacts: artifacts:
paths: paths:
- "angelguide_en.pdf" - "angelguide_en.pdf"
- "angelguide_de.pdf" - "angelguide_de.pdf"
expire_in: 12 month expire_in: 12 months
\ No newline at end of file
build_guide_by_tag:
extends: .template:build_guide
script:
- ./build.sh $CI_COMMIT_TAG
rules:
- if: $CI_COMMIT_TAG != null
when: always
build_guide:
extends: .template:build_guide
script:
- ./build.sh $CI_COMMIT_SHORT_SHA
rules:
- if: $CI_COMMIT_TAG == null
when: always
publish_guide:
stage: publish
image: kroniak/ssh-client
before_script:
- apk update
- apk add --no-cache rsync
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- eval $(ssh-agent -s)
- echo -n "$SSH_PRIVATE_KEY" | ssh-add -
- ssh-keyscan -H "$PUBLISH_HOST" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- 'rsync -av angelguide_*.pdf $PUBLISH_USER@$PUBLISH_HOST:$PUBLISH_PATH'
rules:
- if: $CI_COMMIT_TAG != null
when: manual
\ No newline at end of file
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
This guide is written in Asciidoc. This guide is written in Asciidoc.
## Requirements ## Requirements
* asciidoctor * asciidoctor
* asciidoctor-pdf * asciidoctor-pdf
## Asciidoctor resources ## Asciidoctor resources
[Quick Reference](https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) * [Quick Reference](https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/)
[User Manual](https://asciidoctor.org/docs/user-manual/) * [User Manual](https://asciidoctor.org/docs/user-manual/)
## How to build the PDF ## How to build the PDF
...@@ -21,6 +22,26 @@ the requirements. ...@@ -21,6 +22,26 @@ the requirements.
``` ```
Build the guide in other languages: Build the guide in other languages:
``` ```
$ asciidoctor-pdf -a lang=de guide.adoc $ asciidoctor-pdf -a lang=de guide.adoc
``` ```
## Deployment via CI
The guide can be built and deployed to our web server using Gitlab CI. The
target server, user and path as well as the SSH key used for deployment are
configured in the settings of this project and the server can be prepared
using the `angelguide-deployment` role from our
[infrastructure repo](https://chaos.expert/himmel/infrastruktur).
`PUBLISH_PATH` is always `/`. `PUBLISH_HOST`, `PUBLISH_USER` and
`SSH_PRIVATE_KEY` must match the values configured via Ansible.
While the build process of the PDFs is happening automatically for every commit
and merge request, the deployment job is a manual action. After the deployment,
the guide will be reachable at:
* <https://c3heaven.de/guide/angelguide_de.pdf> (german)
* <https://c3heaven.de/guide/angelguide_en.pdf> (english)
* <https://c3heaven.de/angelguide.pdf> (language determined by browser)
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added