-
Notifications
You must be signed in to change notification settings - Fork 58
/
wercker.yml
201 lines (194 loc) · 7.04 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
box: ubuntu:16.04
build:
steps:
- install-packages:
packages: linuxbrew-wrapper clang wget software-properties-common cmake libtool autoconf psmisc opencl-headers ocl-icd-libopencl1 pciutils
- script:
name: install node
code: |
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs
- script:
name: npm install
code: npm install
- script:
name: clone argon2
code: git clone https://github.com/WebDollar/argon2
- script:
name: install argon2
cwd: argon2
code: |
autoreconf -i
bash configure
cmake -DCMAKE_BUILD_TYPE=Release .
make
- script:
name: finalize argon2 install
code: cp -a argon2/* dist_bundle/CPU/
- script:
name: build menu
code: npm run build_terminal_menu
- script:
name: build worker
code: npm run build_terminal
deploy_branch:
steps:
- install-packages:
packages: curl
- script:
name: install node
code: |
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs
- internal/docker-push:
username: $DOCKER_USER
password: $DOCKER_PASSWORD
tag: $WERCKER_GIT_BRANCH
repository: webdollarcoin/node-webdollar
working-dir: /pipeline/source
cmd: npm run commands
env: "GH_COMMIT=$WERCKER_GIT_COMMIT"
deploy_commit:
steps:
- install-packages:
packages: curl
- script:
name: install node
code: |
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs
- internal/docker-push:
username: $DOCKER_USER
password: $DOCKER_PASSWORD
tag: $WERCKER_GIT_COMMIT
repository: webdollarcoin/node-webdollar
working-dir: /pipeline/source
cmd: npm run commands
env: "GH_COMMIT=$WERCKER_GIT_COMMIT"
deploy_branch_genesis:
steps:
- install-packages:
packages: curl unzip
- script:
name: install node
code: |
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs
- script:
name: download and extract genesis
code: |
curl -sL -H 'Cache-Control: no-cache' "https://www.dropbox.com/s/do7wybkmzys7bc4/blockchainDB3.zip?dl=0&v=$WERCKER_GIT_COMMIT" -o blockchainDB3.zip
unzip blockchainDB3.zip
export SUFFIX="_genesis"
- internal/docker-push:
username: $DOCKER_USER
password: $DOCKER_PASSWORD
tag: "$WERCKER_GIT_BRANCH$SUFFIX"
repository: webdollarcoin/node-webdollar
working-dir: /pipeline/source
cmd: npm run commands
env: "GH_COMMIT=$WERCKER_GIT_COMMIT"
deploy_commit_genesis:
steps:
- install-packages:
packages: curl unzip
- script:
name: install node
code: |
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs
- script:
name: download and extract genesis
code: |
curl -sL -H 'Cache-Control: no-cache' "https://www.dropbox.com/s/do7wybkmzys7bc4/blockchainDB3.zip?dl=0&v=$WERCKER_GIT_COMMIT" -o blockchainDB3.zip
unzip blockchainDB3.zip
export SUFFIX="_genesis"
- internal/docker-push:
username: $DOCKER_USER
password: $DOCKER_PASSWORD
tag: "$WERCKER_GIT_COMMIT$SUFFIX"
repository: webdollarcoin/node-webdollar
working-dir: /pipeline/source
cmd: npm run commands
env: "GH_COMMIT=$WERCKER_GIT_COMMIT"
deploy_documentation:
steps:
- install-packages:
packages: curl openssh-client sshpass
- script:
name: install node
code: |
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs
- script:
name: install esdoc
code: npm install esdoc esdoc-standard-plugin
- script:
name: create configuration
code: |
echo '{
"source": "./src",
"destination": "./out",
"plugins": [{"name": "esdoc-standard-plugin"}]
}' > .esdoc.json
- script:
name: build documentation
code: ./node_modules/.bin/esdoc
- script:
name: upload documentation
code: sshpass -p $SCP_PASSWORD scp -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r out [email protected]:/var/www/html/docs
deploy_commit_binary:
steps:
- install-packages:
packages: curl zip openssh-client sshpass
- script:
name: install node
code: |
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs
- script:
name: install pkg
code: npm install -g pkg
- script:
name: run pkg
code: pkg dist_bundle/terminal-menu-bundle.js --options max_old_space_size=6144
- script:
name: package mac
code: |
export DIR="webdollar-mac-$WERCKER_GIT_COMMIT"
mkdir $DIR
mv terminal-menu-bundle-macos $DIR
curl -sL http://data.hoste.ro/node_binaries/mac/argon2.node -o $DIR/argon2.node
curl -sL http://data.hoste.ro/node_binaries/mac/leveldown.node -o $DIR/leveldown.node
zip -r "$DIR.zip" $DIR
- script:
name: package linux
code: |
export DIR="webdollar-linux-$WERCKER_GIT_COMMIT"
mkdir $DIR
mv terminal-menu-bundle-linux $DIR
curl -sL http://data.hoste.ro/node_binaries/linux/argon2.node -o $DIR/argon2.node
curl -sL http://data.hoste.ro/node_binaries/linux/leveldown.node -o $DIR/leveldown.node
zip -r "$DIR.zip" $DIR
- script:
name: package windows
code: |
export DIR="webdollar-windows-$WERCKER_GIT_COMMIT"
mkdir $DIR
mv terminal-menu-bundle-win.exe $DIR
curl -sL http://data.hoste.ro/node_binaries/windows/argon2.node -o $DIR/argon2.node
curl -sL http://data.hoste.ro/node_binaries/windows/leveldown.node -o $DIR/leveldown.node
zip -r "$DIR.zip" $DIR
- script:
name: upload archives
code: |
sshpass -p $SCP_PASSWORD scp -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "webdollar-mac-$WERCKER_GIT_COMMIT.zip" [email protected]:/var/www/html/builds
sshpass -p $SCP_PASSWORD scp -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "webdollar-linux-$WERCKER_GIT_COMMIT.zip" [email protected]:/var/www/html/builds
sshpass -p $SCP_PASSWORD scp -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "webdollar-windows-$WERCKER_GIT_COMMIT.zip" [email protected]:/var/www/html/builds