-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
39 lines (38 loc) · 1.32 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
@Library('ci-skip') _
pipeline {
agent any
stages {
stage('prepare') { steps { ciSkip 'check' } }
stage('setup-workspace') {
steps {
sh './gradlew setupCiWorkspace'
}
}
stage('build') {
steps {
sh './gradlew clean build'
}
}
stage('deploy-develop') {
when { branch '*-develop' }
environment {
PEARX_REPO = credentials('pearx-repo-user')
}
steps {
sh "./gradlew publishDevelop -PpearxRepoUsername=${PEARX_REPO_USR} -PpearxRepoPassword=${PEARX_REPO_PSW} -PdevBuildNumber=${BUILD_NUMBER}"
}
}
stage('deploy-release') {
when { branch '*-master' }
environment {
PEARX_REPO = credentials('pearx-repo-user')
CURSEFORGE_API_KEY = credentials('curseforge-api-key')
GITHUB_ACCESS_TOKEN = credentials('github-release-token')
}
steps {
sh "./gradlew publishRelease -PpearxRepoUsername=${PEARX_REPO_USR} -PpearxRepoPassword=${PEARX_REPO_PSW} -PcurseforgeApiKey=${CURSEFORGE_API_KEY} -PgithubAccessToken=${GITHUB_ACCESS_TOKEN}"
}
}
}
post { always { ciSkip 'postProcess' } }
}