blob: 9ed046210c4fd75b73e216395a4bafabcb306286 [file] [log] [blame]
Suchitra.Vemuri89c48a72016-12-21 12:46:36 -08001node ('build') {
2 stage('Config') {
3 sh '$TARGET_MACHINE_SSH_COMMAND "\
4 cd ~/service-profile; \
5 echo $GERRIT_BRANCH; \
6 git checkout $GERRIT_BRANCH" '
7 }
8 stage('Build') {
9 sh '$TARGET_MACHINE_SSH_COMMAND "\
10 cd ~/service-profile/frontend; \
11 make rm; \
12 make local_containers; \
13 make" '
14 }
15 stage('Test') {
16 sh '$TARGET_MACHINE_SSH_COMMAND "\
17 cd ~/cord-tester/src/test/cord-api/Properties/; \
18 cp RestApiProperties.py RestApiProperties.py.copy; \
19 sed -i $SET_SERVER_IP_COMMAND RestApiProperties.py; \
20 sed -i $SET_SERVER_PORT_COMMAND RestApiProperties.py; \
21 cd ~/cord-tester/src/test/cord-api/Tests/; \
22 rm -r ../Log; \
23 pybot -d ../Log -T ServiceTest.txt; \
24 pybot -d ../Log -T Users.txt; \
25 pybot -d ../Log -T UtilsSynchronizer.txt; \
26 cd ~/cord-tester/src/test/cord-api/Properties/; \
27 mv RestApiProperties.py.copy RestApiProperties.py; \" '
28 }
29 stage('Publish') {
30 sh 'rm -r RobotLogs; mkdir RobotLogs'
31 sh 'sshpass -p $TARGET_MACHINE_PASSWORD scp -r $TARGET_MACHINE_USERNAME@$TARGET_MACHINE_IP:~/cord-tester/src/test/cord-api/Log/* ./RobotLogs'
32 step([$class: 'RobotPublisher',
33 disableArchiveOutput: false,
34 logFileName: 'RobotLogs/log*.html',
35 otherFiles: '',
36 outputFileName: 'RobotLogs/output*.xml',
37 outputPath: '.',
38 passThreshold: 100,
39 reportFileName: 'RobotLogs/report*.html',
40 unstableThreshold: 0]);
41 }
42}