2022-06-11 16:57:12 +00:00
|
|
|
matrix:
|
|
|
|
docker_prefix:
|
|
|
|
- ""
|
|
|
|
- arm64v8/
|
|
|
|
- arm32v7/
|
|
|
|
tag:
|
|
|
|
- amd64
|
|
|
|
- arm64
|
|
|
|
- arm
|
|
|
|
|
|
|
|
include:
|
|
|
|
- tag: amd64
|
|
|
|
docker_prefix: ""
|
2022-06-10 16:40:01 +00:00
|
|
|
|
2022-06-11 16:57:12 +00:00
|
|
|
pipeline:
|
|
|
|
glibc:
|
2022-06-11 15:41:15 +00:00
|
|
|
when:
|
|
|
|
event:
|
2022-06-29 09:33:57 +00:00
|
|
|
- push
|
2022-07-15 13:52:01 +00:00
|
|
|
- tag
|
2022-06-29 09:33:57 +00:00
|
|
|
branch:
|
|
|
|
- develop
|
2022-07-15 12:27:16 +00:00
|
|
|
- stable
|
2022-07-15 13:52:01 +00:00
|
|
|
- refs/tags/v*
|
2022-07-15 15:31:28 +00:00
|
|
|
- refs/tags/stable-*
|
2022-06-11 16:42:29 +00:00
|
|
|
secrets:
|
|
|
|
- SCW_ACCESS_KEY
|
|
|
|
- SCW_SECRET_KEY
|
|
|
|
- SCW_DEFAULT_ORGANIZATION_ID
|
2022-06-11 16:57:12 +00:00
|
|
|
image: ${docker_prefix}elixir:1.13
|
2022-06-10 16:40:01 +00:00
|
|
|
environment:
|
|
|
|
MIX_ENV: prod
|
|
|
|
commands:
|
2022-07-02 14:05:32 +00:00
|
|
|
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev
|
2022-06-10 16:40:01 +00:00
|
|
|
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
|
|
|
|
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
|
|
|
|
- chmod +x scaleway-cli
|
|
|
|
- ./scaleway-cli object config install type=rclone
|
|
|
|
- echo "import Mix.Config" > config/prod.secret.exs
|
2022-06-11 16:44:12 +00:00
|
|
|
- mix local.hex --force
|
|
|
|
- mix local.rebar --force
|
2022-07-15 13:52:01 +00:00
|
|
|
- export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
|
|
|
|
- export PLEROMA_BUILD_BRANCH=$BUILD_TAG
|
2022-06-11 17:32:10 +00:00
|
|
|
- mix deps.clean --all
|
2022-06-10 16:40:01 +00:00
|
|
|
- mix deps.get --only prod
|
|
|
|
- mkdir release
|
|
|
|
- mix release --path release
|
2022-06-11 17:48:26 +00:00
|
|
|
- zip akkoma-${tag}.zip -r release
|
2022-07-15 13:52:01 +00:00
|
|
|
- rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}.zip
|
2022-06-11 15:41:15 +00:00
|
|
|
|
2022-06-11 16:57:12 +00:00
|
|
|
musl:
|
2022-06-11 15:41:15 +00:00
|
|
|
when:
|
|
|
|
event:
|
2022-06-29 09:33:57 +00:00
|
|
|
- push
|
2022-07-15 13:52:01 +00:00
|
|
|
- tag
|
2022-06-29 09:33:57 +00:00
|
|
|
branch:
|
|
|
|
- develop
|
2022-07-15 12:27:16 +00:00
|
|
|
- stable
|
2022-07-15 13:52:01 +00:00
|
|
|
- refs/tags/v*
|
2022-07-15 15:31:28 +00:00
|
|
|
- refs/tags/stable-*
|
2022-06-11 17:12:48 +00:00
|
|
|
secrets:
|
|
|
|
- SCW_ACCESS_KEY
|
|
|
|
- SCW_SECRET_KEY
|
|
|
|
- SCW_DEFAULT_ORGANIZATION_ID
|
2022-06-11 16:57:12 +00:00
|
|
|
image: ${docker_prefix}elixir:1.13-alpine
|
2022-06-11 15:41:15 +00:00
|
|
|
environment:
|
|
|
|
MIX_ENV: prod
|
|
|
|
commands:
|
2022-07-02 14:05:32 +00:00
|
|
|
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
|
2022-06-11 18:10:45 +00:00
|
|
|
- rm -rf release || true
|
|
|
|
- rm -rf _build || true
|
|
|
|
- rm -rf /root/.mix
|
2022-06-11 18:37:24 +00:00
|
|
|
- rm scaleway-cli || true
|
|
|
|
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
|
|
|
|
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
|
|
|
|
- chmod +x scaleway-cli
|
|
|
|
- ./scaleway-cli object config install type=rclone
|
|
|
|
|
2022-06-11 17:12:48 +00:00
|
|
|
- mix local.hex --force
|
|
|
|
- mix local.rebar --force
|
2022-07-15 13:52:01 +00:00
|
|
|
- export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
|
|
|
|
- export PLEROMA_BUILD_BRANCH=$BUILD_TAG
|
2022-06-11 17:32:10 +00:00
|
|
|
- mix deps.clean --all
|
2022-06-11 15:41:15 +00:00
|
|
|
- mix deps.get --only prod
|
|
|
|
- mix release --path release
|
2022-06-11 17:48:26 +00:00
|
|
|
- zip akkoma-${tag}.zip -r release
|
2022-07-15 13:52:01 +00:00
|
|
|
- rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}-musl.zip
|
2022-07-14 10:59:21 +00:00
|
|
|
|
|
|
|
musl1.1:
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
2022-07-15 13:52:01 +00:00
|
|
|
- tag
|
2022-07-14 10:59:21 +00:00
|
|
|
branch:
|
|
|
|
- develop
|
2022-07-15 12:27:16 +00:00
|
|
|
- stable
|
2022-07-15 13:52:01 +00:00
|
|
|
- refs/tags/v*
|
2022-07-15 15:31:28 +00:00
|
|
|
- refs/tags/stable-*
|
2022-07-14 10:59:21 +00:00
|
|
|
secrets:
|
|
|
|
- SCW_ACCESS_KEY
|
|
|
|
- SCW_SECRET_KEY
|
|
|
|
- SCW_DEFAULT_ORGANIZATION_ID
|
|
|
|
image: voidlinux/voidlinux-musl
|
|
|
|
environment:
|
|
|
|
MIX_ENV: prod
|
|
|
|
commands:
|
|
|
|
- xbps-install -Suy || xbps-install -uy xbps
|
|
|
|
- xbps-install -Suy
|
|
|
|
- xbps-install -y git gcc musl-devel make cmake file-devel rclone wget zip libmagic elixir
|
|
|
|
- rm -rf release || true
|
|
|
|
- rm -rf _build || true
|
|
|
|
- rm -rf /root/.mix
|
|
|
|
- rm scaleway-cli || true
|
|
|
|
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
|
|
|
|
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
|
|
|
|
- chmod +x scaleway-cli
|
|
|
|
- ./scaleway-cli object config install type=rclone
|
|
|
|
|
|
|
|
- mix local.hex --force
|
|
|
|
- mix local.rebar --force
|
2022-07-15 13:52:01 +00:00
|
|
|
- export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
|
|
|
|
- export PLEROMA_BUILD_BRANCH=$BUILD_TAG
|
2022-07-14 10:59:21 +00:00
|
|
|
- mix deps.clean --all
|
|
|
|
- mix deps.get --only prod
|
|
|
|
- mix release --path release
|
|
|
|
- zip akkoma-${tag}.zip -r release
|
2022-07-15 13:52:01 +00:00
|
|
|
- rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}-musl11.zip
|