mirror of
				https://gitlab.com/famedly/fluffychat.git
				synced 2025-11-03 22:07:23 +01:00 
			
		
		
		
	feat: add different deployments for stable/nightly
- re-enable F-Droid (we should not silently stop shipping it without further notice) - re-enable integration tests on other tag - make F-Droid job fail-safe - deploy stable and nightly releases at different slugs Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
		
							parent
							
								
									08bf3706a6
								
							
						
					
					
						commit
						653258a8b9
					
				@ -54,11 +54,10 @@ integration_test:
 | 
			
		||||
  script:
 | 
			
		||||
    - flutter pub get
 | 
			
		||||
    - flutter test integration_test
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
  tags:
 | 
			
		||||
    - famedly
 | 
			
		||||
    - docker
 | 
			
		||||
    - android
 | 
			
		||||
  timeout: 20m
 | 
			
		||||
  when: manual
 | 
			
		||||
 | 
			
		||||
# extending the default tests to test the Google-flavored builds
 | 
			
		||||
integration_test_google:
 | 
			
		||||
@ -67,7 +66,7 @@ integration_test_google:
 | 
			
		||||
    - git apply ./scripts/enable-android-google-services.patch
 | 
			
		||||
    - flutter pub get
 | 
			
		||||
    - flutter test integration_test
 | 
			
		||||
  when: manual
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
# extending the default tests to use Conduit as local homeserver
 | 
			
		||||
integration_test_conduit:
 | 
			
		||||
@ -82,7 +81,7 @@ integration_test_conduit:
 | 
			
		||||
    - scripts/integration-prepare-homeserver.sh
 | 
			
		||||
    # ensure the homeserver works
 | 
			
		||||
    - 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
 | 
			
		||||
integration_test_dendrite:
 | 
			
		||||
@ -97,7 +96,7 @@ integration_test_dendrite:
 | 
			
		||||
    - scripts/integration-prepare-homeserver.sh
 | 
			
		||||
    # ensure the homeserver works
 | 
			
		||||
    - 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:
 | 
			
		||||
  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 &
 | 
			
		||||
    # generate temporary release build configuration and ensure app launches
 | 
			
		||||
    - scripts/integration-check-release-build.sh
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
  tags:
 | 
			
		||||
    - famedly
 | 
			
		||||
    - docker
 | 
			
		||||
    - android
 | 
			
		||||
  timeout: 20m
 | 
			
		||||
  when: manual
 | 
			
		||||
 | 
			
		||||
release_mode_launches_google:
 | 
			
		||||
  extends: release_mode_launches
 | 
			
		||||
  before_script:
 | 
			
		||||
    - git apply ./scripts/enable-android-google-services.patch
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
 | 
			
		||||
build_web:
 | 
			
		||||
  stage: build
 | 
			
		||||
@ -186,9 +185,29 @@ deploy_playstore_internal:
 | 
			
		||||
  only:
 | 
			
		||||
    - 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:
 | 
			
		||||
  needs:
 | 
			
		||||
    - "build_web"
 | 
			
		||||
    - "fdroid_repo"
 | 
			
		||||
  stage: deploy
 | 
			
		||||
  image: node
 | 
			
		||||
  script:
 | 
			
		||||
@ -196,7 +215,11 @@ pages:
 | 
			
		||||
    - npx tailwindcss -o ./tailwind.css --minify
 | 
			
		||||
    - cd ..
 | 
			
		||||
    - 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:
 | 
			
		||||
    paths:
 | 
			
		||||
      - public
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										12
									
								
								scripts/download-web-stable.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								scripts/download-web-stable.sh
									
									
									
									
									
										Executable 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
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user