Skip to content

Commit

Permalink
[CI] Archive build reasons (elastic#21347) (elastic#21367)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Sep 29, 2020
1 parent f61f164 commit cfce8db
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 @@ -544,6 +537,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 cfce8db

Please sign in to comment.