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

NEXUS-16019 port build to jenkins #59

Merged
merged 41 commits into from
May 30, 2018

Conversation

wwannemacher
Copy link
Contributor

@wwannemacher wwannemacher commented May 22, 2018

@wwannemacher
Copy link
Contributor Author

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.

@wwannemacher wwannemacher requested a review from kellyrob99 May 22, 2018 17:47
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>"""
Copy link
Contributor

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

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>"""
Copy link
Contributor

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

@@ -0,0 +1,19 @@
library('private-pipeline-library')
library('jenkins-shared@feature/build-notifications')
Copy link
Contributor Author

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.

library('private-pipeline-library')
library('jenkins-shared')

def notify = { build, env ->
Copy link
Contributor Author

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'

Copy link
Member

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?

Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

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.

library('private-pipeline-library')
library('jenkins-shared')

def notify = { build, env ->
Copy link
Member

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?

}
}

mavenSnapshotPipeline(usePublicSettingsXmlFile: true,
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

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

+1

@wwannemacher wwannemacher merged commit 02b52a7 into master May 30, 2018
@wwannemacher wwannemacher deleted the NEXUS-16019-port-build-to-jenkins branch May 30, 2018 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants