only test release

This commit is contained in:
FloatingGhost 2022-06-11 17:34:13 +01:00
parent 443942e1ea
commit 081b4b279a
4 changed files with 11 additions and 12 deletions

View file

@ -7,4 +7,4 @@ pipeline:
- mix format --check-formatted - mix format --check-formatted
when: when:
event: event:
- push - tag

View file

@ -6,7 +6,7 @@ pipeline:
amd64-glibc: amd64-glibc:
when: when:
event: event:
- tag - push
group: release group: release
image: elixir:1.13 image: elixir:1.13
@ -24,7 +24,7 @@ pipeline:
- export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH
- mix release --path release - mix release --path release
- zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release - zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release
- rclone copy akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/ - rclone copyto akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${platform}.zip
amd64-musl: amd64-musl:
when: when:
@ -47,7 +47,7 @@ pipeline:
- export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH} - export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
- mix release --path release - mix release --path release
- zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release - zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release
- rclone copy akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/ - rclone copyto akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${platform}.zip
arm64-glibc: arm64-glibc:
when: when:
@ -70,7 +70,8 @@ pipeline:
- export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH
- mix release --path release - mix release --path release
- zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release - zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release
- rclone copy akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/ - rclone copyto akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${platform}.zip
arm64-musl: arm64-musl:
when: when:
@ -93,4 +94,4 @@ pipeline:
- export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH} - export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
- mix release --path release - mix release --path release
- zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release - zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release
- rclone copy akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/ - rclone copyto akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${platform}.zip

View file

@ -10,7 +10,7 @@ pipeline:
image: pleromaforkci/ci-base:${ELIXIR_VERSION} image: pleromaforkci/ci-base:${ELIXIR_VERSION}
when: when:
event: event:
- push - tag
environment: environment:
MIX_ENV: test MIX_ENV: test
commands: commands:
@ -24,7 +24,7 @@ pipeline:
image: pleromaforkci/ci-base:${ELIXIR_VERSION} image: pleromaforkci/ci-base:${ELIXIR_VERSION}
when: when:
event: event:
- push - tag
environment: environment:
MIX_ENV: test MIX_ENV: test
POSTGRES_DB: pleroma_test POSTGRES_DB: pleroma_test

View file

@ -5,8 +5,6 @@ detect_flavour() {
arch="$(uname -m)" arch="$(uname -m)"
if [ "$arch" = "x86_64" ]; then if [ "$arch" = "x86_64" ]; then
arch="amd64" arch="amd64"
elif [ "$arch" = "armv7l" ]; then
arch="arm"
elif [ "$arch" = "aarch64" ]; then elif [ "$arch" = "aarch64" ]; then
arch="arm64" arch="arm64"
else else
@ -77,13 +75,13 @@ update() {
done done
RELEASE_ROOT=$(dirname "$SCRIPTPATH") RELEASE_ROOT=$(dirname "$SCRIPTPATH")
uri="https://git.pleroma.social" uri="https://akkoma-updates.s3-website.fr-par.scw.cloud"
project_id="2" project_id="2"
project_branch="${BRANCH:-$(detect_branch)}" project_branch="${BRANCH:-$(detect_branch)}"
flavour="${FLAVOUR:-$(detect_flavour)}" flavour="${FLAVOUR:-$(detect_flavour)}"
tmp="${TMP_DIR:-/tmp}" tmp="${TMP_DIR:-/tmp}"
artifact="$tmp/pleroma.zip" artifact="$tmp/pleroma.zip"
full_uri="${FULL_URI:-${uri}/api/v4/projects/${project_id}/jobs/artifacts/${project_branch}/download?job=${flavour}}" full_uri="${FULL_URI:-${uri}/${project_branch}/akkoma-${flavour}}.zip"
echo "Downloading the artifact from ${full_uri} to ${artifact}" echo "Downloading the artifact from ${full_uri} to ${artifact}"
curl "$full_uri" -o "${artifact}" curl "$full_uri" -o "${artifact}"
echo "Unpacking ${artifact} to ${tmp}" echo "Unpacking ${artifact} to ${tmp}"