Replace srht CI by internal drone pipeline
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
b9aa3eeb98
commit
90187f03c9
19
.build.yml
19
.build.yml
|
@ -1,19 +0,0 @@
|
|||
image: alpine/latest
|
||||
packages:
|
||||
- elixir
|
||||
artifacts:
|
||||
- ha-handler/_build/prod/rel/ha-handler.tar.gz
|
||||
sources:
|
||||
- https://code.recycled.cloud/RecycledCloud/ha-handler.git
|
||||
tasks:
|
||||
- setup: |
|
||||
cd ha-handler
|
||||
mix local.hex --force
|
||||
mix local.rebar --force
|
||||
mix deps.get
|
||||
- release: |
|
||||
cd ha-handler
|
||||
MIX_ENV=prod mix compile
|
||||
MIX_ENV=prod mix release
|
||||
cd _build/prod/rel
|
||||
tar cvzf ha-handler.tar.gz ha_handler/
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build-release
|
||||
image: alpine:latest
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
commands:
|
||||
- apk add elixir git
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get
|
||||
- mix compile
|
||||
- mix release
|
||||
- cd _build/prod/rel
|
||||
- tar czf "apmbc-$(git describe --exact-match --tags $(git log -n1 --pretty='%h') || git rev-parse HEAD).tar.gz" apmbc/
|
||||
- name: publish-release-archive
|
||||
image: alpine:latest
|
||||
environment:
|
||||
LFTP_PASSWORD:
|
||||
from_secret: ssh_password
|
||||
commands:
|
||||
- apk add git lft
|
||||
- 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 apmbc-$(git describe --exact-match --tags $(git log -n1 --pretty='%h') || git rev-parse HEAD).tar.gz; bye"
|
||||
|
||||
---
|
||||
kind: secret
|
||||
name: ssh_password
|
||||
data: aRTqi4c0MkO0arILOMZOFPeRg4HrCRkR52NcxwWRKI6ju69L
|
17
run-ci.sh
17
run-ci.sh
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
BUILDS_INSTANCE=https://builds.sr.ht
|
||||
MANIFEST=.build.yml
|
||||
|
||||
if [ -z "$SRHT_ACCESS_TOKEN" ]; then
|
||||
echo "Please set SRHT_ACCESS_TOKEN before calling this script." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl \
|
||||
-H Authorization:"token $SRHT_ACCESS_TOKEN" \
|
||||
--data "manifest=$(jq -R -r --slurp < $MANIFEST)" \
|
||||
--data "note=recycledcloud-ha-handler" \
|
||||
-X POST $BUILDS_INSTANCE/api/jobs | jq
|
Loading…
Reference in New Issue