Name: nexus-iq-webhook-reference-implementation
Owner: Sonatype Community
Description: A reference implementation for consuming webhooks via serverless.
Created: 2018-02-22 22:10:57.0
Updated: 2018-03-16 20:41:19.0
Pushed: 2018-02-22 22:16:36.0
Homepage: null
Size: 21
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a reference implementation for consuming webhooks via serverless. In this implementation, a Nexus IQ Application Policy Evaluation webhook is consumed, validated and a message is sent to a Slack channel.
The serverless offline plugin is installed to allow for local development. The application can be run using
offline start
after installing serverless and the node dependencies.
install serverless -g
install
Webhooks must be configured in Nexus IQ Server to point towards the endpoint generated by the serverless application. Information about configuring Nexus IQ Webhooks is available in IQ Server Webhooks.
Environmental variables for the Slack Webhook URL and Nexus IQ Webhook secret key must be set in the serverless configuration.
Unit tests can be run with mocha using
test
Information about deploying serverless applications to various cloud providers in available in the
serverless documentation. If using AWS, for example, you must configure your credentials and then deploy via
sls deploy
. Consideration should be taken as to the cost of running this service as well as the scope of the
handler as described in serverless.yml and index.js.