ha-handler/.drone.yml

35 lines
1007 B
YAML
Raw Normal View History

---
kind: pipeline
name: default
steps:
- name: build-release
2022-06-09 08:54:13 +02:00
image: alpine:3.15
environment:
MIX_ENV: prod
commands:
- apk add elixir git make gcc libc-dev
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix compile
- mix release
- cd _build/prod/rel
- tar czf "ha-handler-$(git describe --exact-match --tags $(git log -n1 --pretty='%h') || git rev-parse HEAD).tar.gz" ha_handler/
- name: publish-release-archive
2022-06-09 08:54:13 +02:00
image: alpine:3.15
environment:
LFTP_PASSWORD:
from_secret: ssh_password
commands:
- apk add git lftp openssh-client
- cd _build/prod/rel
- mkdir ~/.ssh
- ssh-keyscan static.recycled.cloud > ~/.ssh/known_hosts
- lftp "sftp://artifacts:$LFTP_PASSWORD@static.recycled.cloud" -e "cd htdocs; put ha-handler-$(git describe --exact-match --tags $(git log -n1 --pretty='%h') || git rev-parse HEAD).tar.gz; bye"
---
kind: secret
name: ssh_password
data: aRTqi4c0MkO0arILOMZOFPeRg4HrCRkR52NcxwWRKI6ju69L