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 Oct 19, 2020
1 parent 1b98a74 commit 5944376
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 @@ -103,18 +103,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 @@ -542,6 +535,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 5944376

Please sign in to comment.