-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
49 lines (49 loc) · 1.19 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
43
44
45
46
47
48
49
pipeline {
agent any
stages {
stage('Checkout') {
steps {
echo "Running build #${env.BUILD_ID} on ${env.JENKINS_URL}"
checkout scm
}
}
stage('Build') {
steps {
sh 'rm -rf build/libs/'
sh 'rm -rf build/repo/'
sh 'chmod +x gradlew'
sh './gradlew build uploadArchives --no-daemon'
}
}
stage('Archive') {
when {
allOf {
expression {
currentBuild.result == null || currentBuild.result == 'SUCCESS'
}
}
}
steps {
archiveArtifacts 'build/libs/*'
}
}
stage('Deploy To Maven') {
when {
allOf {
branch '1.12.2'
expression {
currentBuild.result == null || currentBuild.result == 'SUCCESS'
}
}
}
steps {
sh 'aws s3 cp build/repo/ s3://hrznstudio.com/maven/ --recursive --acl public-read'
}
}
}
post {
always {
discordSend(description: 'Horizon CI Build', footer: '', link: env.BUILD_URL, result: currentBuild.currentResult, unstable: false, title: JOB_NAME, webhookURL: env.webhookURL)
}
}
}