Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.
Jordan Piscitelli edited this page Oct 3, 2018 · 75 revisions

Developer notes only

Run:

bash <(curl -s https://blackducksoftware.github.io/hub-detect/hub-detect.sh)
powershell "[Net.ServicePointManager]::SecurityProtocol = 'tls12'; irm https://blackducksoftware.github.io/hub-detect/hub-detect.ps1?$(Get-Random) | iex; detect"

Help

bash <(curl -s https://blackducksoftware.github.io/hub-detect/hub-detect.sh) -h
powershell "[Net.ServicePointManager]::SecurityProtocol = 'tls12'; irm https://blackducksoftware.github.io/hub-detect/hub-detect.ps1?$(Get-Random) | iex; detect" -h

In Jenkins

Add a build step of 'Execute shell' with this content:

#!/bin/bash
bash <(curl -s https://blackducksoftware.github.io/hub-detect/hub-detect.sh)

Add a build step of 'Execute Windows Command' with this content:

powershell "[Net.ServicePointManager]::SecurityProtocol = 'tls12'; irm https://blackducksoftware.github.io/hub-detect/hub-detect.ps1?$(Get-Random) | iex; detect"

Using Spaces

Because of the way bash is executed, spaces need to be escaped. For example:

bash <(curl -s https://blackducksoftware.github.io/hub-detect/hub-detect.sh) --detect.project.name=\"Project Test\"

Because of the way powershell is executed, use back ticks to escape characters or wrap the option in single quotes. For example:

powershell "[Net.ServicePointManager]::SecurityProtocol = 'tls12'; irm https://blackducksoftware.github.io/hub-detect/hub-detect.ps1?$(Get-Random) | iex; detect" --some.option=escaped`,comma

or

powershell "[Net.ServicePointManager]::SecurityProtocol = 'tls12'; irm https://blackducksoftware.github.io/hub-detect/hub-detect.ps1?$(Get-Random) | iex; detect" '--some.option=escaped space'

Using Snapshots

To use the latest snapshot, set the following environment variable

DETECT_USE_SNAPSHOT=1

Using pass-through properties

There are currently two supported passthrough property prefixes:

detect.docker.passthrough.
detect.phone.home.passthrough.

And their environment variable alternatives:

DETECT_DOCKER_PASSTHROUGH_
DETECT_PHONE_HOME_PASSTHROUGH_

Properties that use these prefixes will be passed to their underlying tools. For example, --detect.docker.passthrough.cleanup.inspector.image=true will pass the property --cleanup.inspector.image=true through to the docker inspector.

Direct jar download

Grab the jars from our public AF: http://test-repo.blackducksoftware.com/artifactory/webapp/#/artifacts/browse/tree/General/bds-integrations-release/com/blackducksoftware/integration/hub-detect

Using gradle inspector locally (airgap)

Please download the gradle-inspector and its transitives: https://github.com/blackducksoftware/hub-detect/tree/gh-pages

Unzip the zip into a location of your choice.

Then use the following property: detect.gradle.inspector.air.gap.path=<path/to/folder/with/jars>

Spring

For extra details about Spring's configuration: https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html

Building Hub-Detect for Eclipse

Please run the following command before working in Eclipse after checking out the source:

gradlew cleanEclipse eclipse