-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile.unix
More file actions
executable file
·40 lines (38 loc) · 1.09 KB
/
Jenkinsfile.unix
File metadata and controls
executable file
·40 lines (38 loc) · 1.09 KB
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
pipeline {
agent any
environment {
// currentDir can be set to specific dir for non github testing
currentDir = "."
fbrType = "local"
reportDir = "report"
// set ANT_HOME and overwrite any system set ANT_HOME var
ANT_HOME="${env.SAG_HOME}/common/AssetBuildEnvironment/ant"
cmd = "${ANT_HOME}/bin/ant -f ${currentDir}/build.xml -DSAGHome=${env.SAG_HOME} -DSAG_CI_HOME=${env.SAG_CI_HOME} -Dbda.projectName=${env.JOB_NAME} -Dconfig.build.fbr.type=${fbrType}"
}
stages {
stage('Build'){
steps {
echo "Build stage"
sh "${cmd} staticCodeAnalysis -Dbda.targetEnv=BUILD"
// empty results are allowed because isccr may be disabled
junit allowEmptyResults: true, testResults: "${reportDir}/TEST-*.xml"
sh "${cmd} build -Dbda.targetEnv=BUILD"
}
}
stage('DeployToTest') {
steps {
echo "Deploy stage"
sh "${cmd} deploy -Dbda.targetEnv=TEST"
echo "Executing tests"
sh "${cmd} test -Dbda.targetEnv=TEST"
junit "${reportDir}/TEST-*.xml"
}
}
stage('QA') {
steps {
echo "QA stage"
sh "${cmd} deploy -Dbda.targetEnv=QA"
}
}
}
}