gitlab-ci - 如何将黑鸭与 gitlab-ci 集成
问题描述
我们如何将 Black Duck 许可证扫描与 gitlab-ci 集成:
$ bash <(curl -s -L https://detect.synopsys.com/detect.sh)
Detect Shell Script
Detect Shell Script 2.4.0
Will look for : https://sig-repo.synopsys.com/bds-integrations-release/com/synopsys/integration/synopsys-detect/6.5.0/synopsys-detect-6.5.0.jar
You have already downloaded the latest file, so the local file will be used.
Java Source: PATH
running Detect: "java" -jar "/root/synopsys-detect/download/synopsys-detect-6.5.0.jar"
______ _ _
| _ \ | | | |
| | | |___| |_ ___ ___| |_
| | | / _ \ __/ _ \/ __| __|
| |/ / __/ || __/ (__| |_
|___/ \___|\__\___|\___|\__|
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (jar:file:/root/synopsys-detect/download/synopsys-detect-6.5.0.jar!/BOOT-INF/lib/groovy-all-2.4.12.jar!/) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Detect Version: 6.5.0
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- Current property values:
2020-09-08 11:16:06 INFO [main] --- --property = value [notes]
2020-09-08 11:16:06 INFO [main] --- ------------------------------------------------------------
2020-09-08 11:16:06 INFO [main] --- ------------------------------------------------------------
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- Tilde's will be automatically resolved to USER HOME.
2020-09-08 11:16:06 INFO [main] --- Source directory: /home/siddharth.sharma2
2020-09-08 11:16:06 INFO [main] --- Output directory: /root/blackduck
2020-09-08 11:16:06 INFO [main] --- Run directory: /root/blackduck/runs/2020-09-08-05-46-05-916
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 ERROR [main] --- Your environment was not sufficiently configured to run Black Duck or Polaris. Please configure your environment for at least one product.
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- Creating status file: /root/blackduck/runs/2020-09-08-05-46-05-916/status/status.json
2020-09-08 11:16:06 INFO [main] --- Status file has been deleted. To preserve status file, turn off cleanup actions.
2020-09-08 11:16:06 INFO [main] --- Cleaning up directory: /root/blackduck/runs/2020-09-08-05-46-05-916
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- ======== Detect Issues ========
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- EXCEPTIONS:
2020-09-08 11:16:06 INFO [main] --- Your environment was not sufficiently configured to run Black Duck or Polaris. Please configure your environment for at least one product.
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- ======== Detect Status ========
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- Overall Status: FAILURE_CONFIGURATION - Detect was unable to start due to issues with it's configuration. Check and fix your configuration.
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- ===============================
2020-09-08 11:16:06 INFO [main] ---
2020-09-08 11:16:06 INFO [main] --- Detect duration: 00h 00m 01s 034ms`enter code here`
2020-09-08 11:16:06 ERROR [main] --- Exiting with code 7 - FAILURE_CONFIGURATION
Result code of 7, exiting
我只是通过获取 detect.sh 文件进行了尝试,也没有文档可用于将黑鸭许可证扫描与 gitlab-ci 集成
解决方案
--detect.source.path 试试
bash <(curl -s -L https://detect.synopsys.com/detect.sh) --blackduck.url=<your_blackduck_server_url --blackduck.api.token=<your_api_token> --detect.source.path=<source_folder_to_scan>
获取调试输出
--logging.level.com.synopsys.integration=DEBUG
我收到“环境配置不充分”错误,因为我没有添加 blackduck.url。
cli 工具在 -h/--help 上不显示完整帮助或未给出适当参数时的奇怪行为。
推荐阅读
- c++ - LNK2019 símbolo externo public: bool __thiscall … sin resolver
- c++ - 继续收到此错误 main.cpp:9:91: error: no match for 'operator<<' (操作数类型是 'std::basic_ostream' 和 'const std::vector'
- flutter - 当应用程序在颤动或断开互联网连接并重新连接时从头开始上传文件
- python - plot.area() 未在熊猫中显示
- reactjs - Gatsby 组件阴影
- solidity - 部署智能合约时,合约的“所有者”(默认情况下)不是部署它的人吗?
- c# - 使用 UrlHelper 的单元测试页面模型
- ruby - 适用于 Windows 的 RVM 和 Rbenv
- reactjs - 反应 DatePicker 组件
- java - 用 Java 上传 AWS S3 文件 - 为什么直接上传 InputStream 比将其写入临时文件然后上传要消耗更多内存?