forked from rarible/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile_e2e
54 lines (47 loc) · 1.35 KB
/
Jenkinsfile_e2e
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
@Library('shared-library') _
def COLOR_MAP = [
'SUCCESS': 'good',
'FAILURE': 'danger',
]
pipeline {
agent any
options {
disableConcurrentBuilds()
ansiColor('xterm')
}
parameters {
choice(name: 'TEST_ENV', choices: ['development'], description: 'Environment')
choice(name: 'BLOCKCHAIN', choices: ['ethereum', 'tezos', 'flow', 'solana', 'all'], description: 'Blockchain')
}
triggers {
parameterizedCron('''
0 7 * * 1-5 %TEST_ENV=development;BLOCKCHAIN=ethereum
30 7 * * 1-5 %TEST_ENV=development;BLOCKCHAIN=tezos
0 8 * * 1-5 %TEST_ENV=development;BLOCKCHAIN=solana
30 8 * * 1-5 %TEST_ENV=development;BLOCKCHAIN=flow
''')
}
stages {
stage("Run e2e tests") {
steps {
withCredentials([string(credentialsId: 'npm-token', variable: 'NPM_TOKEN')]) {
sh 'yarn'
sh 'yarn bootstrap'
sh 'yarn clean'
sh 'yarn build-all'
sh 'yarn e2e-tests'
}
}
}
}
post {
always {
wrap([$class: 'BuildUser']) {
slackSend channel: '#automation-protocol',
color: COLOR_MAP[currentBuild.currentResult],
message: "*${currentBuild.currentResult}:* Test run for blockchain=*${params.BLOCKCHAIN}*. Duration=${currentBuild.durationString}\n More info: ${env.BUILD_URL}"
}
cleanWs()
}
}
}