meta/.drone.yml
Timothée Floure 190b0827a2
Some checks failed
continuous-integration/drone/push Build is failing
Replace sr.ht builds by internal drone CI
2022-05-21 18:38:33 +02:00

35 lines
1.1 KiB
YAML

---
kind: pipeline
name: default
steps:
- name: fetch-dependencies
image: edurable/apmbc-reporting-build-environment:latest
commands:
- mix deps.get
- name: build-release
image: edurable/apmbc-reporting-build-environment:latest
environment:
MIX_ENV: prod
commands:
- mix compile
- mix phx.digest
- mix release
- cd _build/prod/rel
- tar czf "meta-$(git describe --exact-match --tags $(git log -n1 --pretty='%h') || git rev-parse HEAD).tar.gz" meta/
- name: publish-release-archive
image: edurable/apmbc-reporting-build-environment:latest
environment:
LFTP_PASSWORD:
from_secret: ssh_password
commands:
- cd _build/prod/rel
- apt-get install -y lftp
- mkdir ~/.ssh
- ssh-keyscan static.recycled.cloud > ~/.ssh/known_hosts
- lftp "sftp://artifacts:$LFTP_PASSWORD@static.recycled.cloud" -e "cd htdocs; put meta-$(git describe --exact-match --tags $(git log -n1 --pretty='%h') || git rev-parse HEAD).tar.gz; bye"
---
kind: secret
name: ssh_password
data: qdcw1yGdz1iDaGmovTD7Afj1piyjcZ/H4NXNKPpmUWgagBvA