Merge pull request 'updating docs: start akko first, then upgrade frontend' (#486...
[akkoma] / .woodpecker.yml
index be497b531cd7bdb1001ac67ecf32ba9f92844c9e..49718d630bf34f01d3503f444c2d0e8ca57dbfba 100644 (file)
@@ -14,6 +14,14 @@ variables:
         - stable
         - refs/tags/v*
         - refs/tags/stable-*
+  - &on-stable
+    when:
+      event:
+        - push
+        - tag
+      branch:
+        - stable
+        - refs/tags/stable-*
   - &on-point-release
     when:
       event:
@@ -29,10 +37,11 @@ variables:
   - &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG"
 
   - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)"
+  - &mix-clean "mix deps.clean --all && mix clean"
 
 services:
   postgres:
-    image: postgres:13
+    image: postgres:15
     when:
       event:
         - pull_request
@@ -44,14 +53,14 @@ services:
 pipeline:
   lint:
     <<: *on-pr-open
-    image: akkoma/ci-base:latest
+    image: akkoma/ci-base:1.14
     commands:
     - mix local.hex --force
     - mix local.rebar --force
     - mix format --check-formatted
 
   build:
-    image: akkoma/ci-base:latest
+    image: akkoma/ci-base:1.14
     <<: *on-pr-open
     environment:
       MIX_ENV: test
@@ -66,7 +75,7 @@ pipeline:
       - mix compile
 
   test:
-    image: akkoma/ci-base:latest
+    image: akkoma/ci-base:1.14
     <<: *on-pr-open
     environment:
       MIX_ENV: test
@@ -86,13 +95,12 @@ pipeline:
 
   # Canonical amd64
   ubuntu22:
-    image: hexpm/elixir:1.13.4-erlang-25.0.2-ubuntu-jammy-20220428
+    image: hexpm/elixir:1.14.3-erlang-25.2.2-ubuntu-jammy-20221130
     <<: *on-release
     environment:
       MIX_ENV: prod
       DEBIAN_FRONTEND: noninteractive
     commands:
-      - rm config/emoji.txt
       - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget
       - *clean
       - echo "import Config" > config/prod.secret.exs
@@ -100,22 +108,21 @@ pipeline:
       - *tag-build
       - mix deps.get --only prod
       - mix release --path release
-      - zip akkoma-amd64.zip -r release
+      - zip akkoma-ubuntu-jammy.zip -r release
 
   release-ubuntu22:
     image: akkoma/releaser
     <<: *on-release
     secrets: *scw-secrets
     commands:
-      - export SOURCE=akkoma-amd64.zip
-      - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64.zip
+      - export SOURCE=akkoma-ubuntu-jammy.zip
+      - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-ubuntu-jammy.zip
+      - /bin/sh /entrypoint.sh
+      - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-ubuntu-jammy.zip
       - /bin/sh /entrypoint.sh
-    environment:
-      SOURCE: akkoma-amd64.zip
-      DEST: scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64.zip
 
   debian-bullseye:
-    image: elixir:1.13.4
+    image: hexpm/elixir:1.14.3-erlang-25.2.2-debian-bullseye-20230109
     <<: *on-release
     environment:
       MIX_ENV: prod
@@ -126,6 +133,7 @@ pipeline:
       - echo "import Config" > config/prod.secret.exs
       - *setup-hex
       - *tag-build
+      - *mix-clean
       - mix deps.get --only prod
       - mix release --path release
       - zip akkoma-amd64.zip -r release
@@ -136,12 +144,14 @@ pipeline:
     secrets: *scw-secrets
     commands:
       - export SOURCE=akkoma-amd64.zip
-      - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-debian-bullseye.zip
+      - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64.zip
+      - /bin/sh /entrypoint.sh
+      - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-debian-stable.zip
       - /bin/sh /entrypoint.sh
 
   # Canonical amd64-musl
   musl:
-    image: elixir:1.13.4-alpine
+    image: hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.15.6
     <<: *on-release
     environment:
       MIX_ENV: prod
@@ -149,7 +159,7 @@ pipeline:
       - apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
       - *clean
       - *setup-hex
-      - mix deps.clean --all
+      - *mix-clean
       - *tag-build
       - mix deps.get --only prod
       - mix release --path release