Skip to content

Commit

Permalink
[jenkins]: archive syslog for sonic sairedis
Browse files Browse the repository at this point in the history
  • Loading branch information
lguohan committed Sep 19, 2019
1 parent 195672e commit c49e820
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jenkins/vs/sonic-sairedis-build-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ pipeline {
}
}
post {
success {
archiveArtifacts(artifacts: 'target/*.deb, **/*.log, target/var/log/*')
always {
archiveArtifacts(artifacts: 'target/*.deb, **/*.log, target/syslog')
}
}
}
11 changes: 11 additions & 0 deletions scripts/vs/sonic-sairedis-build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ sudo sed -ri 's/^# unixsocket/unixsocket/' /etc/redis/redis.conf
sudo sed -ri 's/^unixsocketperm .../unixsocketperm 777/' /etc/redis/redis.conf
sudo sed -ri 's/redis-server.sock/redis.sock/' /etc/redis/redis.conf
sudo service redis-server start
sudo service rsyslog start

cleanup() {
mkdir -p ../target
sudo cp /var/log/syslog ../target/
sudo chmod 644 ../target/syslog
}

trap cleanup ERR

pushd sairedis

Expand All @@ -36,3 +45,5 @@ popd

mkdir -p target
cp *.deb target/
sudo cp /var/log/syslog target/
sudo chmod 644 target/syslog

0 comments on commit c49e820

Please sign in to comment.