-
-
Notifications
You must be signed in to change notification settings - Fork 145
feat(publishBuildStatusReport): publishes controller job status on reports.jenkins.io #938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(publishBuildStatusReport): publishes controller job status on reports.jenkins.io #938
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests are missing :)
0d6cc00
to
c15fbe3
Compare
Update: Added unit tests. |
414abe6
to
7fcd76a
Compare
Update: Added a dir block to execute Code clean-up has been performed for the pipeline script and the test suite. principal branch check will be uncommented once approved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jayfranco999 . The code still have many things to review: it works but it is really verbose for not a lot of values (LLM generated?) which adds a lot of complexity and instructions.
As a general rule of thumb: the less you do in Pipeline (e.g. Groovy), the safer we are.
You should always aim at running one sh
step and build thing around it (such as the required withEnv() wrapping)
.
=> A good start would be to remove the utility function for parsing Date and time, adn group the sh
into a single step.
Don't hesitate to use my suggestions as starters
115de37
to
feebfbf
Compare
…ports.jenkins.io Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
vars/publishBuildStatusReport.groovy
Outdated
sh ''' | ||
bash ${SCRIPT_PATH} | ||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to intercept failures and collect logs (archiveArtfiacts) with the same technique as in Good idea. However you also need to collect the logs if the sh
step (otherwise you don't need to collect azcopy logs).
We accept the simplification of saying: "either it succeeds or it fails. IF it fails, collect and archive logs)
@Art39print please stop spamming us or you'll be blocked. |
resources/io/jenkins/infra/pipeline/generateAndWriteBuildStatusReport.sh
Outdated
Show resolved
Hide resolved
Signed-off-by: jayfranco999 <[email protected]>
Co-authored-by: Damien Duportal <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
resources/io/jenkins/infra/pipeline/generateAndWriteBuildStatusReport.sh
Show resolved
Hide resolved
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! We tested all cases on jenkins-infra/docker-404 and it works as expected: https://builds.reports.jenkins.io/build_status_reports/infra.ci.jenkins.io/docker-jobs/docker-404/main/status.json
As per - jenkins-infra/helpdesk#2843 (comment)
publishBuildStatusReport
will publish the build status report on reports.jenkins.io using pre-existingpublishReports
shared library script.Once completed we can move on to the next phase of monitoring the reports.
Testing with jenkins-infra/docker-404#46