Fakultas Ilmu Komputer UI

Commit e6f45e6b authored by fazasabira's avatar fazasabira
Browse files

[GREEN] all tests passed & no issues found at flutter analyze for SUPER REAL

parent e0dfd7ec
Pipeline #48363 passed with stages
in 9 minutes and 32 seconds
......@@ -2,6 +2,7 @@ stages:
- lint
- test
- sonarqube
- build
- deploy
variables:
......@@ -10,6 +11,7 @@ variables:
before_script:
- export PATH=$PATH:/sdk/android-sdk-linux/platform-tools/
- echo flutter.sdk=/sdk/flutter > android/local.properties
- mv $FLUTTER_ENV .env
- flutter pub get
image: michael09/flutter:28-1.12.13_hotfix.9
......@@ -17,7 +19,7 @@ image: michael09/flutter:28-1.12.13_hotfix.9
Lint:
stage: lint
script:
- flutter analyze
- flutter analyze
Test:
stage: test
......@@ -42,12 +44,30 @@ Sonarqube:
script:
- sonar-scanner -Dsonar.login=$SONARQUBE_TOKEN -Dsonar.branch.name=$CI_COMMIT_REF_NAME -Dsonar.projectKey=$SONARQUBE_PROJECT_KEY -X
BuildAppBundle:
stage: build
script:
- mv $KEY_PROPERTIES_ANDROID android/key.properties
- echo $KEYSTORE_ANDROID | base64 -d > android/app/upload.keystore
- echo $CI_PIPELINE_IID
- mkdir symbols
- flutter build appbundle --build-number $CI_PIPELINE_IID
- flutter build apk --release --build-name=$APP_NAME --build-number=1
artifacts:
paths:
- build/app/outputs/bundle/release
- build/app/outputs/apk/release
- symbols
expire_in: 1 hour
only:
- staging
- master
DeployToProduction:
DeployAppCenterToProduction:
dependencies:
- BuildAppBundle
variables:
ENV_NAME: "production"
image: runmymind/docker-android-sdk:latest
stage: deploy
tags:
- build
......@@ -55,15 +75,10 @@ DeployToProduction:
refs:
- master
before_script:
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.7-stable.tar.xz && tar xf flutter.tar.xz -C /
- export PATH=$PATH:/flutter/bin
- apt-get update && apt-get install gnupg -y
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt-get install -y nodejs
- flutter doctor -v
- flutter packages get
- npm install --global appcenter-cli
script:
- flutter build apk --release --build-name=$APP_NAME --build-number=1
- appcenter
- appcenter login --token=$APPCENTER_API_TOKEN
- appcenter distribute release -f build/app/outputs/apk/release/app-release.apk --app $APPCENTER_APP_NAME_PROD --group $APPCENTER_GROUP_TARGET
......@@ -71,9 +86,10 @@ DeployToProduction:
name: production
DeployToStaging:
dependencies:
- BuildAppBundle
variables:
ENV_NAME: "staging"
image: runmymind/docker-android-sdk:latest
stage: deploy
tags:
- build
......@@ -81,15 +97,10 @@ DeployToStaging:
refs:
- staging
before_script:
- wget --quiet --output-document=flutter.tar.xz https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.8-stable.tar.xz && tar xf flutter.tar.xz -C /
- export PATH=$PATH:/flutter/bin
- apt-get update && apt-get install gnupg -y
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt-get install -y nodejs
- flutter doctor -v
- flutter packages get
- npm install --global appcenter-cli
script:
- flutter build apk --release --build-name=$APP_NAME-$ENV_NAME --build-number=1
- appcenter
- appcenter login --token=$APPCENTER_API_TOKEN
- appcenter distribute release -f build/app/outputs/apk/release/app-release.apk --app $APPCENTER_APP_NAME_STAGING --group $APPCENTER_GROUP_TARGET
......@@ -120,4 +131,47 @@ DeployToDevelopment:
- appcenter login --token=$APPCENTER_API_TOKEN
- appcenter distribute release -f build/app/outputs/apk/release/app-release.apk --app $APPCENTER_APP_NAME_DEV --group $APPCENTER_GROUP_TARGET
environment:
name: development
\ No newline at end of file
name: development
DeployToPlayStoreStaging:
image: ruby:2.6.5
stage: deploy
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
dependencies:
- BuildAppBundle
environment:
name: Play Store internal
before_script:
- mv $KEY_FASTLANE_ANDROID android/key_fastlane.json
- cd android
- gem install bundler
- bundle install
script:
- bundle exec fastlane supply --aab ../build/app/outputs/bundle/release/app-release.aab --track internal
only:
- staging
DeployToPlayStoreProduction:
image: ruby:2.6.5
stage: deploy
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
dependencies:
- BuildAppBundle
environment:
name: Play Store alpha
before_script:
- mv $KEY_FASTLANE_ANDROID android/key_fastlane.json
- mv android/fastlane/metadata/android/id/changelogs/changelogs.txt android/fastlane/metadata/android/id/changelogs/$CI_PIPELINE_IID.txt
- cd android
- gem install bundler
- bundle install
script:
- bundle exec fastlane supply --aab ../build/app/outputs/bundle/release/app-release.aab --track alpha
only:
- master
when: manual
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment