-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
41 lines (40 loc) · 1.64 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
pipeline {
agent { label 'ctw' }
stages {
stage('prepare') {
steps{
checkout([$class: 'GitSCM', branches: [[name: '*/develop']],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'SubmoduleOption',
disableSubmodules: false,
parentCredentials: false,
recursiveSubmodules: true,
reference: '',
trackingSubmodules: false]],
submoduleCfg: [],
userRemoteConfigs: [[url: 'https://github.com/CERN/CTW']]])
sh 'killall -q minetest || true'
sh 'rm -rf /tmp/CERN_v1*'
}
}
stage('convert world') {
steps{
sh '''
wpscript build/worldpainter/export-world.js mods/world/resources/CERN_v1.world /tmp;
cd build/mcimport && python36 ./mcimport.py /tmp/CERN_v1 /tmp/CERN_v1.mt > /tmp/conversion.log;
cd - ;
cp -r /tmp/CERN_v1.mt ~/.minetest/worlds/cern/resources_v1
cp build/minetest/auth-allprivs.txt ~/.minetest/worlds/cern/resources_v1/auth.txt
'''
}
}
}
post {
success {
sh '''
JENKINS_NODE_COOKIE=dontKillMe nohup minetest --server --port 30001 --worldname CERN_v1 > /tmp/CERN_v1.stdout 2>&1 &
JENKINS_NODE_COOKIE=dontKillMe nohup minetest --server --port 30002 --worldname CERN_v1.creative > /tmp/CERN_v1.creative.stdout 2>&1 &
'''
}
}
}