-
Notifications
You must be signed in to change notification settings - Fork 15
/
Jenkinsfile
35 lines (34 loc) · 1.03 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
pipeline {
agent any
environment {
DEPLOY_TOKEN = credentials('mod_deploy_token')
}
stages {
stage('Initialize') {
steps {
sh 'chmod +x ./gradlew'
sh "./gradlew preprocessResources"
}
}
stage('Build') {
steps {
sh "./gradlew publish -PBUILD_ID=${env.BUILD_ID} -Pbranch=${env.BRANCH_NAME} -PIS_CI=true --no-daemon"
sh "./gradlew build -PBUILD_ID=${env.BUILD_ID} -Pbranch=${env.BRANCH_NAME} -PIS_CI=true --no-daemon"
}
}
stage('Report') {
steps {
archiveArtifacts 'versions/1.8.9/build/libs/*.jar'
// archiveArtifacts 'versions/1.8.9-vanilla/build/libs/*.jar'
archiveArtifacts 'versions/1.12.2/build/libs/*.jar'
// archiveArtifacts 'versions/1.12.2-vanilla/build/libs/*.jar'
// archiveArtifacts 'versions/1.15.2/build/libs/*.jar'
}
}
stage('Notify') {
steps {
sh "java -jar deploy.jar ${JENKINS_HOME} ${env.JOB_NAME} ${env.BUILD_ID} ${DEPLOY_TOKEN}"
}
}
}
}