105 lines
3.1 KiB
YAML
105 lines
3.1 KiB
YAML
---
|
|
kind: pipeline
|
|
type: exec
|
|
name: Build and deploy
|
|
|
|
steps:
|
|
- name: Linting
|
|
commands:
|
|
- bash linting.sh
|
|
|
|
- name: Build diagrams
|
|
commands:
|
|
- cd diagrams
|
|
- 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
|
|
- mv *.svg '../report'
|
|
- mv *.png '../images for report'
|
|
- cd -
|
|
|
|
- name: Build Project synopsis
|
|
commands:
|
|
- cd projectsynopsis
|
|
- pdflatex project-synopsis.tex
|
|
# Prepare bib
|
|
- /usr/bin/vendor_perl/biber project-synopsis
|
|
# Compile twice for the table of contents and for bib text
|
|
- pdflatex project-synopsis.tex
|
|
- cd -
|
|
|
|
- name: Build Report
|
|
commands:
|
|
- cd report
|
|
- pdflatex --shell-escape report.tex
|
|
# Prepare bib
|
|
- /usr/bin/vendor_perl/biber report
|
|
# Compile twice for the table of contents and for bib text
|
|
- pdflatex --shell-escape report.tex
|
|
- pdflatex --shell-escape report.tex
|
|
- cd -
|
|
|
|
- name: Build Meeting
|
|
commands:
|
|
- cd meeting
|
|
- pdflatex --shell-escape meeting.tex
|
|
# Prepare bib
|
|
- /usr/bin/vendor_perl/biber meeting
|
|
# Compile twice for the table of contents and for bib text
|
|
- pdflatex --shell-escape meeting.tex
|
|
- pdflatex --shell-escape meeting.tex
|
|
- cd -
|
|
#
|
|
# - name: Generate text
|
|
# commands:
|
|
# - pnpm i
|
|
# - pnpm ts-node main.ts report/report.tex
|
|
|
|
- name: gitea_release
|
|
environment:
|
|
TOKEN:
|
|
from_secret: token
|
|
commands:
|
|
# no need to login again
|
|
# - tea login add --url https://git.andr3h3nriqu3s.com --token "$TOKEN"
|
|
- tea r rm -y current || echo "Release not found"
|
|
# - 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
|
|
- tea r c --title "Latest Report" --asset projectsynopsis/project-synopsis.pdf --asset report/report.pdf current
|
|
|
|
- name: gitea_release meeting
|
|
environment:
|
|
TOKEN:
|
|
from_secret: token
|
|
commands:
|
|
- tea login add --url https://git.andr3h3nriqu3s.com --token "$TOKEN"
|
|
- tea r rm -y meeting1 || echo "Release not found"
|
|
# - 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
|
|
- tea r c --title "Meeting" --asset meeting/meeting.pdf meeting1
|
|
|
|
- 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
|