forked from etclabscore/core-geth
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
102 lines (102 loc) · 8.71 KB
/
Jenkinsfile
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
pipeline {
agent any
environment {
GETH_EXPORTS = '/data/ethereum-exports'
GETH_DATADIR = '/data/geth'
GITHUB_NOTIFY_DESCRIPTION = 'Assert import of canonical chain data'
GITHUB_OWNER_NAME = env.GIT_URL.replaceFirst(/^.*\/([^\/]+?)\/.+\.git$/, '$1')
GITHUB_REPO_NAME = env.GIT_URL.replaceFirst(/^.*\/([^\/]+?).git$/, '$1')
}
stages {
stage('Notify Github of Pending Jobs') {
steps {
githubNotify context: 'Kotti Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'PENDING', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}"
githubNotify context: 'Mordor Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'PENDING', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}"
githubNotify context: 'Goerli Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'PENDING', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}"
// githubNotify context: 'Classic Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'PENDING', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}"
// githubNotify context: 'Foundation Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'PENDING', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}"
}
}
stage("Run Regression Tests") {
parallel {
stage('Kotti') {
agent { label "aws-slave-m5-xlarge" }
steps {
sh "make geth && ./build/bin/geth version"
sh "rm -rf ${GETH_DATADIR}-kotti"
sh "shasum -a 256 -c ./tests/regression/shasums/kotti.0-2544960.rlp.gz.sha256"
sh "./build/bin/geth --kotti --cache=2048 --nocompaction --nousb --txlookuplimit=1 --datadir=${GETH_DATADIR}-kotti import ${GETH_EXPORTS}/kotti.0-2544960.rlp.gz"
}
post {
always { sh "rm -rf ${GETH_DATADIR}-kotti" }
success { githubNotify context: 'Kotti Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'SUCCESS', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
unsuccessful { githubNotify context: 'Kotti Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'FAILURE', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
}
}
stage('Mordor') {
agent { label "aws-slave-m5-xlarge" }
steps {
sh "make geth && ./build/bin/geth version"
sh "rm -rf ${GETH_DATADIR}-mordor"
sh "shasum -a 256 -c ./tests/regression/shasums/mordor.0-1686858.rlp.gz.sha256"
sh "./build/bin/geth --mordor --fakepow --cache=2048 --nocompaction --nousb --txlookuplimit=1 --datadir=${GETH_DATADIR}-mordor import ${GETH_EXPORTS}/mordor.0-1686858.rlp.gz"
sh "rm -rf ${GETH_DATADIR}"
}
post {
always { sh "rm -rf ${GETH_DATADIR}-mordor" }
success { githubNotify context: 'Mordor Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'SUCCESS', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
unsuccessful { githubNotify context: 'Mordor Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'FAILURE', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
}
}
stage('Goerli') {
agent { label "aws-slave-m5-xlarge" }
steps {
sh "make geth && ./build/bin/geth version"
sh "rm -rf ${GETH_DATADIR}-goerli"
sh "shasum -a 256 -c ./tests/regression/shasums/goerli.0-2000000.rlp.gz.sha256"
sh "./build/bin/geth --goerli --cache=2048 --nocompaction --nousb --txlookuplimit=1 --datadir=${GETH_DATADIR}-goerli import ${GETH_EXPORTS}/goerli.0-2000000.rlp.gz"
}
post {
always { sh "rm -rf ${GETH_DATADIR}-goerli" }
success { githubNotify context: 'Goerli Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'SUCCESS', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
unsuccessful { githubNotify context: 'Goerli Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'FAILURE', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
}
}
// Commented now because these take a looong time.
// One way of approaching a solution is to break each chain into a "stepladder" of imports, eg. 0-1150000, 1150000-1920000, 1920000-2500000, etc...
// This would allow further parallelization at the cost of duplicated base chaindata stores.
// Since the core focus of testing here is configuration (both user-facing and internal), and one of ugly limitations of our current testnets
// being that they DO NOT reflect the production environment well in this regard (which is a very vulnerable reagard)
// another approach might be to condense the chain fork progressions of ETC and ETH into custom test-only chains, perhaps using retestest or a similar
// tool to make transactions and manage chain upgrades dynamically as a transactions are made.
//
// stage('Classic') {
// agent { label "aws-slave-m5-xlarge" }
// steps {
// sh "make geth && ./build/bin/geth version"
// sh "rm -rf ${GETH_DATADIR}-classic"
// sh "./build/bin/geth --classic --cache=2048 --nocompaction --nousb --txlookuplimit=1 --datadir=${GETH_DATADIR}-classic import ${GETH_EXPORTS}/classic.0-10620587.rlp.gz"
// }
// post {
// always { sh "rm -rf ${GETH_DATADIR}-classic" }
// success { githubNotify context: 'Classic Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'SUCCESS', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
// unsuccessful { githubNotify context: 'Classic Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'FAILURE', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
// }
// }
// stage('Foundation') {
// agent { label "aws-slave-m5-xlarge" }
// steps {
// sh "make geth && ./build/bin/geth version"
// sh "rm -rf ${GETH_DATADIR}-foundation"
// sh "./build/bin/geth --cache=2048 --nocompaction --nousb --txlookuplimit=1 --datadir=${GETH_DATADIR}-foundation import ${GETH_EXPORTS}/ETH.0-10229163.rlp.gz"
// }
// post {
// always { sh "rm -rf ${GETH_DATADIR}-foundation" }
// success { githubNotify context: 'Foundation Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'SUCCESS', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
// unsuccessful { githubNotify context: 'Foundation Regression', description: "${GITHUB_NOTIFY_DESCRIPTION}", status: 'FAILURE', account: "${GITHUB_OWNER_NAME}", repo: "${GITHUB_REPO_NAME}", credentialsId: 'meowsbits-github-jenkins', sha: "${GIT_COMMIT}" }
// }
// }
}
}
}
}