From 90e3d05467abe0f20983cc43d717dc3331bd2ca0 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:05:44 +0100 Subject: [PATCH 01/10] enable build history for rollbacks --- .woodpecker/.release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index f8b55effe..704f4c9ab 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -16,10 +16,11 @@ pipeline: glibc: when: event: - - push + - tag branch: - develop - stable + - historical-builds secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY @@ -48,6 +49,7 @@ pipeline: when: event: - push + - tag branch: - develop - stable @@ -82,6 +84,7 @@ pipeline: when: event: - push + - tag branch: - develop - stable -- 2.43.0 From adb7dd53ada1c53f4e716940eb11981bd36797db Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:12:40 +0100 Subject: [PATCH 02/10] tag pattern --- .woodpecker/.release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index 704f4c9ab..87c7c169b 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -20,7 +20,8 @@ pipeline: branch: - develop - stable - - historical-builds + tag: + - test-* secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY -- 2.43.0 From 301a0e5ef05df2dc013886df1425ec1643e140e3 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:13:56 +0100 Subject: [PATCH 03/10] allow this branch --- .woodpecker/.release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index 87c7c169b..c32b2aa09 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -20,6 +20,7 @@ pipeline: branch: - develop - stable + - historical-builds tag: - test-* secrets: -- 2.43.0 From 05cf3c77598b048329ba826dce0b86a76ea00733 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:14:48 +0100 Subject: [PATCH 04/10] try using branch for tag checks --- .woodpecker/.release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index c32b2aa09..8fa787a27 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -20,9 +20,7 @@ pipeline: branch: - develop - stable - - historical-builds - tag: - - test-* + - test-* # woodpecker is dumdum secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY -- 2.43.0 From 0f007e79ff410e5b60dda0bd5b28511672d480f6 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:18:09 +0100 Subject: [PATCH 05/10] gib pattern --- .woodpecker/.release.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index 8fa787a27..e8995f21b 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -17,10 +17,6 @@ pipeline: when: event: - tag - branch: - - develop - - stable - - test-* # woodpecker is dumdum secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY @@ -29,6 +25,8 @@ pipeline: environment: MIX_ENV: prod commands: + - echo $CI_COMMIT_BRANCH + - rm ~/nope - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev - 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 -- 2.43.0 From b029bed957dc420d6d0dd3516660a6ed5f2d7ea0 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:19:38 +0100 Subject: [PATCH 06/10] also give tag --- .woodpecker/.release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index e8995f21b..f04a250ce 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -26,6 +26,7 @@ pipeline: MIX_ENV: prod commands: - echo $CI_COMMIT_BRANCH + - echo $CI_COMMIT_TAG - rm ~/nope - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev - wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64 -- 2.43.0 From 10c80ab7a484ecce7a0eb9a613da0ebcf52483be Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:22:12 +0100 Subject: [PATCH 07/10] tag pattern --- .woodpecker/.release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index f04a250ce..f0a30e531 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -17,6 +17,8 @@ pipeline: when: event: - tag + branch: + - refs/tags/test-* secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY @@ -25,9 +27,6 @@ pipeline: environment: MIX_ENV: prod commands: - - echo $CI_COMMIT_BRANCH - - echo $CI_COMMIT_TAG - - rm ~/nope - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev - 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 @@ -36,13 +35,14 @@ pipeline: - echo "import Mix.Config" > config/prod.secret.exs - mix local.hex --force - mix local.rebar --force - - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH + - export BUILD_TAG=${$CI_COMMIT_TAG:-$CI_COMMIT_BRANCH} + - export PLEROMA_BUILD_BRANCH=$BUILD_TAG - mix deps.clean --all - mix deps.get --only prod - mkdir release - mix release --path release - zip akkoma-${tag}.zip -r release - - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${tag}.zip + - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}.zip musl: when: -- 2.43.0 From f3d6665ae5548522db3cb4b0582732cad82d619a Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:25:26 +0100 Subject: [PATCH 08/10] stop pre-processing --- .woodpecker/.release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index f0a30e531..a12999139 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -35,7 +35,7 @@ pipeline: - echo "import Mix.Config" > config/prod.secret.exs - mix local.hex --force - mix local.rebar --force - - export BUILD_TAG=${$CI_COMMIT_TAG:-$CI_COMMIT_BRANCH} + - export BUILD_TAG=$${$CI_COMMIT_TAG:-$CI_COMMIT_BRANCH} - export PLEROMA_BUILD_BRANCH=$BUILD_TAG - mix deps.clean --all - mix deps.get --only prod -- 2.43.0 From 98581002f41d7c1131faa20207d250cdf59f4b61 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:28:19 +0100 Subject: [PATCH 09/10] fix substitution --- .woodpecker/.release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index a12999139..21b88a67d 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -18,6 +18,9 @@ pipeline: event: - tag branch: + - develop + - stable + - refs/tags/v* - refs/tags/test-* secrets: - SCW_ACCESS_KEY @@ -35,7 +38,7 @@ pipeline: - echo "import Mix.Config" > config/prod.secret.exs - mix local.hex --force - mix local.rebar --force - - export BUILD_TAG=$${$CI_COMMIT_TAG:-$CI_COMMIT_BRANCH} + - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"} - export PLEROMA_BUILD_BRANCH=$BUILD_TAG - mix deps.clean --all - mix deps.get --only prod -- 2.43.0 From 6f726618ab49c7abf05dc80d18d62d235303f9b3 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 15 Jul 2022 14:38:05 +0100 Subject: [PATCH 10/10] only build on v* tags --- .woodpecker/.release.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index 21b88a67d..17bb4b0e4 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -16,12 +16,12 @@ pipeline: glibc: when: event: + - push - tag branch: - develop - stable - refs/tags/v* - - refs/tags/test-* secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY @@ -55,6 +55,7 @@ pipeline: branch: - develop - stable + - refs/tags/v* secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY @@ -75,12 +76,13 @@ pipeline: - mix local.hex --force - mix local.rebar --force - - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH + - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"} + - export PLEROMA_BUILD_BRANCH=$BUILD_TAG - mix deps.clean --all - mix deps.get --only prod - mix release --path release - zip akkoma-${tag}.zip -r release - - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${tag}-musl.zip + - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}-musl.zip musl1.1: when: @@ -90,6 +92,7 @@ pipeline: branch: - develop - stable + - refs/tags/v* secrets: - SCW_ACCESS_KEY - SCW_SECRET_KEY @@ -112,9 +115,10 @@ pipeline: - mix local.hex --force - mix local.rebar --force - - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH + - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"} + - export PLEROMA_BUILD_BRANCH=$BUILD_TAG - mix deps.clean --all - mix deps.get --only prod - mix release --path release - zip akkoma-${tag}.zip -r release - - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${tag}-musl11.zip + - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}-musl11.zip -- 2.43.0