forked from michaeltout/VerusConnect
-
Notifications
You must be signed in to change notification settings - Fork 38
/
.gitlab-ci.yml
287 lines (285 loc) · 15.2 KB
/
.gitlab-ci.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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
stages:
- build
- test
- deploy
########################################################################################################################
####START#### PROJECT LEVEL VARIABLES ####START####
########################################################################################################################
variables:
DOCKER_DRIVER: overlay2
DEFAULT_VERUSCOIN_BRANCH: release
VERUS_VERSION: 1.2.6
VERUSCOIN_VERSION: 1.2.6
KOMODO_VERSION: 0.9.0
KOMODO_DOWNLOAD_URL: https://github.com/KomodoPlatform/komodo/releases/download
PIRATE_VERSION: 5.9.0
PIRATE_DOWNLOAD_URL: https://github.com/PirateNetwork/pirate/releases/download
BINARY_SOURCE: VerusCoin
VERUS_APPIMAGE_X64: Verus-Desktop-v${VERUS_VERSION}-x86_64.AppImage
VERUS_APPIMAGE_ARM64: Verus-Desktop-v${VERUS_VERSION}-arm64.AppImage
VERUS_WINDOWS_ZIP: Verus-Desktop-Windows-v${VERUS_VERSION}.zip
VERUS_WINDOWS_NSIS: Verus-Desktop-v${VERUS_VERSION}.exe
VERUS_MACOS: Verus-Desktop-v${VERUS_VERSION}.dmg
GIT_SUBMODULE_STRATEGY: recursive
POST_COMMENT: "Pipeline Trigger: ${CI_PIPELINE_SOURCE}\n
Branch: ${CI_COMMIT_REF_NAME}\n
Commit: https://github.com/VerusCoin/Verus-Desktop/commit/${CI_COMMIT_SHA}\n
${CI_COMMIT_MESSAGE}\n"
########################################################################################################################
####END#### PROJECT LEVEL VARIABLES ####END####
########################################################################################################################
########################################################################################################################
########################################################################################################################
####START#### Build Stage ####START#####
########################################################################################################################
########################################################################################################################
####START#### LINUX ####START####
########################################################################################################################
build:linux:
tags: [ "Verus Desktop" ]
image: asherd/agama-builder
stage: build
variables:
DOCKER_DRIVER: overlay2
KOMODO_CLI_PACKAGE: komodo-${KOMODO_VERSION}-linux.tar.gz
KOMODO_CLI_SHA256: ed28bce09176c212c1eac9abf9fce41c948ef1199764b03b607a461146952107
PIRATE_CLI_PACKAGE: pirate-cli-ubuntu2004-v${PIRATE_VERSION}.zip
PIRATE_CLI_SHA256: 2358e992a6649517f6a72f790105468a22c5ae22302076b06f9c528b7c7c4788
before_script:
- echo "$AUTH_KEY" > AUTH_KEY.json &&
gcloud auth activate-service-account
--key-file AUTH_KEY.json &&
rm AUTH_KEY.json
- if [ -z "${UPSTREAM_CLI_BRANCH}" ]; then export
VERUS_CLI_LINUX="${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH}/Linux/Verus-CLI-Linux-v${VERUSCOIN_VERSION}-x86_64.tar.gz"
POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries.";
else
export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi
- cd gui/Verus-Desktop-GUI/react
- yarn install
- yarn run build
- cd ../../..
- mkdir -p assets/bin/linux64/verusd
- gsutil cp $STAGING/$VERUS_CLI_LINUX .
- tar -xzvf Verus-CLI-Linux-v${VERUSCOIN_VERSION}-x86_64.tar.gz --strip=1 --directory assets/bin/linux64/verusd
- rm Verus-CLI-Linux-v${VERUSCOIN_VERSION}-x86_64.tar.gz
- mkdir -p assets/bin/linux64/komodod
- mkdir -p assets/bin/linux64/pirated
- wget ${KOMODO_DOWNLOAD_URL}/v${KOMODO_VERSION}/${KOMODO_CLI_PACKAGE}
- echo "${KOMODO_CLI_SHA256} ${KOMODO_CLI_PACKAGE}" | sha256sum -c - || { echo "SHA-256 checksum does not match. Exiting."; exit 1; }
- tar -xzvf ${KOMODO_CLI_PACKAGE} --directory assets/bin/linux64/komodod
- rm ${KOMODO_CLI_PACKAGE}
- wget ${PIRATE_DOWNLOAD_URL}/v${PIRATE_VERSION}/${PIRATE_CLI_PACKAGE}
- echo "${PIRATE_CLI_SHA256} ${PIRATE_CLI_PACKAGE}" | sha256sum -c - || { echo "SHA-256 checksum does not match. Exiting."; exit 1; }
- unzip ${PIRATE_CLI_PACKAGE} -d assets/bin/linux64/pirated
- rm ${PIRATE_CLI_PACKAGE}
- sed -i "s/process.env.INFURA_PROJECT_ID/'${INFURA_PROJECT_ID}'/g" keys/infura.js
- sed -i "s/process.env.ETHERSCAN_API_KEY/'${ETHERSCAN_KEY}'/g" keys/etherscan.js
- yarn install
- git clone https://github.com/VerusCoin/verus-login-consent-client.git
- cd verus-login-consent-client
- yarn install
- yarn run build
- mkdir -p ../assets/plugins/builtin/verus-login-consent-client
- cp build/* ../assets/plugins/builtin/verus-login-consent-client
- cd ..
- rm -rf verus-login-consent-client
- git clone https://github.com/VerusCoin/verus-pbaas-visualizer.git
- cd verus-pbaas-visualizer
- yarn install
- yarn run build
- mkdir -p ../assets/plugins/builtin/verus-pbaas-visualizer
- cp build/* ../assets/plugins/builtin/verus-pbaas-visualizer
- cd ..
- rm -rf verus-pbaas-visualizer
script:
- yarn run dist
- cd dist
- gsutil cp ${VERUS_APPIMAGE_X64} $STAGING/Verus-Desktop/$CI_COMMIT_REF_NAME/${VERUS_VERSION}/
build:linux:arm64:
tags: [ "Verus Desktop" ]
image: asherd/agama-builder
stage: build
variables:
DOCKER_DRIVER: overlay2
PIRATE_CLI_PACKAGE: pirate-cli-aarch64-v${PIRATE_VERSION}.zip
PIRATE_CLI_SHA256: c6a3b13881155fb11a8743a9d319254a0ca70f99c14382fb28384446fffe52c5
before_script:
- echo "$AUTH_KEY" > AUTH_KEY.json &&
gcloud auth activate-service-account
--key-file AUTH_KEY.json &&
rm AUTH_KEY.json
- if [ -z "${UPSTREAM_CLI_BRANCH}" ]; then export
VERUS_CLI_LINUX="${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH}/Linux/Verus-CLI-Linux-v${VERUSCOIN_VERSION}-arm64.tar.gz"
POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries.";
else
export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi
- cd gui/Verus-Desktop-GUI/react
- yarn install
- yarn run build
- cd ../../..
- mkdir -p assets/bin/linux64/verusd
- mkdir -p assets/bin/linux64/pirated
- gsutil cp $STAGING/$VERUS_CLI_LINUX .
- tar -xzvf Verus-CLI-Linux-v${VERUSCOIN_VERSION}-arm64.tar.gz --strip=1 --directory assets/bin/linux64/verusd
- rm Verus-CLI-Linux-v${VERUSCOIN_VERSION}-arm64.tar.gz
- wget ${PIRATE_DOWNLOAD_URL}/v${PIRATE_VERSION}/${PIRATE_CLI_PACKAGE}
- echo "${PIRATE_CLI_SHA256} ${PIRATE_CLI_PACKAGE}" | sha256sum -c - || { echo "SHA-256 checksum does not match. Exiting."; exit 1; }
- unzip ${PIRATE_CLI_PACKAGE} -d assets/bin/linux64/pirated
- rm ${PIRATE_CLI_PACKAGE}
- sed -i "s/process.env.INFURA_PROJECT_ID/'${INFURA_PROJECT_ID}'/g" keys/infura.js
- sed -i "s/process.env.ETHERSCAN_API_KEY/'${ETHERSCAN_KEY}'/g" keys/etherscan.js
- yarn install
- git clone https://github.com/VerusCoin/verus-login-consent-client.git
- cd verus-login-consent-client
- yarn install
- yarn run build
- mkdir -p ../assets/plugins/builtin/verus-login-consent-client
- cp build/* ../assets/plugins/builtin/verus-login-consent-client
- cd ..
- rm -rf verus-login-consent-client
- git clone https://github.com/VerusCoin/verus-pbaas-visualizer.git
- cd verus-pbaas-visualizer
- yarn install
- yarn run build
- mkdir -p ../assets/plugins/builtin/verus-pbaas-visualizer
- cp build/* ../assets/plugins/builtin/verus-pbaas-visualizer
- cd ..
- rm -rf verus-pbaas-visualizer
script:
- yarn run dist --arm64
- cd dist
- gsutil cp ${VERUS_APPIMAGE_ARM64} $STAGING/Verus-Desktop/$CI_COMMIT_REF_NAME/${VERUS_VERSION}/
########################################################################################################################
####END#### LINUX ####END####
########################################################################################################################
####START#### WINDOWS ####START####
########################################################################################################################
build:windows:
tags: [ "Verus Desktop" ]
stage: build
image: asherd/agama-builder:windows
variables:
DOCKER_DRIVER: overlay2
KOMODO_CLI_PACKAGE: komodo-${KOMODO_VERSION}-win.zip
KOMODO_CLI_SHA256: 0b36821ebccdaf6bc060dc31083e6d8f48f7f8bc35e519b127bf1ccc05cf9890
PIRATE_CLI_PACKAGE: pirate-cli-windows-v${PIRATE_VERSION}.zip
PIRATE_CLI_SHA256: deb338bf2bcabfdb32be3c13dfaed78d83749fbae9d3985e47cb001ff058bb3f
before_script:
- echo "$AUTH_KEY" > AUTH_KEY.json &&
gcloud auth activate-service-account
--key-file AUTH_KEY.json &&
rm AUTH_KEY.json
- if [ -z "${UPSTREAM_CLI_BRANCH}" ]; then export
VERUS_CLI_WINDOWS="${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH}/Windows/Verus-CLI-Windows-v${VERUSCOIN_VERSION}.zip"
POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries.";
else
export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi
- cd gui/Verus-Desktop-GUI/react
- yarn install
- yarn run build
- cd ../../..
- mkdir -p assets/bin/win64/komodod
- mkdir -p assets/bin/win64/pirated
- wget ${KOMODO_DOWNLOAD_URL}/v${KOMODO_VERSION}/${KOMODO_CLI_PACKAGE}
- echo "${KOMODO_CLI_SHA256} ${KOMODO_CLI_PACKAGE}" | sha256sum -c - || { echo "SHA-256 checksum does not match. Exiting."; exit 1; }
- unzip -j ${KOMODO_CLI_PACKAGE} komodod.exe -d assets/bin/win64/komodod
- unzip -j ${KOMODO_CLI_PACKAGE} komodo-cli.exe -d assets/bin/win64/komodod
- unzip -j ${KOMODO_CLI_PACKAGE} wallet-utility.exe -d assets/bin/win64/komodod
- rm ${KOMODO_CLI_PACKAGE}
- gsutil cp $STAGING/$VERUS_CLI_WINDOWS .
- unzip -qq Verus-CLI-Windows-v${VERUSCOIN_VERSION}.zip -d assets/bin/win64
- mv assets/bin/win64/verus-cli assets/bin/win64/verusd
- rm Verus-CLI-Windows-v${VERUSCOIN_VERSION}.zip
- wget ${PIRATE_DOWNLOAD_URL}/v${PIRATE_VERSION}/${PIRATE_CLI_PACKAGE}
- echo "${PIRATE_CLI_SHA256} ${PIRATE_CLI_PACKAGE}" | sha256sum -c - || { echo "SHA-256 checksum does not match. Exiting."; exit 1; }
- unzip ${PIRATE_CLI_PACKAGE} -d assets/bin/win64/pirated
- rm ${PIRATE_CLI_PACKAGE}
- sed -i "s/process.env.INFURA_PROJECT_ID/'${INFURA_PROJECT_ID}'/g" keys/infura.js
- sed -i "s/process.env.ETHERSCAN_API_KEY/'${ETHERSCAN_KEY}'/g" keys/etherscan.js
- yarn install
- git clone https://github.com/VerusCoin/verus-login-consent-client.git
- cd verus-login-consent-client
- yarn install
- yarn run build
- mkdir -p ../assets/plugins/builtin/verus-login-consent-client
- cp build/* ../assets/plugins/builtin/verus-login-consent-client
- cd ..
- rm -rf verus-login-consent-client
- git clone https://github.com/VerusCoin/verus-pbaas-visualizer.git
- cd verus-pbaas-visualizer
- yarn install
- yarn run build
- mkdir -p ../assets/plugins/builtin/verus-pbaas-visualizer
- cp build/* ../assets/plugins/builtin/verus-pbaas-visualizer
- cd ..
- rm -rf verus-pbaas-visualizer
script:
- yarn run dist-win
- cd dist
- gsutil cp ${VERUS_WINDOWS_NSIS} $STAGING/Verus-Desktop/$CI_COMMIT_REF_NAME/${VERUS_VERSION}/
########################################################################################################################
####END#### WINDOWS ####END####
########################################################################################################################
####START#### MACOS ####START####
########################################################################################################################
build:mac:
stage: build
tags: ["Ventura"]
variables:
KOMODO_CLI_PACKAGE: komodo-${KOMODO_VERSION}-mac.zip
KOMODO_CLI_SHA256: 1a092af97b34f4e2ea99b95a91599fc4fdca3881c7e3afa468a5df043a460694
PIRATE_CLI_PACKAGE: pirate-cli-MacOS-v${PIRATE_VERSION}.zip
PIRATE_CLI_SHA256: c20a761c36e494cd2b19237162881bb0dcdae24e6eec996072cc5ee7135e8362
before_script:
- echo "$AUTH_KEY" > AUTH_KEY.json &&
gcloud auth activate-service-account
--key-file AUTH_KEY.json &&
rm AUTH_KEY.json
- if [ -z "${UPSTREAM_CLI_BRANCH}" ]; then export
VERUS_CLI_MACOS="${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH}/MacOS/Verus-CLI-MacOS-v${VERUSCOIN_VERSION}.tar.gz";
POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries.";
else
export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi
- cd gui/Verus-Desktop-GUI/react
- yarn install
- yarn run build
- cd ../../..
- gsutil cp $STAGING/$VERUS_CLI_MACOS .
- mkdir -p assets/bin/osx/verusd
- mkdir -p assets/bin/osx/komodod
- mkdir -p assets/bin/osx/pirated
- tar -xzf Verus-CLI-MacOS-v${VERUSCOIN_VERSION}.tar.gz --strip=1 --directory assets/bin/osx/verusd
- rm Verus-CLI-MacOS-v${VERUSCOIN_VERSION}.tar.gz
- wget ${KOMODO_DOWNLOAD_URL}/v${KOMODO_VERSION}/${KOMODO_CLI_PACKAGE}
- echo "${KOMODO_CLI_SHA256} ${KOMODO_CLI_PACKAGE}" | sha256sum -c - || { echo "SHA-256 checksum does not match. Exiting."; exit 1; }
- tar -xzvf ${KOMODO_CLI_PACKAGE} --directory assets/bin/osx/komodod
- rm ${KOMODO_CLI_PACKAGE}
- wget ${PIRATE_DOWNLOAD_URL}/v${PIRATE_VERSION}/${PIRATE_CLI_PACKAGE}
- echo "${PIRATE_CLI_SHA256} ${PIRATE_CLI_PACKAGE}" | sha256sum -c - || { echo "SHA-256 checksum does not match. Exiting."; exit 1; }
- unzip ${PIRATE_CLI_PACKAGE} -d assets/bin/osx/pirated
- rm ${PIRATE_CLI_PACKAGE}
- sed -i -e "s/process.env.INFURA_PROJECT_ID/'${INFURA_PROJECT_ID}'/g" keys/infura.js
- sed -i -e "s/process.env.ETHERSCAN_API_KEY/'${ETHERSCAN_KEY}'/g" keys/etherscan.js
- yarn install
- git clone https://github.com/VerusCoin/verus-login-consent-client.git
- cd verus-login-consent-client
- yarn install
- yarn run build
- mkdir -p ../assets/plugins/builtin/verus-login-consent-client
- cp build/* ../assets/plugins/builtin/verus-login-consent-client
- cd ..
- rm -rf verus-login-consent-client
- git clone https://github.com/VerusCoin/verus-pbaas-visualizer.git
- cd verus-pbaas-visualizer
- yarn install
- yarn run build
- mkdir -p ../assets/plugins/builtin/verus-pbaas-visualizer
- cp build/* ../assets/plugins/builtin/verus-pbaas-visualizer
- cd ..
- rm -rf verus-pbaas-visualizer
script:
- export USE_HARD_LINKS=false
- yarn run dist
- cd dist
- gsutil cp ${VERUS_MACOS} $STAGING/Verus-Desktop/$CI_COMMIT_REF_NAME/${VERUS_VERSION}/