-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
34 lines (27 loc) · 1.11 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
@Library('[email protected]') _
String repositoryName = 'tee-worker-post-compute'
buildInfo = getBuildInfo()
buildInfo = buildJavaProject(
shouldPublishJars: false,
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',
sconifyVersion: '5.7.6'
)