forked from vegaprotocol/vegacapsule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
74 lines (69 loc) · 2.86 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
/* groovylint-disable DuplicateStringLiteral, LineLength, NestedBlockDepth */
@Library('vega-shared-library') _
def commitHash = 'UNKNOWN'
pipeline {
agent any
options {
skipDefaultCheckout true
timestamps()
timeout(time: 45, unit: 'MINUTES')
}
parameters {
string( name: 'VEGA_BRANCH', defaultValue: '',
description: '''Git branch, tag or hash of the vegaprotocol/vega repository.
e.g. "develop", "v0.44.0" or commit hash. Default empty: use latests published version.''')
string( name: 'SYSTEM_TESTS_BRANCH', defaultValue: 'develop',
description: 'Git branch, tag or hash of the vegaprotocol/system-tests repository')
string( name: 'VEGATOOLS_BRANCH', defaultValue: 'develop',
description: 'Git branch, tag or hash of the vegaprotocol/vegatools repository')
string( name: 'DEVOPS_INFRA_BRANCH', defaultValue: 'master',
description: 'Git branch, tag or hash of the vegaprotocol/devops-infra repository')
string( name: 'DEVOPSSCRIPTS_BRANCH', defaultValue: 'main',
description: 'Git branch, tag or hash of the vegaprotocol/devopsscripts repository')
string(name: 'JENKINS_SHARED_LIB_BRANCH', defaultValue: 'main',
description: 'Git branch name of the vegaprotocol/jenkins-shared-library repository')
}
stages {
stage('Config') {
steps {
cleanWs()
sh 'printenv'
echo "params=${params}"
echo "isPRBuild=${isPRBuild()}"
script {
params = pr.injectPRParams()
}
echo "params (after injection)=${params}"
}
}
stage('Git clone') {
options { retry(3) }
steps {
checkout scm
script {
commitHash = getCommitHash()
}
echo "commitHash=${commitHash}"
}
}
stage('Tests') {
parallel {
stage('System Tests') {
steps {
script {
systemTestsCapsule ignoreFailure: !isPRBuild(),
timeout: 30,
vegacapsule: commitHash,
vegaVersion: params.VEGA_BRANCH,
systemTests: params.SYSTEM_TESTS_BRANCH,
vegatools: params.VEGATOOLS_BRANCH,
devopsInfra: params.DEVOPS_INFRA_BRANCH,
devopsScripts: params.DEVOPSSCRIPTS_BRANCH,
jenkinsSharedLib: params.JENKINS_SHARED_LIB_BRANCH
}
}
}
}
}
}
}