sonatype-nexus-community/nexus-webhook-publish

Name: nexus-webhook-publish

Owner: Sonatype Community

Description: A lil Golang app that takes Nexus Repo webhooks and uses them to publish components to other repos such as npmjs

Created: 2017-11-16 22:41:42.0

Updated: 2018-05-23 04:37:34.0

Pushed: 2017-11-19 23:37:39.0

Homepage:

Size: 20

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Nexus Webhook Publish

Join the chat at https://gitter.im/sonatype/nexus-developers

What is this?

This a lil Golang app that gets a Webhook payload from Nexus Repository Manager 3.1+ and publish to currently:

The primary use case for this app is if you are publishing npm components to Nexus Repository but you also want to publish them to npmjs (and eventually other public repos). You COULD do this as a part of your CI build, but why not use Golang to do it!

Developing

To get up and running you'll need Golang and go dep installed. Once you've done that:

From there you can play around with it, build it, etc…

Using

Right now this is pretty WIP, but you can test it out by:

Now Nexus Repository Manager should send a webhook over to this service. If the event is for an npm component (what we refer to new packages as), it will shell out to npm and publish it. Assumedly if you wanted to limit this just to a specific repo, some code can be added to do that by checking c.RepositoryName in one of the functions where component is being used.

The Fine Print

It is worth noting that this is NOT SUPPORTED by Sonatype, and is a contribution of ours to the open source community (read: you!)

Remember:

Phew, that was easier than I thought. Last but not least of all:

Have fun creating and using this plugin and the Nexus platform, we are glad to have you here!

Getting help

Looking to contribute to our code but need some help? There's a few ways to get information:

Acknowledgements

We stand on the shoulders of giants. Some of the code in this project was graciously borrowed (and attributed to):


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.