-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
33 lines (27 loc) · 1.14 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
@Library('global-jenkins-library@2.7.4') _
String repositoryName = 'iexec-sms'
buildInfo = buildJavaProject(
shouldPublishJars: true,
shouldPublishDockerImages: true)
// add parameters for non-PR builds when branch is not develop or production branch
boolean addParameters = !buildInfo.isPullRequestBuild && !buildInfo.isDevelopBranch && !buildInfo.isProductionBranch
// Override properties defined in getBuildInfo and add parameters
if (addParameters) {
properties([
buildDiscarder(logRotator(numToKeepStr: '10')),
parameters([booleanParam(description: 'Build TEE images', name: 'BUILD_TEE')])
])
}
// BUILD_TEE parameter only exists if addParameters is true
// If BUILD_TEE is false, TEE builds won't be executed and we return here
if (addParameters && !params.BUILD_TEE) {
return
}
sconeBuildUnlocked(
nativeImage: "docker-regis.iex.ec/$repositoryName:$buildInfo.imageTag",
imageName: repositoryName,
imageTag: buildInfo.imageTag,
sconifyArgsPath: './docker/sconify.args',
sconifyImage: 'scone-debug/iexec-sconify-image-unlocked',
sconifyVersion: '5.8.8'
)