-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
39 lines (38 loc) · 1.56 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
node ('build') {
stage 'Config'
checkout([$class: 'RepoScm', currentBranch: true, manifestRepositoryUrl: 'https://gerrit.opencord.org/manifest', quiet: true])
stage('Build') {
sh '$TARGET_MACHINE_SSH_COMMAND "\
cd ~/service-profile/frontend; \
make rm; \
make local_containers; \
make" '
}
stage('Test') {
sh '$TARGET_MACHINE_SSH_COMMAND "\
cd ~/cord-tester/src/test/cord-api/Properties/; \
cp RestApiProperties.py RestApiProperties.py.copy; \
sed -i $SET_SERVER_IP_COMMAND RestApiProperties.py; \
sed -i $SET_SERVER_PORT_COMMAND RestApiProperties.py; \
cd ~/cord-tester/src/test/cord-api/Tests/; \
rm -r ../Log; \
pybot -d ../Log -T ServiceTest.txt; \
pybot -d ../Log -T Users.txt; \
pybot -d ../Log -T UtilsSynchronizer.txt; \
cd ~/cord-tester/src/test/cord-api/Properties/; \
mv RestApiProperties.py.copy RestApiProperties.py; \" '
}
stage('Publish') {
sh 'rm -r RobotLogs; mkdir RobotLogs'
sh 'sshpass -p $TARGET_MACHINE_PASSWORD scp -r $TARGET_MACHINE_USERNAME@$TARGET_MACHINE_IP:~/cord-tester/src/test/cord-api/Log/* ./RobotLogs'
step([$class: 'RobotPublisher',
disableArchiveOutput: false,
logFileName: 'RobotLogs/log*.html',
otherFiles: '',
outputFileName: 'RobotLogs/output*.xml',
outputPath: '.',
passThreshold: 100,
reportFileName: 'RobotLogs/report*.html',
unstableThreshold: 0]);
}
}