Commit 043d26c9 authored by Christophe Benz's avatar Christophe Benz
Browse files

Update CI jobs (add CI Docker image build)

parent 1ec51f6f
Pipeline #900 failed with stages
in 26 seconds
image: jailbreakparis/validata-doc:latest
stages:
- build_docker_image
- build
- deploy
variables:
PDF_FILE: Socle Commun des Données Locales.pdf
IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
build_docker_image:
stage: build_docker_image
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
only:
changes:
- Dockerfile.ci
tags:
- docker-privileged
build_gitbook:
image: $IMAGE_TAG
stage: build
script:
- ./build.sh
......@@ -13,6 +37,7 @@ build_gitbook:
- "$PDF_FILE"
deploy_gitbook:
image: $IMAGE_TAG
stage: deploy
only:
- master
......@@ -23,7 +48,7 @@ deploy_gitbook:
- mkdir -p ~/.ssh
- ssh-keyscan -t rsa go.validata.fr >> ~/.ssh/known_hosts
script:
- rsync -avz --delete _book/ "$PDF_FILE" validata@go.validata.fr:validata-doc-html/
- rsync -avz --delete _book/ "$PDF_FILE" validata@go.validata.fr:scdl-documentation-static/
environment:
name: documentation
url: https://scdl.opendatafrance.net/docs/
FROM node:10
FROM node:10-stretch
LABEL maintainer="admin-validata+docker@jailbreak.paris"
LABEL maintainer="admin-validata@jailbreak.paris"
RUN apt --yes update
RUN apt --yes install --no-install-recommends calibre rsync
# The image "node:10" already provides "openssh-client".
RUN apt-get update && apt-get install --yes --no-install-recommends \
calibre \
rsync
# The base image already provides "openssh-client".
RUN npm install gitbook-cli -g
RUN npm install -g gitbook-cli@2.3.2
RUN gitbook install
# From https://github.com/docker-library/python/blob/master/Dockerfile-debian.template
......
......@@ -5,4 +5,4 @@ DATE=$(TZ='Europe/Paris' LC_ALL=fr_FR.UTF-8 date "+%d/%m/%Y à %R")
sed -i -e "s~UPDATED_AT~${DATE}~" docs/README.md
gitbook build
gitbook pdf . "$PDF_FILE"
gitbook pdf . "$PDF_FILE" # needs "calibre" dependency
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