fyp-report/.drone.yml

94 lines
2.7 KiB
YAML
Raw Normal View History

2023-10-16 14:48:04 +01:00
---
kind: pipeline
type: exec
name: Build and deploy
steps:
- name: Linting
commands:
- bash linting.sh
2023-11-30 11:47:09 +00:00
- name: Build diagrams
2023-11-30 11:48:52 +00:00
commands:
2023-11-30 11:47:09 +00:00
- cd diagrams
2023-12-04 10:41:14 +00:00
- ls | grep d2 | sed 's/.d2//' | xargs -I{} d2 --layout=elk {}.d2 {}.svg
- ls | grep d2 | sed 's/.d2//' | xargs -I{} d2 --layout=elk {}.d2 {}.png
2023-12-04 10:40:25 +00:00
- mv *.svg '../report'
2023-12-04 10:39:00 +00:00
- mv *.png '../images for report'
2023-11-30 11:47:09 +00:00
- cd -
- name: Build Project synopsis
2023-10-16 14:48:04 +01:00
commands:
2023-10-16 17:05:35 +01:00
- cd projectsynopsis
- pdflatex project-synopsis.tex
2023-10-16 14:48:04 +01:00
# Prepare bib
2023-10-16 17:05:35 +01:00
- /usr/bin/vendor_perl/biber project-synopsis
2023-10-16 14:48:04 +01:00
# Compile twice for the table of contents and for bib text
2023-10-16 17:05:35 +01:00
- pdflatex project-synopsis.tex
2023-10-16 14:48:04 +01:00
- cd -
2023-11-30 14:02:22 +00:00
- name: Build Report
commands:
- cd report
2023-12-04 10:25:55 +00:00
- pdflatex --shell-escape report.tex
2023-11-30 14:02:22 +00:00
# Prepare bib
- /usr/bin/vendor_perl/biber report
# Compile twice for the table of contents and for bib text
2023-12-04 10:25:55 +00:00
- pdflatex --shell-escape report.tex
- pdflatex --shell-escape report.tex
2023-11-30 14:02:22 +00:00
- cd -
2024-02-01 11:05:01 +00:00
- name: Build worktable
commands:
- cd worktable
- pdflatex --shell-escape worktable.tex
# Prepare bib
- /usr/bin/vendor_perl/biber worktable
# Compile twice for the table of contents and for bib text
- pdflatex --shell-escape worktable.tex
- pdflatex --shell-escape worktable.tex
- cd -
2023-10-16 17:05:35 +01:00
#
# - name: Generate text
# commands:
# - pnpm i
# - pnpm ts-node main.ts report/report.tex
2023-10-16 14:48:04 +01:00
- name: gitea_release
environment:
TOKEN:
from_secret: token
commands:
- tea login add --url https://git.andr3h3nriqu3s.com --token "$TOKEN"
- tea r rm -y current || echo "Release not found"
2023-10-16 17:05:35 +01:00
# - tea r c --title "Latest Report" --asset report/report.pdf --asset upds-1/UPDS12-1.pdf --asset upds-2/UPDS12-2.pdf --asset results.txt --asset poster/poster.pdf current
2024-02-01 11:05:01 +00:00
- tea r c --title "Latest Report" --asset projectsynopsis/project-synopsis.pdf --asset report/report.pdf --asset worktable/worktable.pdf current
2023-10-16 14:48:04 +01:00
- name: Remove current on failure
environment:
TOKEN:
from_secret: token
commands:
- tea login add --url https://git.andr3h3nriqu3s.com --token "$TOKEN"
- tea r rm -y current || echo "Release not found"
trigger:
status:
- failure
when:
status:
- failure
#- name: latest
# environment:
# TOKEN:
# from_secret: token
# commands:
# - tea r rm -y "3rd-metting" || echo "Release not found"
# - tea r c --title "Last Metting Report" --asset report/report.pdf --asset upds-1/UPDS12-1.pdf --asset upds-2/UPDS12-2.pdf "3rd-metting"
trigger:
branch:
- main
node:
lights: builder