-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcircle.yml.bak
133 lines (125 loc) · 6.49 KB
/
circle.yml.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Customize the test machine
machine:
ruby:
version: 2.4.1
java:
version: oraclejdk8
node:
version: 8.2.1
environment:
_JAVA_OPTIONS: "-Xms512m -Xmx1024m" # Appears to solve "Your build has exceeded the memory limit of 4G on 1 container"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' # Did not solve "Your build has exceeded the memory limit of 4G on 1 container"
checkout:
post:
- git submodule sync --recursive
- git submodule update --recursive --init # use submodules
- chmod -R +x scripts
- chmod +x -R hooks/*
- cp -r android-licenses/. $ANDROID_HOME/licenses
- git fetch --all --unshallow || true
- chmod 777 -R $PWD
# Customize dependencies
dependencies:
post:
#- wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz
#- tar -xzf sc-latest-linux.tar.gz
pre:
- ruby -v
- mkdir node_modules || true # must exist prior to override to cache
- mkdir platforms || true # must exist prior to override to cache
- mkdir plugins || true # must exist prior to override to cache
- mkdir src/lib || true # must exist prior to override to cache
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
override:
#- if [[ $CIRCLE_BRANCH == *"feature"* ]]; then sudo apt-add-repository -y ppa:duggan/bats; fi # Avoid conflicting simultaneous GI testing
#- if [[ $CIRCLE_BRANCH == *"feature"* ]]; then sudo apt-get update; sudo apt-get install -y bats; fi # Avoid conflicting simultaneous GI testing
#- if [[ $CIRCLE_BRANCH == *"feature"* ]]; then curl -L -o ~/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5rc1/jq-linux-x86_64-static && chmod +x ~/bin/jq; fi # Avoid conflicting simultaneous GI testing
- if [[ $CIRCLE_BRANCH != *"feature"* ]]; then sudo apt-get update; sudo apt-get install tree imagemagick; fi
- if [[ $CIRCLE_BRANCH != *"feature"* ]]; then npm install -g gulp [email protected] [email protected] bower cordova-hot-code-push-cli; fi
- if [[ $CIRCLE_BRANCH != *"feature"* ]]; then npm install; fi
#- if [[ $CIRCLE_BRANCH != *"feature"* ]]; then gulp prepareRepositoryForAndroidWithoutCleaning; fi
#- if [[ $CIRCLE_BRANCH != *"feature"* ]]; then gulp prepareRepositoryForAndroid; fi # Done in gulpBuildAllAndroidApps
- if [[ $CIRCLE_BRANCH != *"feature"* ]]; then bundle install; fi # Don't use sudo or it uses old ruby version
- if [[ $CIRCLE_BRANCH != *"feature"* ]]; then bundle update; fi # Don't use sudo or it uses old ruby version
#- if [[ $CIRCLE_BRANCH != *"feature"* ]]; then gulp prepareRepositoryForAndroid; fi
cache_directories:
- node_modules # Probably don't want to cache node_modules so we catch problematic dependency changes
- platforms
- plugins
- src/lib
- /opt/circleci/nodejs/v4.2.6/bin
- /opt/circleci/nodejs/v4.2.6/lib/node_modules
test:
override:
- echo "This line is to prevent automatic test detection."
general:
branches:
ignore:
- gh-pages # list of branches to ignore
- develop
- master
- /release\/.*/ # or ignore regexes
- /feature\/.*/ # or ignore regexes
- /renovate\/.*/ # or ignore regexes
artifacts:
- "platforms/android/build/outputs/apk"
- "plugins/de.appplant.cordova.plugin.local-notification"
- "plugins/cordova-plugin-local-notifications"
#- "dropbox"
deployment:
medimodo:
branch: medimodo
commands:
- git push [email protected]:medimodo.git $CIRCLE_SHA1:refs/heads/master --force
build:
branch: /apps\/.*/
commands:
- gulp buildChromeExtension # Build Chrome first in case Android upload fails
- gulp buildAndroidApp
feature:
branch: /feature\/.*/
commands:
- echo "Running feature deploy section because BRANCH_NAME is $CIRCLE_BRANCH"
#- chmod +x do-exclusively
#- ./do-exclusively git push [email protected]:medimodo.git $CIRCLE_SHA1:refs/heads/master --force
- git push [email protected]:medimodo.git $CIRCLE_SHA1:refs/heads/master --force
- curl "https://api.ghostinspector.com/v1/suites/56f5b92519d90d942760ea96/execute/?startUrl=https://medimodo.herokuapp.com&clientId=oauth_test_client&apiKey=f5b531ccd55da08abf35fadabd7b7b04f3d64312&commit="$(git rev-parse HEAD) > ghostinspector.json
- php ghostinspector_parser.php
pull:
branch: /pull\/.*/
commands:
#- chmod +x do-exclusively
#- ./do-exclusively git push [email protected]:qm-ionic.git $CIRCLE_SHA1:refs/heads/master --force
- git push [email protected]:medimodo.git $CIRCLE_SHA1:refs/heads/master --force
- curl "https://api.ghostinspector.com/v1/suites/56f5b92519d90d942760ea96/execute/?startUrl=https://medimodo.herokuapp.com&clientId=oauth_test_client&apiKey=f5b531ccd55da08abf35fadabd7b7b04f3d64312&commit="$(git rev-parse HEAD) > ghostinspector.json
- php ghostinspector_parser.php
renovate:
branch: /renovate\/.*/
commands:
# Chrome & Android on CircleCI broken so doing this on travis
- echo "Running renovate deploy section because BRANCH_NAME is $CIRCLE_BRANCH"
- gulp _build-all-chrome
- "[ -f ./build/quantimodo-chrome-extension.zip ] || exit 1;"
#- gulp buildAllAndroidAppsWithCleaning # We run this on Travis
#- "[[ -f ./platforms/android/build/outputs/apk/android-release.apk ]] || exit 1; "
- git push [email protected]:medimodo.git $CIRCLE_SHA1:refs/heads/master --force
- curl "https://api.ghostinspector.com/v1/suites/56f5b92519d90d942760ea96/execute/?startUrl=https://medimodo.herokuapp.com&clientId=oauth_test_client&apiKey=f5b531ccd55da08abf35fadabd7b7b04f3d64312&commit="$(git rev-parse HEAD) > ghostinspector.json
- php ghostinspector_parser.php
staging:
branch: develop
commands:
# Chrome & Android on CircleCI broken so doing this on travis
- gulp _build-all-chrome # Build Chrome first in case Android upload fails
- "[ -f ./build/quantimodo-chrome-extension.zip ] || exit 1;"
- gulp buildAllAndroidAppsWithCleaning
- "[[ -f ./platforms/android/build/outputs/apk/android-release.apk ]] || exit 1; "
#- gulp mergeToMasterAndTriggerRebuildsForAllApps
production:
branch: master
commands:
# Chrome & Android on CircleCI broken so doing this on travis
- gulp buildChromeExtension
- gulp prepareRepositoryForAndroid # Clean and build master to double check that fresh non-cached builds don't fail
- gulp buildAndroidApp
- gulp fastlaneSupplyProduction
#- cp platforms/android/build/outputs/apk/* $CIRCLE_ARTIFACTS