Merge branch 'braid/ci-stable-nightly' into 'main'

feat: add different deployments for stable/nightly

See merge request famedly/fluffychat!986
This commit is contained in:
Krille Fear 2022-08-19 05:26:04 +00:00
commit 9836e05f7f
2 changed files with 45 additions and 10 deletions

View File

@ -54,11 +54,10 @@ integration_test:
script: script:
- flutter pub get - flutter pub get
- flutter test integration_test - flutter test integration_test
allow_failure: true
tags: tags:
- famedly - android
- docker
timeout: 20m timeout: 20m
when: manual
# extending the default tests to test the Google-flavored builds # extending the default tests to test the Google-flavored builds
integration_test_google: integration_test_google:
@ -67,7 +66,7 @@ integration_test_google:
- git apply ./scripts/enable-android-google-services.patch - git apply ./scripts/enable-android-google-services.patch
- flutter pub get - flutter pub get
- flutter test integration_test - flutter test integration_test
when: manual allow_failure: true
# extending the default tests to use Conduit as local homeserver # extending the default tests to use Conduit as local homeserver
integration_test_conduit: integration_test_conduit:
@ -82,7 +81,7 @@ integration_test_conduit:
- scripts/integration-prepare-homeserver.sh - scripts/integration-prepare-homeserver.sh
# ensure the homeserver works # ensure the homeserver works
- curl docker:8008/_matrix/static/ 2> /dev/null | grep "M_NOT_FOUND" 1> /dev/null && echo "Conduit is running!" - curl docker:8008/_matrix/static/ 2> /dev/null | grep "M_NOT_FOUND" 1> /dev/null && echo "Conduit is running!"
when: manual allow_failure: true
# extending the default tests to use Dendrite as local homeserver # extending the default tests to use Dendrite as local homeserver
integration_test_dendrite: integration_test_dendrite:
@ -97,7 +96,7 @@ integration_test_dendrite:
- scripts/integration-prepare-homeserver.sh - scripts/integration-prepare-homeserver.sh
# ensure the homeserver works # ensure the homeserver works
- curl docker:8008/_matrix/static/ 2> /dev/null | grep "404 page not found" 1> /dev/null && echo "Dendrite is running!" - curl docker:8008/_matrix/static/ 2> /dev/null | grep "404 page not found" 1> /dev/null && echo "Dendrite is running!"
when: manual allow_failure: true
release_mode_launches: release_mode_launches:
image: registry.gitlab.com/famedly/company/frontend/flutter-dockerimages/integration/stable:${FLUTTER_VERSION} image: registry.gitlab.com/famedly/company/frontend/flutter-dockerimages/integration/stable:${FLUTTER_VERSION}
@ -107,16 +106,16 @@ release_mode_launches:
- scripts/integration-start-avd.sh & - scripts/integration-start-avd.sh &
# generate temporary release build configuration and ensure app launches # generate temporary release build configuration and ensure app launches
- scripts/integration-check-release-build.sh - scripts/integration-check-release-build.sh
allow_failure: true
tags: tags:
- famedly - android
- docker
timeout: 20m timeout: 20m
when: manual
release_mode_launches_google: release_mode_launches_google:
extends: release_mode_launches extends: release_mode_launches
before_script: before_script:
- git apply ./scripts/enable-android-google-services.patch - git apply ./scripts/enable-android-google-services.patch
allow_failure: true
build_web: build_web:
stage: build stage: build
@ -186,9 +185,29 @@ deploy_playstore_internal:
only: only:
- main - main
fdroid_repo:
image: debian:testing
stage: deploy
before_script:
- apt-get update && apt-get -qy install fdroidserver wget curl jq --no-install-recommends || true
- ./scripts/prepare-fdroid.sh || true
script:
- ./scripts/create_fdroid_repos.sh || true
artifacts:
when: always
paths:
- repo
needs:
- "build_android_apk"
resource_group: playstore_release
allow_failure: true
only:
- main
pages: pages:
needs: needs:
- "build_web" - "build_web"
- "fdroid_repo"
stage: deploy stage: deploy
image: node image: node
script: script:
@ -196,7 +215,11 @@ pages:
- npx tailwindcss -o ./tailwind.css --minify - npx tailwindcss -o ./tailwind.css --minify
- cd .. - cd ..
- mv docs public - mv docs public
- mv build/web/ public/web/ - mv repo public
- mv build/web/ public/nightly
- rm -rf build
- ./scripts/download-web-stable.sh
- mv stable public/web
artifacts: artifacts:
paths: paths:
- public - public

12
scripts/download-web-stable.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
GITLAB_PROJECT_ID="16112282"
PIPELINE="$(curl https://gitlab.com/api/v4/projects/${GITLAB_PROJECT_ID}/pipelines\?scope=tags\&status=success\&order_by=updated_at | jq '.[].id' | head -n1)"
JOB="$(curl https://gitlab.com/api/v4/projects/${GITLAB_PROJECT_ID}/pipelines/${PIPELINE}/jobs | jq -r '.[] | select(.name == "build_web").id')"
wget --output-document web.zip https://gitlab.com/api/v4/projects/${GITLAB_PROJECT_ID}/jobs/${JOB}/artifacts
unzip web.zip
mv build/web stable