-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathJenkinsfile
More file actions
93 lines (85 loc) · 2.19 KB
/
Jenkinsfile
File metadata and controls
93 lines (85 loc) · 2.19 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
pipeline
{
options {
// Only keep 15 latest build artifacts, build logs for 60 days
// TODO: Will we want Jenkins to keep some builds longer?
buildDiscarder(logRotator(daysToKeepStr: '60', artifactNumToKeepStr: '15'))
}
// Use one agent for everything. When we have Windows builds, this will have to change
agent
{
docker
{
image 'adamrehn/ue4-full:4.22.3'
// TODO: persist in volume? Does Jenkins use a bind mount?
}
}
stages
{
// TODO - add Windows agents/builds
stage('Build-Editor')
{
steps
{
// The UnrealEditorTool refuses to run as root, even in a docker container.
sh 'chmod 777 .'
sh 'su ue4 Build/ContinuousIntegration/build_project.sh'
echo "The pull request builds"
}
}
stage('Package-Project')
{
steps
{
dir('holodeck-worlds') {
checkout ([
userRemoteConfigs: [[
url: 'https://github.com/BYU-PCCL/holodeck-worlds',
credentialsId: 'github'
]],
$class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [[$class: 'GitLFSPull'],
[$class: 'CloneOption',
depth: 0,
noTags: false,
shallow: true,
timeout: 120]
]
])
}
dir('holodeck-configs') {
checkout ([
userRemoteConfigs: [[
url: 'https://github.com/BYU-PCCL/holodeck-configs',
credentialsId: 'github'
]],
$class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [[$class: 'CloneOption',
depth: 0,
noTags: false,
shallow: true,
timeout: 120]
]
])
}
// Need to get permissions to move the holodeck-worlds repo
sh 'chmod 777 -R .'
// Impersonate the user, configure ue4 and build the project
sh 'su ue4 Build/ContinuousIntegration/package_ue4_project.sh'
// Pull down the latest build of holodeck-worlds
echo "The pull request was successfully packaged"
}
post
{
success {
archiveArtifacts artifacts:'*.zip', fingerprint: true
}
cleanup {
cleanWs()
}
}
}
}
}