Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,27 @@ try {
timestamps {
sshagent(['github-auth-ssh']) {
docker_image.inside(run_args) {
stage('Bitbake Build') {
if (is_pr) {
setGitHubPullRequestStatus state: 'PENDING', context: "${env.JOB_NAME}", message: "Bitbake Build"
try {
stage('Bitbake Build') {
if (is_pr) {
setGitHubPullRequestStatus state: 'PENDING', context: "${env.JOB_NAME}", message: "Bitbake Build"
}
params = ["${script_env}",
"docker/build-project.sh"].join("\n")
sh "${params}"
}
params = ["${script_env}",
"docker/build-project.sh"].join("\n")
sh "${params}"
}
stage('Build publishing') {
if (is_pr) {
setGitHubPullRequestStatus state: 'PENDING', context: "${env.JOB_NAME}", message: "Build publishing"
} catch (Exception e) {
throw e
} finally {
// publish in finally-block so that detailed logs or any partial results get stored even in case of failed build
stage('Build publishing') {
if (is_pr) {
setGitHubPullRequestStatus state: 'PENDING', context: "${env.JOB_NAME}", message: "Build publishing"
}
params = ["${script_env}",
"docker/publish-project.sh"].join("\n")
sh "${params}"
}
params = ["${script_env}",
"docker/publish-project.sh"].join("\n")
sh "${params}"
}
}
} // sshagent
Expand Down
6 changes: 4 additions & 2 deletions docker/publish-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ fi
# Copy detailed build logs
# Include symlinks to avoid massive amount of "skipping non-regular file"
# lines in the rsyncd server system-level log
create_remote_dirs ${_RSYNC_DEST} detailed-logs/${TARGET_MACHINE}/
rsync -qzrl --prune-empty-dirs --include "log.*" --include "*/" --exclude "*" ${_BRESULT}/work*/* ${_RSYNC_DEST}/detailed-logs/${TARGET_MACHINE}/
if [ -d ${_BRESULT}/work ]; then
create_remote_dirs ${_RSYNC_DEST} detailed-logs/${TARGET_MACHINE}/
rsync -qzrl --prune-empty-dirs --include "log.do_*" --include "*/" --exclude "*" ${_BRESULT}/work*/* ${_RSYNC_DEST}/detailed-logs/${TARGET_MACHINE}/
fi

# Create latest symlink locally and rsync it to parent dir of publish dir
ln -vsf ${CI_BUILD_ID} latest
Expand Down