-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathJenkinsfile
54 lines (48 loc) · 1.64 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
50
51
52
53
54
//configuration
properties([[$class: 'jenkins.model.BuildDiscarderProperty', strategy:
[$class: 'LogRotator', numToKeepStr: '100', artifactNumToKeepStr: '20']
]])
node {echo "current branch: ${env.BRANCH_NAME}"}
pipeline {
environment {
JAVA_HOME = "${env.JAVA11_HOME}"
ANT_HOME = "${env.ANT_HOME}"
SYSTEM_TESTS_HOME = "test"
GIT_BRANCH = "${env.BRANCH_NAME}"
}
agent any
stages {
stage('Setup') {
steps {
sh "git submodule init"
sh "git submodule update --recursive --remote --merge"
sh "${env.ANT_HOME} print-version"
sh "${env.ANT_HOME} clean pack"
timeout(60) {sh "${env.ANT_HOME}"}
}
}
stage('Archive build output') {
when {expression { GIT_BRANCH == 'master' || GIT_BRANCH == 'dev' || GIT_BRANCH == 'aion_ui_Jenkins' }}
steps {archiveArtifacts artifacts: 'pack/aion_ui*.zip'}
}
/*
stage('Test') {
steps {timeout(60){sh "${env.ANT_HOME} ci_build"}}
post {always {junit "report/*"}}
}
*/
}
post {
always {cleanWs()}
success {
slackSend channel: '#ci',
color: 'good',
message: "The pipeline ${currentBuild.fullDisplayName} completed successfully. Grab the generated builds at ${env.BUILD_URL}"
}
failure {
slackSend channel: '#ci',
color: 'danger',
message: "The pipeline ${currentBuild.fullDisplayName} failed at ${env.BUILD_URL}"
}
}
}