forked from SuperblocksHQ/truffle-reference-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
superblocks.yaml
79 lines (71 loc) · 2.33 KB
/
superblocks.yaml
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
version: 1
# Jobs are the fundamental elements. They are required to have unique names (with no spaces)
jobs:
build:
image: node:12
script:
- npm install
- npx truffle compile
test:
image: node:12
script:
- npm install
- npx truffle test
# This job uses the SuperHDWalletProvider to sign the transactions directly in the runner using a mnemonic 12 and still
# allow you to keep track of all the details of the deployment inside the platform.
deploy_to_rinkeby_automatic:
image: node:12
# Here we are flagging to the system that this is an Ethereum deployment job. In this way, Superblocks will automatically link the job with
# the deployment associated with it
type:
name: ethereum/deploy
script:
- npm install
- npx truffle migrate --network rinkeby --reset
- npx superblocks-cli collect-artifacts
# This job uses the ManualSignProvider to be able to securely and manually sign each transactions a given deployment is creating without ever
# needing to share your private key with us.
deploy_to_rinkeby_manually:
image: node:12
type:
name: ethereum/deploy
script:
- npm install
- npx truffle migrate --network rinkeby_metamask --reset
- npx superblocks-cli collect-artifacts
deploy_to_mainnet:
image: node:12
type:
name: ethereum/deploy
script:
- npm install
- npx truffle migrate --network mainnet --reset
- npx superblocks-cli collect-artifacts
# Stages help you define how exactly do you want your jobs to be executed. The ordering of elements
# in stages defines the ordering of jobs' execution
#
# 1. Jobs in of the same stage are run in parallel
# 2. Jobs on the next stage are run after the jobs from the previous stage complete successfully
stages:
- build_and_test:
jobs:
- build
- test
- deploy_to_testnets:
jobs:
- deploy_to_rinkeby_automatic:
filters:
only:
- master
- deploy_to_rinkeby_manually:
when: manual
filters:
only:
- master
- deploy_to_mainnet:
jobs:
- deploy_to_mainnet:
when: manual
filters:
only:
- master