-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
37 lines (34 loc) · 1.01 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
@Library('forge-shared-library')_
pipeline {
agent {
label 'docker'
}
stages {
stage('Setup') {
steps {
script {
env.MYVERSION = sh(returnStdout: true, script: './gradlew properties -q | grep "^version:" | awk "{print \$2}"').trim()
}
}
}
stage("Build Mod")
{
agent {
docker { image 'gradle:jdk16-hotspot' }
}
steps {
writeChangelog(currentBuild, 'build/changelog.txt')
println sh(returnStdout: true, script: 'cat build/changelog.txt').trim()
withCredentials([string(credentialsId: 'CURSEFORGE_API_UPLOAD', variable: 'TOKEN')])
{
withEnv([
"CURSEFORGE_API_UPLOAD=${TOKEN}"
])
{
sh './gradlew curseforge'
}
}
}
}
}
}