This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathJenkinsfile
53 lines (49 loc) · 1.54 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
@Library('jenkins-library')
String agentLabel = 'docker-build-agent'
String registry = 'docker.soramitsu.co.jp'
String dockerBuildToolsUserId = 'bot-build-tools-ro'
String contractsPath = '.'
String contractsEnvFile = 'slither-env'
String solcVersion = '0.8.14'
String nodeVersion = '14.16.1'
String mythrilTimeoutSecs = 100
String mythrilExcludeFiles = 'mocks,interfaces,artifacts,node_modules'
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '20'))
timestamps()
disableConcurrentBuilds()
}
agent {
label agentLabel
}
triggers {
cron("@weekly")
}
stages {
stage('Mythril Solidity Security Scan') {
when{
not { triggeredBy 'TimerTrigger' }
}
steps {
script {
docker.withRegistry('https://' + registry, dockerBuildToolsUserId) {
mythril(contractsPath, nodeVersion, mythrilTimeoutSecs, mythrilExcludeFiles)
}
}
}
}
stage('Slither Solidity Security Scan') {
when{
not {triggeredBy 'TimerTrigger'}
}
steps {
script {
docker.withRegistry('https://' + registry, dockerBuildToolsUserId) {
slither(contractsPath, contractsEnvFile, solcVersion, nodeVersion)
}
}
}
}
}
}