Project

Profile

Help

Task #7688

Copy jenkins build logs to logs dir at run_test

Added by Mark Zaslavskiy over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Ilfat Kinyaev
Category:
jenkins_jobs
Sprint/Milestone:
Start date:
25.10.2016
Due date:
% Done:

90%

Estimated time:
3:00 h
Target branch:
Test scenario:

# Fix path to log:
https://github.com/OSLL/mdbci/tree/7688_cope_logs_fix_path
https://github.com/OSLL/mdbci/pull/340

https://github.com/mariadb-corporation/maxscale-jenkins-jobs/tree/7688_copy_build_logs_at_run_test
https://github.com/mariadb-corporation/maxscale-jenkins-jobs/pull/133

# For testing, run job and check LOGS/job-buildID path. There must be placed build_log-buildID file.

# Jobs:

http://maxscale-jenkins.mariadb.com:8090/view/All/job/run_test_snapshot/

http://maxscale-jenkins.mariadb.com:8090/view/All/job/run_test/


Description

Investigate how to locate job log file
Identify all needed env variables
Add copying of logs to scripts/build_parser/write_build_results.rb

History

#1 Updated by Mark Zaslavskiy over 4 years ago

  • Assignee changed from Alexander Kaluzhny to Ilfat Kinyaev

#2 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from New to Active / In progress

#3 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from Active / In progress to New

#4 Updated by Timofey Turenko over 4 years ago

it should also work for run_test_snapshot

#5 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from New to Active / In progress

#6 Updated by Ilfat Kinyaev over 4 years ago

  • Estimated time set to 3:00 h

#7 Updated by Mark Zaslavskiy over 4 years ago

  • Status changed from Active / In progress to New

#8 Updated by Mark Zaslavskiy over 4 years ago

  • Description updated (diff)

#9 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from New to Active / In progress

#10 Updated by Mark Zaslavskiy over 4 years ago

Where /home/vagrant/LOGS/run_test-1340/LOGS

#11 Updated by Ilfat Kinyaev over 4 years ago

  • % Done changed from 0 to 20

http://maxscale-jenkins.mariadb.com:8090/view/All/job/run_test/572/console

+ /home/vagranttest/build-scripts/test/run_test.sh
+ tee /home/vagranttest/.jenkins/jobs/run_test/workspace/build_log_572
4096
Logs go to /home/vagranttest/LOGS/run_test-572

But:
vagranttest@maxscale-jenkins:~/LOGS/run_test-572$ ls
vagranttest@maxscale-jenkins:~/LOGS/run_test-572$


http://maxscale-jenkins.mariadb.com:8090/view/All/job/run_test_snapshot/24/consoleFull

+ /home/vagranttest/build-scripts/test/run_test_snapshot.sh
+ tee /home/vagranttest/.jenkins/jobs/run_test_snapshot/workspace/build_log_24

As I understand it, the build log is stored locally on path:
/home/vagranttest/.jenkins/jobs/run_test/workspace/build_log_** *
And each time, recreated, and the previous one is removed.

#13 Updated by Ilfat Kinyaev over 4 years ago

  • Test scenario updated (diff)

#15 Updated by Ilfat Kinyaev over 4 years ago

NOTE: what about build log at slave nodes??

#16 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from Active / In progress to New

#17 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from New to Review
  • Assignee changed from Ilfat Kinyaev to Mark Zaslavskiy

Cannot run on slave nodes.

#18 Updated by Mark Zaslavskiy about 4 years ago

  • Status changed from Review to New

#19 Updated by Mark Zaslavskiy about 4 years ago

  • Status changed from New to Active / In progress

#20 Updated by Mark Zaslavskiy about 4 years ago

Approach which works on slaves:
ssh $USER@$MASTER_HOST ls -la $HOME/.jenkins/jobs/$JOB_NAME/builds/$BUILD_ID/log

where $MASTER_HOST should be calculated from the $JENKINS_URL

#21 Updated by Mark Zaslavskiy about 4 years ago

  • Status changed from Active / In progress to New
  • Assignee changed from Mark Zaslavskiy to Ilfat Kinyaev

#22 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Active / In progress

#24 Updated by Ilfat Kinyaev about 4 years ago

There were problems with permissions, removed the option of save privileges .
Waiting results:
http://max-tst-01.mariadb.com:8089/view/All/job/run_test_snapshot/284/

#25 Updated by Ilfat Kinyaev about 4 years ago

Check in fake-job on max-tst slave.

#26 Updated by Timofey Turenko about 4 years ago

  • Status changed from Active / In progress to Closed

Also available in: Atom PDF