Skip to content

Commit

Permalink
[CI] Add cleanup for ownership issues observed on zynq boards
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnoel committed Jan 23, 2024
1 parent 8c116be commit 1861a20
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docker/jenkins/Jenkinsfile_HW
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pipeline {
post {
always {
stashResults("bnn_build_sanity", "${env.BOARD}")
cleanUpWorkspaceOwnership()
}
}
}
Expand All @@ -72,6 +73,7 @@ pipeline {
post {
always {
stashResults("bnn_build_sanity", "${env.BOARD}")
cleanUpWorkspaceOwnership()
}
}
}
Expand All @@ -96,6 +98,7 @@ pipeline {
post {
always {
stashResults("bnn_build_sanity", "${env.BOARD}")
cleanUpWorkspaceOwnership()
}
}
}
Expand All @@ -120,6 +123,7 @@ pipeline {
post {
always {
stashResults("bnn_build_sanity", "${env.BOARD}")
cleanUpWorkspaceOwnership()
}
}
}
Expand Down Expand Up @@ -147,6 +151,7 @@ pipeline {
post {
always {
stashResults("bnn_build_full", "${env.BOARD}")
cleanUpWorkspaceOwnership()
}
}
}
Expand All @@ -171,6 +176,7 @@ pipeline {
post {
always {
stashResults("bnn_build_full", "${env.BOARD}")
cleanUpWorkspaceOwnership()
}
}
}
Expand All @@ -195,6 +201,7 @@ pipeline {
post {
always {
stashResults("bnn_build_full", "${env.BOARD}")
cleanUpWorkspaceOwnership()
}
}
}
Expand All @@ -219,6 +226,7 @@ pipeline {
post {
always {
stashResults("bnn_build_full", "${env.BOARD}")
cleanUpWorkspaceOwnership()
}
}
}
Expand Down Expand Up @@ -371,4 +379,10 @@ void stashResults (String testType, String board) {
echo "No results to stash"
}
}
}
}

void cleanUpWorkspaceOwnership () {
if (env.USER_CREDENTIALS) {
sh 'echo ${USER_CREDENTIALS_PSW} | sudo -S chown -R $(id -u):$(id -g) ${WORKSPACE}'
}
}

0 comments on commit 1861a20

Please sign in to comment.