Skip to content
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

Add emailing possible build breakers info to admin list #71

Closed
wants to merge 1 commit into from

Conversation

mnokka-unikie
Copy link
Contributor

Adds possibility to email individual committers info since current failed build and last ok
one in Production server. These are the possible(!) build breakers for the current build failure.

Email activation and admin email list defined in Jenkins global ENV UI screen.

Needs PR tiiuae/ghaf-infra#246 in Prod Jenkins server (Add curl to Prod Jenkins server)

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of code, and it's kinda scattered around in that file. This needs to be a separate file, exposing this as functions. We don't want to copy that to other pipelines.


if (lastSuccessfulBuildID) {
def lastSuccessfulCommit = sh(script: """
curl --run "curl -s ${env.JENKINS_URL}/job/${env.JOB_NAME}/${lastSuccessfulBuildID}/api/json | jq -r '.actions[] | select(.lastBuiltRevision != null) | .lastBuiltRevision.SHA1'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can directly do that request from groovy: https://stackoverflow.com/a/42662243

@flokli
Copy link
Contributor

flokli commented Sep 18, 2024

I'm also a bit unhappy about the amount of code we have in Jenkins itself - getting that list of authors between HEAD and a given commit could probably be moved to a shellscript that can run outside of jenkins, to keep the amount of complicated logic in jenkins minimal.

@mnokka-unikie
Copy link
Contributor Author

This PR is to finish older POC type issue for this emailing business. Case will now carry on to see whether Jenkins ext-mail plugin produces similar functionality (via configs). Another investigation line is to see whether we can inform Github (checking part ) from the build itself (the status) and let Github do the possible "announcement business".

The main question being; "Is it worth to carry on any further changes with this PR , when efforts to "replace" it are starting." Choices are pushing it to main / carry on or just wait the two other investigation line results" .

@henrirosten
Copy link
Collaborator

I would propose to not merge this, but continue with the other tracks you have.

@henrirosten
Copy link
Collaborator

@mnokka-unikie: Can we close this?

@joinemm joinemm closed this Jan 8, 2025
@joinemm joinemm deleted the add_emailing branch January 8, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants