Skip to content

Commit

Permalink
[CI] Archive build reasons (elastic#21347)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Sep 29, 2020
1 parent 1c94c6d commit 7c51ef5
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 @@ -105,18 +105,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 @@ -588,6 +581,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 7c51ef5

Please sign in to comment.