Commit 43670046 authored by Chris Jewell's avatar Chris Jewell
Browse files

Merge branch 'master' into 'england1'

Move CI changes from master to england1

See merge request !5
parents 5bd025a1 87c32f78
Pipeline #998 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,49 +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: dockershelf/latex:basic
before_script:
- apt-get update
- apt-get 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
FROM debian:latest
# Hack for Gitlab CI bug with Debian /bin/sh --> dash
RUN ln -snf /bin/bash /bin/sh
# Python and LaTeX
RUN apt-get update
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
RUN pip3 install -r /data/requirements.txt
# Install AWS CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/data/awscliv2.zip"
RUN cd data && unzip awscliv2.zip && ./aws/install && cd ..
CMD [ '/bin/bash', '-c' ]
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