preface

Verdaccio’s private warehouse has been fully used, including the basic component library and the children’s shoes of the business group. It has been running for one and a half months and has not been down once. Previously, a message card was developed based on Jenkins, and this time it was migrated to Verdaccio, so that the alarm behavior of package publishing could be more simple

rendering

The effect of the old Jenkins



The blue area can be clicked to quickly jump to the corresponding access area;

If you are interested, you can browse through my previous article!

Based on Verdaccio message mechanism



Click on more information to go to the corresponding details page of the warehouse

Verdaccio configuration

Official documents:Verdaccio Notifications

Effect diagram configuration

The specification is very simple, just convert an interface to yamL, the only thing you need to pay attention to is line breaks and so on; Here docking is the nail robot, content specifications according to your webhook provider adjustment!

notify:
  'frontend-dingtalk':
     method: POST
     headers: [{'Content-Type': 'application/json; charset=utf-8'}]
     endpoint: https://oapi.dingtalk.com/robot/send?access_token=09df4720bxxxx
     content: '{"msgtype": "markdown","at": { "isAtAll": true },"markdown":{"title":"FBI WARNING! You have a new package, please note check!" ,"text": "! [](https://image link)\n\n#### package name:{{ name }}- > ([more] (HTTP: / / http://npm.h3yun.net:4873/-/web/detail/{{name}}))\n {{#if description}} > {{ description }}{{/if}}  \n\n{{#if dist-tags.latest }}Stable version (latest) : * *{{ name }}@{{ dist-tags.latest }}**{{/if}} \n\n{{#if dist-tags.dev }}Development (dev) : * *{{ name }}@{{ dist-tags.dev }}**{{/if}} \n\n{{#if dist-tags.alpha }}Alpha version: * *{{ name }}@{{ dist-tags.alpha }}**{{/if}} \n\n{{#if dist-tags.alpha }}The next version: * *{{ name }}@{{ dist-tags.next }}**{{/if}}\n\ N Publisher :**{{ publisher.name }}** \n\n welcome you to use, any questions please timely feedback, thank you! \n\n "} }'
    # packagePatternFlags: i
    # packagePattern: ^@h3-shared\/*$
Copy the code

The picture material

This is I found a piece of material on the Internet, and then use PS transformation, hey hey



conclusion

If it helps you, thank you for reading!