Commit 87c32f78 authored by Chris Jewell's avatar Chris Jewell
Browse files

Merge branch 'local-docker-repo' into 'master'

Created all-in-one docker image, updated .gitlab-ci.yml to use it.

See merge request !4
parents 57a2d7ab 9c4def32
Pipeline #1000 passed with stage
in 59 seconds
stages:
- pull
- build
- push
- triggerpdf
s3pull:
stage: pull
buildpdf:
stage: triggerpdf
rules:
- if: '$CI_PIPELINE_SOURCE == "trigger"'
image:
name: amazon/aws-cli:2.2.4
entrypoint: ["/bin/sh", "-c"]
image: fhm-chicas-code.lancs.ac.uk:5050/jewell/pyriskreport:latest
script:
- mkdir -p staged_data
......@@ -21,55 +16,13 @@ s3pull:
- for obj in reproduction_number.nc prediction.gpkg config.yaml; do
/usr/local/bin/aws --endpoint-url $MINIO_URL s3 cp $S3TARGET/${obj} staged_data/${obj};
done
artifacts:
paths:
- staged_data/
expire_in: 20 mins
build:
stage: build
rules:
- if: '$CI_PIPELINE_SOURCE == "trigger"'
image:
name: debian:latest
entrypoint: [ '/bin/bash', '-c', 'ln -snf /bin/bash /bin/sh && /bin/bash -c $0' ]
before_script:
- apt update
- apt install -y texlive-latex-recommended
- apt install -y texlive-latex-extra
- apt install -y texlive-fonts-recommended
- apt install -y python3
- apt install -y python3-pip
- pip3 install -r requirements.txt
script:
- pweave -i noweb -f tex -o spim_report.tex spim_report.pnw staged_data
- pdflatex spim_report.tex
- pdflatex spim_report.tex
- pdflatex spim_report.tex
- /usr/local/bin/aws --endpoint-url $MINIO_URL s3 cp spim_report.pdf $S3TARGET/spim_report.pdf
artifacts:
paths:
- spim_report.tex
- spim_report.pdf
s3push:
stage: push
rules:
- if: '$CI_PIPELINE_SOURCE == "trigger"'
image:
name: amazon/aws-cli:2.2.4
entrypoint: ["/bin/sh", "-c"]
script:
- export AWS_ACCESS_KEY_ID=$MINIO_ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY=$MINIO_ACCESS_KEY_SECRET
- /usr/local/bin/aws --endpoint-url $MINIO_URL s3 cp spim_report.pdf $S3TARGET/spim_report.pdf
......@@ -6,9 +6,8 @@ RUN ln -snf /bin/bash /bin/sh
# Python and LaTeX
RUN apt-get update
RUN apt-get install -y texlive-latex-recommended
RUN apt-get install -y texlive-latex-extra
RUN apt-get install -y python3-pip
RUN apt-get install -y texlive-latex-recommended texlive-latex-extra
RUN apt-get install -y python3-pip curl
# Install Python requirements
COPY requirements.txt /data/requirements.txt
......
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