Feat: use tmp volumes
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Bertrand Benjamin 2023-07-19 16:04:30 +02:00
parent 4b02059f9c
commit 28ba4ed4a0
1 changed files with 34 additions and 18 deletions

View File

@ -12,14 +12,18 @@ workspace:
steps:
- name: Clean before push
image: alpine
volumes:
- name: tosend
path: /tosend
commands:
- rm -r tools/ .git
- find . -type f -name "*.tex" -delete
- find . -type f -name "*.rst" -delete
- rm .drone.yml .gitignore .pre-commit-config.yaml .rstcheck.cfg
- apk add --no-cache rsync
- rsync -am --include="*/" --include="*.odt" --include="*.pdf" --exclude="*" ./ /tosend
- name: Push bucket Raw
image: plugins/s3-sync:1
volumes:
- name: tosend
path: /tosend
settings:
bucket: raw
endpoint: https://storage.opytex.org
@ -49,6 +53,9 @@ steps:
- name: Build Opytex 2022-2023
image: python:3.8-alpine
volumes:
- name: pelican-output
path: /output
commands:
- apk add --no-cache git imagemagick-dev imagemagick
- cd ..
@ -60,19 +67,22 @@ steps:
- git submodule update
- pip install --no-cache-dir -r requirements.txt
- export MAGICK_HOME=/usr
- pelican content/ -o output -s publishconf.py --relative-urls
- pelican /drone/content/ -o /output -s publishconf.py --relative-urls
- name: Push to bucket opytex.org
image: plugins/s3-sync:1
volumes:
- name: pelican-output
path: /drone/content/output
settings:
bucket: raw
bucket: opytex.org
endpoint: https://storage.opytex.org
access_key:
from_secret: minio_access_key
secret_key:
from_secret: minio_secret_key
source: output
target: /2022-2023
source: /output
target: /enseignements/2022-2023
path_style: true
delete: true
@ -87,3 +97,9 @@ steps:
# SSH_KEY:
# from_secret: sshcontent-key
#
volumes:
- name: tosend
temp: {}
- name: pelican-output
temp: {}