-
Notifications
You must be signed in to change notification settings - Fork 2
/
wercker.yml
136 lines (131 loc) · 3.85 KB
/
wercker.yml
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
134
135
136
box: bringnow/android-sdk
no-response-timeout: 30
command-timeout: 60
build:
steps:
- script:
name: echo nodejs information
code: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
- npm-install
- install-packages:
packages: libelf-dev
- script:
name: Install dev packages (work around)
code: npm install babel-preset-es2015-minimal babel-preset-stage-0
- install-packages:
packages: libelf-dev
# - script:
# name: flow
# code: |
# npm install flow-typed
# ./node_modules/.bin/flow-typed install jest@12
# npm run flow
- script:
name: eslint
code: npm run lint
- script:
name: npm-test
code: npm test -- --coverage
- script:
name: save-artifacts
code: cp -r coverage $WERCKER_REPORT_ARTIFACTS_DIR/coverage
after-steps:
- script:
name: install necessary packages for coverage notification
code: npm install istanbul
- slack-notifier:
url: $SLACK_URL
username: wercker-ci
- script:
name: slack-notify-coverage
code: node slack-istanbul.js
demo-build-and-deploy:
box: node:6.10
steps:
- script:
# http://qiita.com/Quramy/items/6fb900018060cf2e738e
name: Rebuild
code: npm rebuild
- script:
name: Build web app for demo
code: npm run build:demo
- s3sync:
key_id: $AWS_ACCESS_KEY_ID
key_secret: $AWS_SECRET_ACCESS_KEY
bucket_url: $S3_BUCKET_DEPLOY_TO
source_dir: ./public
web-build-and-upload:
box: node:6.10
steps:
- script:
name: install zip
code: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y zip
- script:
name: Rebuild
code: npm rebuild
- script:
name: Build web app
code: npm run build
- script:
name: Create zip archive
code: |
export ZIP_ARCHIVE_NAME=${WERCKER_MAIN_PIPELINE_STARTED}-${WERCKER_GIT_COMMIT}.zip
zip -r ${ZIP_ARCHIVE_NAME} public
- koding/s3put:
key-id: $AWS_ACCESS_KEY_ID
key-secret: $AWS_SECRET_ACCESS_KEY
file: ${ZIP_ARCHIVE_NAME}
url: s3://${S3_BUCKET_DEPLOY_TO}/${S3_PREFIX}/${ZIP_ARCHIVE_NAME}
electron-build-and-upload:
box: node:6.10
steps:
- script:
name: install packages
code: |
sudo dpkg --add-architecture i386
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y zip
sudo apt-get install -y wine wine-development
- script:
# http://qiita.com/Quramy/items/6fb900018060cf2e738e
name: Rebuild
code: npm rebuild
- script:
name: Build electron app
code: npm run electron:build:prod
- script:
name: Pack electron app
code: npm run electron:pack:all
# Create zip archives within the same pipeline to building app since symlinks are not kept over pipelines
- script:
name: Create zip archives
code: |
export DESTINATION_DIR_NAME=${WERCKER_MAIN_PIPELINE_STARTED}-${WERCKER_GIT_COMMIT}
mkdir ${DESTINATION_DIR_NAME}
cd electron-build
for f in `ls .`; do zip -ry ../${DESTINATION_DIR_NAME}/$f.zip $f; done
cd ..
- koding/s3put:
key-id: $AWS_ACCESS_KEY_ID
key-secret: $AWS_SECRET_ACCESS_KEY
file: ./${DESTINATION_DIR_NAME}
url: s3://${S3_BUCKET_DEPLOY_TO}/${S3_PREFIX}/
deploy-debug:
steps:
- create-file:
name: Create crashlytics.properties
filename: android/app/crashlytics.properties
overwrite: true
content: |-
apiKey=$FABRIC_API_KEY
apiSecret=$FABRIC_BUILD_SECRET
- script:
name: Build app and Deploy to Fabric
cwd: android
code: ./gradlew assembleDebug -PbundleInDebug=true -PversionName="$(git describe | sed -e 's/^v//')" crashlyticsUploadDistributionDebug