Skip to content

Commit

Permalink
[CI] Archive build reasons (#21347) (#21368)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Sep 29, 2020
1 parent 284c8c1 commit 1e1c554
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,11 @@ pipeline {
mapParallelTasks["${k}"] = v
}
}
notifyBuildReason()
parallel(mapParallelTasks)
}
}
}
post {
always {
dir("${BASE_DIR}"){
// Archive the markdown files that contain the build reasons
archiveArtifacts(allowEmptyArchive: false, artifacts: 'build-reasons/*.md')
}
}
}
}
}
post {
Expand Down Expand Up @@ -545,6 +538,17 @@ def isDockerInstalled(){
}
}

/**
* Notify the build reason.
*/
def notifyBuildReason() {
// Archive the build reason here, since the workspace can be deleted when running the parallel stages.
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build-reasons/*.*')
if (isPR()) {
echo 'TODO: Add a comment with the build reason (this is required to be implemented in the shared library)'
}
}

/**
* This class is the one used for running the parallel stages, therefore
* its arguments are passed by the beatsStages step.
Expand Down

0 comments on commit 1e1c554

Please sign in to comment.