forked from Time6628/NuVotifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
42 lines (37 loc) · 1.15 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
pipeline {
agent {
docker { image 'cogniteev/oracle-java' }
}
environment {
SNAPSHOT_REPO = credentials('ibj-nexus-snapshot-repo')
RELEASE_REPO = credentials('ibj-nexus-release-repo')
RAW_UPLOAD_PATH = credentials('ibj-nexus-raw-path')
}
withCredentials([[$class: 'UsernamePasswordMultiBinding',
credentialsId: 'jenkins-ibj-io',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
REPO_USERNAME = credentials('ibj-nexus-repo-username')
REPO_PASSWORD = credentials('ibj-nexus-repo-password')
}
stages {
stage('Build') {
steps {
sh './gradlew build --no-daemon'
}
}
stage('Test') {
steps {
sh './gradlew test --no-daemon'
}
}
stage('Publish') {
when {
branch "master"
}
steps {
sh './gradlew publishversionedPublicationToIbjBlockRepository'
sh './gradlew publishLatestToIbjBlockRaw'
}
}
}
}