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: steps:
- name: Clean before push - name: Clean before push
image: alpine image: alpine
volumes:
- name: tosend
path: /tosend
commands: commands:
- rm -r tools/ .git - apk add --no-cache rsync
- find . -type f -name "*.tex" -delete - rsync -am --include="*/" --include="*.odt" --include="*.pdf" --exclude="*" ./ /tosend
- find . -type f -name "*.rst" -delete
- rm .drone.yml .gitignore .pre-commit-config.yaml .rstcheck.cfg
- name: Push bucket Raw - name: Push bucket Raw
image: plugins/s3-sync:1 image: plugins/s3-sync:1
volumes:
- name: tosend
path: /tosend
settings: settings:
bucket: raw bucket: raw
endpoint: https://storage.opytex.org endpoint: https://storage.opytex.org
@ -49,30 +53,36 @@ steps:
- name: Build Opytex 2022-2023 - name: Build Opytex 2022-2023
image: python:3.8-alpine image: python:3.8-alpine
volumes:
- name: pelican-output
path: /output
commands: commands:
- apk add --no-cache git imagemagick-dev imagemagick - apk add --no-cache git imagemagick-dev imagemagick
- cd .. - cd ..
- git init . - git init .
- git remote add origin https://git.opytex.org/lafrite/site_opytex.git - git remote add origin https://git.opytex.org/lafrite/site_opytex.git
- git pull origin 2022-2023 - git pull origin 2022-2023
- git checkout 2022-2023 - git checkout 2022-2023
- git submodule init - git submodule init
- git submodule update - git submodule update
- pip install --no-cache-dir -r requirements.txt - pip install --no-cache-dir -r requirements.txt
- export MAGICK_HOME=/usr - 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 - name: Push to bucket opytex.org
image: plugins/s3-sync:1 image: plugins/s3-sync:1
volumes:
- name: pelican-output
path: /drone/content/output
settings: settings:
bucket: raw bucket: opytex.org
endpoint: https://storage.opytex.org endpoint: https://storage.opytex.org
access_key: access_key:
from_secret: minio_access_key from_secret: minio_access_key
secret_key: secret_key:
from_secret: minio_secret_key from_secret: minio_secret_key
source: output source: /output
target: /2022-2023 target: /enseignements/2022-2023
path_style: true path_style: true
delete: true delete: true
@ -87,3 +97,9 @@ steps:
# SSH_KEY: # SSH_KEY:
# from_secret: sshcontent-key # from_secret: sshcontent-key
# #
volumes:
- name: tosend
temp: {}
- name: pelican-output
temp: {}