Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
187
Merge Requests
12
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Commits
643cb12e
Commit
643cb12e
authored
1 day ago
by
Martin Santangelo
Browse files
Options
Download
wip
parent
0aa3a563
feat/improved-ci-flow-play-store
1 merge request
!466
WIP: CI Improvements
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
30 deletions
+108
-30
.circleci/config.yml
View file @
643cb12e
version
:
2
jobs
:
node
:
test
:
working_directory
:
~/mobile-native
docker
:
-
image
:
circleci/node:10
...
...
@@ -174,11 +174,7 @@ jobs:
name
:
Upload to Testflight release
command
:
fastlane testflight
working_directory
:
ios
branches
:
only
:
-
/stable-*/
-
/release-*/
-
test/circle-ci
sentry
:
docker
:
-
image
:
getsentry/sentry-cli
...
...
@@ -204,10 +200,16 @@ workflows:
version
:
2
node-ios
:
jobs
:
-
node
-
test
-
ios
:
requires
:
-
node
-
test
filters
:
branches
:
only
:
-
/stable-*/
-
/release-*/
-
test/circle-ci
-
sentry
:
requires
:
-
ios
This diff is collapsed.
.gitlab-ci.yml
View file @
643cb12e
...
...
@@ -2,10 +2,10 @@
stages
:
-
test
-
build
-
e2e
-
deploy
-
i18n
-
deploy
# Spec test
test:jest:
image
:
node:10.16.3
stage
:
test
...
...
@@ -14,10 +14,12 @@ test:jest:
paths
:
-
node_modules/
-
.jest/cache/
before_script
:
-
yarn install --frozen-lockfile
script
:
-
yarn install
-
yarn test
# Upload new terms to poeditor
i18n:upload:
image
:
node:10.16.3
stage
:
i18n
...
...
@@ -25,14 +27,15 @@ i18n:upload:
key
:
${CI_COMMIT_REF_SLUG}
paths
:
-
node_modules/
-
.jest/cache/
before_script
:
-
yarn install --frozen-lockfile
script
:
-
yarn install
-
yarn locale upload --poeditor-key=${CI_POEDITOR_KEY} --overwrite=1
only
:
refs
:
-
/^release-*/
# Upload new terms and remove the deleted
i18n:uploadsync:
image
:
node:10.16.3
stage
:
i18n
...
...
@@ -40,41 +43,115 @@ i18n:uploadsync:
key
:
${CI_COMMIT_REF_SLUG}
paths
:
-
node_modules/
-
.jest/cache/
before_script
:
-
yarn install --frozen-lockfile
script
:
-
yarn install
-
yarn locale upload --poeditor-key=${CI_POEDITOR_KEY} --overwrite=1 --sync_terms=1
only
:
refs
:
-
/^stable-*/
-
master
# Web dev version using cache and without sentry maps upload
build:android:
image
:
circleci/android:api-28-node
stage
:
build
cache
:
key
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths
:
-
node_modules/
-
android/vendor/bundle
-
.gradle/caches
-
.gradle/wrapper
-
.android/build-cache/
before_script
:
-
'
sed
-i
'
'
s/^apply
from:
"..\/..\/node_modules\/\@sentry\/react-native\/sentry.gradle"//'
'
android/app/build.gradle'
-
export ANDROID_SDK_HOME=$CI_PROJECT_DIR
-
export GRADLE_USER_HOME="$CI_PROJECT_DIR/.gradle"
-
sudo sysctl fs.inotify.max_user_watches=524288
-
sudo sysctl -p
-
yarn install --frozen-lockfile
-
cd android
-
bundle install --path=vendor/bundle
script
:
-
yarn install
-
bundle exec fastlane assemble_build
-
mv app/build/outputs/apk/release/app-release.apk ../Minds-$CI_COMMIT_REF_SLUG-dev.apk
artifacts
:
name
:
"
Minds
APK"
paths
:
-
Minds-$CI_COMMIT_REF_SLUG-dev.apk
expire_in
:
7 days
when
:
on_success
only
:
refs
:
-
/^release-*/
# Web version (Higher version code)
build:androidproduction:
image
:
circleci/android:api-28-node
stage
:
build
before_script
:
-
export ANDROID_SDK_HOME=$CI_PROJECT_DIR
-
export GRADLE_USER_HOME="$CI_PROJECT_DIR/.gradle"
-
sudo sysctl fs.inotify.max_user_watches=524288
-
sudo sysctl -p
-
yarn install --frozen-lockfile
-
cd android
-
bundle install --path=vendor/bundle
script
:
-
bundle exec fastlane assemble_build
-
mv app/build/outputs/apk/release/app-release.apk ../Minds-$CI_COMMIT_REF_SLUG.apk
artifacts
:
name
:
"
Minds
APK"
paths
:
-
Minds-$CI_COMMIT_REF_SLUG.apk
expire_in
:
7 days
when
:
on_success
only
:
refs
:
-
/^stable-*/
-
/^test-*/
# Play store version (Lowest version code)
build:androidproduction-playstore:
image
:
circleci/android:api-28-node
stage
:
build
before_script
:
-
'
sed
-i
'
'
s/^versionCode=/#
versionCode=/'
'
android/gradle.properties'
-
'
sed
-i
'
'
s/^##
versionCode/versionCode/'
'
android/gradle.properties'
-
export ANDROID_SDK_HOME=$CI_PROJECT_DIR
-
export GRADLE_USER_HOME="$CI_PROJECT_DIR/.gradle"
-
sudo sysctl fs.inotify.max_user_watches=524288
-
sudo sysctl -p
-
yarn install --frozen-lockfile
-
cd android
-
bundle install
-
fastlane assemble_build
-
cp app/build/outputs/apk/release/app-release.apk ../Minds-$CI_BUILD_REF_SLUG.apk
-
bundle install --path=vendor/bundle
script
:
-
bundle exec fastlane assemble_build
-
mv app/build/outputs/apk/release/app-release.apk ../Minds-$CI_COMMIT_REF_SLUG-play_store.apk
artifacts
:
name
:
"
Minds
APK"
paths
:
-
Minds-$CI_
BUILD_REF_SLUG
.apk
-
Minds-$CI_
COMMIT_REF_SLUG-play_store
.apk
expire_in
:
7 days
when
:
on_success
only
:
refs
:
-
/^stable-*/
-
/^test-*/
deploy:s3:
# Deploy Web/PlayStore versions to s3 and browserstack
deploy:s3andbrowserstack:
image
:
minds/ci:latest
stage
:
deploy
script
:
-
echo "Upload Minds-$CI_BUILD_REF_SLUG.apk"
-
aws s3 cp Minds-$CI_BUILD_REF_SLUG.apk s3://minds-repo/mobile/Minds-$CI_BUILD_REF_SLUG.apk
-
echo "Upload Minds-$CI_COMMIT_REF_SLUG.apk"
-
aws s3 cp Minds-$CI_COMMIT_REF_SLUG.apk s3://minds-repo/mobile/Minds-$CI_COMMIT_REF_SLUG.apk
-
aws s3 cp Minds-$CI_COMMIT_REF_SLUG-play_store.apk s3://minds-repo/mobile/Minds-$CI_COMMIT_REF_SLUG-play_store.apk
-
curl -u $CI_BROWSERSTACK_APIKEY -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@Minds-$CI_COMMIT_REF_SLUG.apk"
-
curl -u $CI_BROWSERSTACK_APIKEY -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@Minds-$CI_COMMIT_REF_SLUG-play_store.apk"
dependencies
:
-
build:android
-
build:androidproduction
-
build:androidproduction-playstore
only
:
refs
:
-
/^stable-*/
...
...
@@ -84,10 +161,9 @@ deploy:google_play:
image
:
minds/ci:latest
stage
:
deploy
script
:
-
echo "Upload Minds-$CI_
BUILD
_REF_SLUG.apk"
-
echo "Upload Minds-$CI_
COMMIT
_REF_SLUG.apk"
dependencies
:
-
build:android
-
build:android
production-playstore
only
:
refs
:
-
/^stable-*/
-
/^test-*/
This diff is collapsed.
android/gradle.properties
View file @
643cb12e
...
...
@@ -31,5 +31,5 @@ versionName=3.14.0
# CUSTOM
versionCode
=
1050000018
# PLAY STORE
# versionCode=310036
# PLAY STORE
(Keep double hash for the CI)
#
#
versionCode=310036
This diff is collapsed.
Please
register
or
sign in
to comment