# micro-service-scanning-pattern **Repository Path**: mirrors_blackducksoftware/micro-service-scanning-pattern ## Basic Information - **Project Name**: micro-service-scanning-pattern - **Description**: A demonstration of setting up a scan for a micro-service which is being built and deployed frequently. How to setup the Black Duck scans to get the most out of the scan and system. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-29 - **Last Updated**: 2026-04-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Microservice Scanning Pattern Demonstration Miro-services are characterized by: * Development happening on one branch * Frequently deploying new versions to production, e.g. multiple times per day * Often, the Black Duck scan/version creation happens before it is known whether the version being analyzed will be pushed to production This demo shows how to setup scans of mico-services to: * Mark and retain RELEASED versions (in Black Duck) corresponding to versions that were pushed to production * Prune/delete older, un-RELEASED (or un-ARCHIVED) versions in Black Duck # To run the demo - You need python3 and a virtualenv environment is highly recommended. - You need a Hub server and it's URL - ```bash pip install -r requirements.txt # will install the 'blackduck' package from PyPi export HUB_USERNAME= # the script will default to 'sysadmin' export HUB_PASSWORD= # the script will default to 'blackduck' ./demonstrate.bash ``` The script will proceed to create versions similar to a stream of builds of a micro-service, web-service, or SaaS application. As the versions are created, some will be marked as RELEASED mimicking the idea that those versions were (later) pushed to production.Additionally, any (prior, now old) version that was RELEASED will be marked as ARCHIVED so that there is one, and only one, version (in the project) that is marked as RELEASED. Finally, older non-RELEASED, non-ARCHIVED versions are deleted as new versions are created.