forked from katalon-studio/katalon-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
32 lines (31 loc) · 786 Bytes
/
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
pipeline {
agent {
docker {
image 'gradle'
args '-v $PWD:/home/gradle/project -w /home/gradle/project'
}
}
stages {
stage ("Build") {
when {
not {
branch 'master'
}
}
steps {
sh 'gradle clean build'
}
}
stage ("Build and publish") {
when {
branch 'master'
}
environment {
GRADLE_PUBLISH = credentials('gradle-publish')
}
steps {
sh 'gradle clean build publishPlugins -Pgradle.publish.key=$GRADLE_PUBLISH_USR -Pgradle.publish.secret=$GRADLE_PUBLISH_PSW'
}
}
}
}