2022-05-21 18:37:36 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build-release
|
2022-05-22 11:53:20 +02:00
|
|
|
image: alpine:3.15
|
2022-05-21 18:37:36 +02:00
|
|
|
environment:
|
|
|
|
MIX_ENV: prod
|
|
|
|
commands:
|
2022-05-22 11:53:20 +02:00
|
|
|
- apk add elixir make gcc libc-dev
|
|
|
|
- mix local.hex --force
|
|
|
|
- mix local.rebar --force
|
|
|
|
- mix deps.get
|
2022-05-21 18:37:36 +02:00
|
|
|
- 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
|
2022-05-22 11:53:20 +02:00
|
|
|
image: alpine:3.15
|
2022-05-21 18:37:36 +02:00
|
|
|
environment:
|
|
|
|
LFTP_PASSWORD:
|
|
|
|
from_secret: ssh_password
|
|
|
|
commands:
|
2022-05-22 11:53:20 +02:00
|
|
|
- apk add lftp openssh-client-common
|
2022-05-21 18:37:36 +02:00
|
|
|
- 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 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
|