-
Notifications
You must be signed in to change notification settings - Fork 3
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
NEXUS-16019 port build to jenkins #59
Conversation
there is some logic in the pipeline that will deploy if the build is run on master - but I figure this PR is a good heads-up that the port is happening atm. |
jenkins/Jenkinsfile-build
Outdated
build, env -> | ||
hipchatSend color: 'GREEN', notify: false, room: 'nexus', | ||
message: """SUCCESS: ${build.fullDisplayName}, on branch ${env.BRANCH_NAME}, duration: ${ | ||
(build.duration / 60000l) as int } min <a href="${env.BUILD_URL})">${env.BUILD_URL}</a>""" |
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.
^ dangling )
after the URL href
jenkins/Jenkinsfile-build
Outdated
build, env -> | ||
hipchatSend color: 'RED', notify: false, room: 'nexus', | ||
message: """FAILURE: ${build.fullDisplayName}, on branch ${env.BRANCH_NAME}, duration: ${ | ||
(build.duration / 60000l) as int } min <a href="${env.BUILD_URL})">${env.BUILD_URL}</a>""" |
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.
^ dangling )
after the URL href
jenkins/Jenkinsfile-build
Outdated
@@ -0,0 +1,19 @@ | |||
library('private-pipeline-library') | |||
library('jenkins-shared@feature/build-notifications') |
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.
just about everything except this line is what I intend to merge. I will remove the branch reference from here once https://github.com/sonatype/jenkins-shared/pull/30 is merged down.
jenkins/Jenkinsfile-build
Outdated
library('private-pipeline-library') | ||
library('jenkins-shared') | ||
|
||
def notify = { build, env -> |
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.
I'm tempted to hoist this up into the jenkins-shared library and call it 'nxrmNotify'
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.
👍 the only thing I can see here that's specific to us is the parameterization of 'hipchatRoom', otherwise I would fully expect everyone across the company to be using this for HC notifications (if they want them)
Does this have any crossover with the 'cards' for notifications, or is that a global config option?
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.
Would other teams want to use it? if so then could look at parameterizing the room and call it roomNotify
?
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.
but +1 for moving as much of this as possible to shared vs copy-paste
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.
I'm going to move this up - this is currently calling a wrapper for hitting hipchat, but given that hipchat's days are numbered, my goal will be to add a layer that can be updated to point to whatever chat system we are using in the future.
jenkins/Jenkinsfile-build
Outdated
library('private-pipeline-library') | ||
library('jenkins-shared') | ||
|
||
def notify = { build, env -> |
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.
👍 the only thing I can see here that's specific to us is the parameterization of 'hipchatRoom', otherwise I would fully expect everyone across the company to be using this for HC notifications (if they want them)
Does this have any crossover with the 'cards' for notifications, or is that a global config option?
jenkins/Jenkinsfile-build
Outdated
} | ||
} | ||
|
||
mavenSnapshotPipeline(usePublicSettingsXmlFile: true, |
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.
How do we release this project from Jenkins please?
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.
release will be a separate file - it's not just that there is a different call (mavenReleasePipeline
) to start it, but it's going to be a different build configuration. This jenkinsfile is meant to work both as a multibranch pipeline [for feature builds], as well as a nightly / each-master-commit build. The release pipeline will be a parameterized build (to take version numbers as parameters). Once this PR is merged to master, I'll whip up the jenkinsfile for the release build.
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.
+1
feels a bit awkward because the jira ticket is not public, and neither is the jenkins link...
https://issues.sonatype.org/browse/NEXUS-16019
https://jenkins.zion.aws.s/job/nxrm/job/libraries/job/goodies-feature/job/NEXUS-16019-port-build-to-jenkins/