This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
71 lines (69 loc) · 2.71 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
pipeline {
agent any
tools {
jdk 'jdk-8'
gradle 'gradle-7.4.2'
}
stages {
stage("Clean") {
steps {
sh "chmod +x ./gradlew";
sh "./gradlew clean";
}
}
stage("Build autoupdater"){
steps {
sh "./gradlew :auto-updater:build";
sh "rm -rf build/"
sh "mkdir build/"
sh "cp test/node-1/start_auto_updater.bat build/"
sh "cp test/node-1/start_auto_updater.sh build/"
sh "cp auto-updater/build/libs/redicloud-auto-updater.jar build/"
sh "cd build; zip redi-cloud-updater.zip *"
}
post {
success {
archiveArtifacts artifacts: 'build/redi-cloud-updater.zip', fingerprint: true
}
}
}
stage("Build") {
steps {
sh "./gradlew projectBuild --stacktrace --parallel --daemon --profile";
}
}
stage("Create zip") {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "rm -rf build/"
sh "mkdir build/"
sh "cp -r test/node-1/storage/ build/storage/"
sh "cp node/node-base/build/libs/redicloud-node-base.jar build/"
sh "cp node/node-runner/build/libs/redicloud-runner.jar build/"
sh "cp plugins/plugin-minecraft/build/libs/redicloud-plugin-minecraft.jar build/storage/"
sh "cp plugins/plugin-bungeecord/build/libs/redicloud-plugin-bungeecord.jar build/storage/"
sh "cp plugins/plugin-velocity/build/libs/redicloud-plugin-velocity.jar build/storage/"
sh "cd build/storage/; mkdir versions"
sh "cp limbo-server/build/libs/redicloud-limbo-server.jar build/storage/versions/limbo.jar"
sh "cp test/node-1/start.sh build/"
sh "cp test/node-1/start.bat build/"
sh "cp test/node-1/start_debug.sh build/"
sh "cp test/node-1/start_debug.bat build/"
sh "cd build; zip -r redi-cloud.zip *"
}
}
post {
success {
archiveArtifacts artifacts: 'build/redi-cloud.zip', fingerprint: true
}
}
}
stage("Repo publishing") {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "./gradlew publishToRepository --stacktrace -DskipStaging=true";
}
}
}
}
}