diff --git a/jenkins/vs/sonic-sairedis-build-pr/Jenkinsfile b/jenkins/vs/sonic-sairedis-build-pr/Jenkinsfile index e0de1141fb64..96e7756ae9dd 100644 --- a/jenkins/vs/sonic-sairedis-build-pr/Jenkinsfile +++ b/jenkins/vs/sonic-sairedis-build-pr/Jenkinsfile @@ -28,8 +28,8 @@ pipeline { } } post { - success { - archiveArtifacts(artifacts: 'target/*.deb, **/*.log, target/var/log/*') + always { + archiveArtifacts(artifacts: 'target/*.deb, **/*.log, target/syslog') } } } diff --git a/scripts/vs/sonic-sairedis-build/build.sh b/scripts/vs/sonic-sairedis-build/build.sh index fe9e6399d0be..6f962187b7ad 100755 --- a/scripts/vs/sonic-sairedis-build/build.sh +++ b/scripts/vs/sonic-sairedis-build/build.sh @@ -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 @@ -36,3 +45,5 @@ popd mkdir -p target cp *.deb target/ +sudo cp /var/log/syslog target/ +sudo chmod 644 target/syslog