-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
46 lines (40 loc) · 1.3 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
pipeline {
agent {
label 'hemtt'
}
stages {
stage('Keys') {
steps {
withCredentials([
file(credentialsId: 'FFP_JSRS_PRIVATE_KEY', variable: 'FFP_JSRS_PRIVATE_KEY'),
file(credentialsId: 'FFP_JSRS_PUBLIC_KEY', variable: 'FFP_JSRS_PUBLIC_KEY')
]) {
bat 'mkdir releases\\keys'
bat 'copy %FFP_JSRS_PRIVATE_KEY% releases\\keys'
bat 'copy %FFP_JSRS_PUBLIC_KEY% releases\\keys'
}
}
}
stage('Build') {
steps {
bat 'hemtt build --release'
}
}
stage('Archive Build') {
steps {
archiveArtifacts artifacts: 'releases/1.0.0/**/*'
}
}
stage('Publish to Steam Workshop') {
when {
branch 'master'
}
steps {
publishSteamWorkshop '1220451406', 'releases/1.0.0/@ffp_jsrs', env.GIT_COMMIT
}
}
}
}
void publishSteamWorkshop(String id, String mod, String changeNote) {
bat "\"C:\\Program Files (x86)\\Steam\\SteamApps\\common\\Arma 3 Tools\\Publisher\\PublisherCmd.exe\" update /changeNote:$changeNote /id:$id /path:$mod"
}